app大家熟悉吧。就是我们常用的各种应用。那 d是什么呢?区块链的去中心化特性大家应该是熟悉的,那去中心化用英语怎么说?decentralization 就是了。按照惯例,取个首字母加上去,就成了DApp,即去中心化应用
That's what we usually use. That's what d is xff1f; the decentralisation of the block chain is supposed to be familiar xff0c; that's what decentralisation says in English xff1f; decentralization is. As usual xff0c; take a first letter and go xff0c; that's Dappxff0c; decentralize application.
你现在手机上的app能干嘛,从理论上基本都可以。但是对交易速度有要求的就不太合适了,毕竟区块链的一个特性就是速度慢
What can you do with your app on your cell phone?
DApp的整体框架
整个看来,架构有三大部分
DApp's overall framework
, text_Q1NETIBATWUTmlb1FpbkZlbg= #61; #61; size_20,collor_FFUN, t_70,g_se,x_16#pic_center 'alt'.
1、区块链以及本身提供的能力
1. Block chains and the capabilities they provide
2、三方钱包等提供的能力
2. Capacity provided by the Triangular Wallet, etc.
3、我们要写的DApp部分
Three. We're going to write the Dapp section.
前两部分,不需要我们参与开发,我们能做的,最多就是选择用哪个。但是第三部分就不一样了,这个才是我们的主战场
The first two parts xff0c; we don't need to be involved in the development of xff0c; what we can do xff0c; the most we can do is choose which one. But the third part is different xff0c; this is our main battleground.
从我们开发的Dapp来说,也可以分为三层
From the Dapp we've developed, #xff0c; it can also be divided into three layers.
1、和EVM交互的合约层
1. Contract layer interacting with EVM
2、和合约层、钱包交互的交互库
2. Interactive library with contract layers and wallets
3、做业务的业务层,该层会和用户以及第二层交互
3. Business level & #xff0c; this level interacts with users and second level
技术选型
1、链用的是ETH
Technical choice
1 with ETH in the chain
2、钱包使用了MetaMask,这是一个比较完善的钱包了
2. The wallet uses MetaMask, it's a better wallet.
3、合约层用的是solidity
Three. The contract floor is for solidity.
4、交互库 用的比较多的是web3js
4. The interactive library uses a lot of web3js.
5、业务层框架的话,就看自己喜欢用什么了,vue、react 都是OK的
#xff0c; depends on what you like #xff0c; vue, react are OK
为了做开发,那一定是要有一个开发环境的。
To develop xff0c; that must have a development environment.
到DApp的开发中来说,4、5是前端的知识,这个部分自己去解决,默认大家都懂了;
xff0c for Dapp development; xff0c; xff0c for knowledge at the front end; xff0c for this part itself; xff0c for which everyone understands xff1b;
那我们现在要解决的就是模拟链(毕竟真链上的操作都是要花钱的)、钱包和合约的问题测试环境
So what we're dealing with now is a simulation chain #xff08; after all, the real chain is a cost-effective testing environment #xff09; wallets and contracts.
1、链的模拟的话,我们可以用ganache
1. Simulation of the chain #xff0c; we can use ganache
2、钱包用MetaMask
2. Wallet for MetaMask
3、solidity既然是一个编程语言,并且要跑在EVM上,那就有 编写、编译、测试和调试的地方,这里推荐使用remix
3-Solidity is a programming language & #xff0c; running on EVM & #xff0c; there are places to write, compile, test and debugger & #xff0c; remix is recommended here
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论