本文由 威-kaifa873 整理发布,仅作为项目开发需求参考!飞机@sleu88
There are three different types of DAPP components: smart contract, front-end logic (UI) and data storage.
Smart contract
Smart contracts store DAPP's business logic and current status, which is the biggest difference between DAPP and traditional network applications, and it is precisely because of this that DAPP has the advantages mentioned above.
Front end/UI
Although the back-end logic requires developers to complete the smart contract code and deploy it on the blockchain, in the front-end, developers still use standard network technologies, such as HTML and javascript, so developers can use tools, libraries and frameworks that they are familiar with. The UI of the client usually uses Web3.js and Ether Js interacts with the smart contract. Operations such as signing information and sending it to the smart contract are usually completed through the Web3 wallet MetaMask of the browser.
data storage
Most applications need to store data, but because of the distributed characteristics of blockchain, it is inefficient and expensive to store a large amount of data on the chain. This is why many DAPPs need to use off chain storage services such as IPFS or Filecoin to store data and only let the blockchain store important business logic and state.