Developing digital currency tutorials Dapp Framework tools and workflow

Source: Internet
Author: User
Tags manual writing

Blockchain Enthusiast (qq:53016353)

Dapp Development Framework

Although the tools mentioned above can be developed, the use of the framework created by the Community gods makes development easier.


Truffle and Embark. It was truffle that led me into the door. The summer before the truffle, I saw how a bunch of talented students had been in a hackathon (programming marathon) activity, but I was scared, though the results were pretty good. Then truffle appears to help you get rid of a lot of insignificant small things, so you can quickly enter the process of writing code-compile-deploy-test-package Dapp. Another similar dapp build-and-test framework is embark. I have only used truffle, but the two camps have a lot of dapp gods.


Meteor. A different set of development stacks used by many Dapp developers is made up of web3.js and Meteor, Meteor is a common webapp development framework (Ethereum-meteor-wallet project provides a great example of getting started, and Silentciero is building a large number of Meteor and W Eb3.js and Dapp integrated templates). I have downloaded and run some nice dapp that are constructed in this way. There will be some interesting discussions on the Digital Money developer Conference Dξvcon1 from November 9 to 13th, on the use of these tools to build dapp and related best practices (the meeting is broadcast live on YouTube).


APIs. Blockapps.net intends to provide a RESTful API for Dapp to use to avoid the hassle of developers running local nodes, a centralized service based on the digital currency Haskell. This runs counter to Dapp's de-centric model, but is useful when you can't run a digital currency node locally, such as when you want a browser or mobile device to use your dapp. Blockapps provides a command-line tool bloc that can be used after registering a developer account.


Many people fear that the need to run digital currency nodes to use Dapp will scare users away, but many tools, including Blockapps, can solve the problem. Metamask allows you to use digital currency functions in your browser without the need for nodes, the Alethzero or alethone that the digital currency officially provides is a client with an easy-to-use interface in development, Consensys is building a light purse lightwallet, These tools will make dapp easier to use. Light clients and horizontal shards (sharding) are also in the planning and development. This is an ecosystem of peers that can evolve a hybrid architecture.


Intelligent Contract Integrated Development Environment (IDE)


Ide. The digital currency officially produced the mix IDE used to write smart contracts, and I didn't use them, but I tried them as soon as possible.


Browser-based IDE. Solidity real-time compiler and Cosmo all allow you to quickly start writing smart contracts in your browser. You can even have these tools use your local node, just let the local node open a port (pay attention to security.) These tools sites must be trustworthy, and never put all of your assets in such a local node. Cosmo UI has instructions on how to use Geth to do this). After your smart contract has been debugged, you can use the development framework to add a user interface to it and package it into Dapp, which is exactly what truffle is doing, and the programming chapters that follow are explained in detail.


Ether.camp is developing another powerful enterprise browser IDE. Their IDE will support the sandbox test network, automatically generate the user interface for testing (instead of the manual writing test that will be shown later), and a test trading browser test.ether.camp. Before your contract is ready to go live, using their test network will be a good way to make sure that your smart contract works in a near-real environment. They also provide a trading browser Frontier.ether.camp for the official network, which can see the details of each transaction. At the time of writing, Ether.camp's IDE can only be registered by invitation and is expected to be released soon.


Examples of contracts and Dapp. Search for Dapp warehouses and. Sol files on GitHub to see what's interesting in progress. Here is a dapp large list: dapps.ethercasts.com, but some of these items are obsolete. There are some examples of contracts written by solidity and serpent on ether.fund/contracts, but it is unclear whether these examples have been tested or verified for correctness. The November 12 developer conference Dξvcon1 will have a full day of Dapp keynote speeches.


Process for deploying smart contracts


The process is as follows:


Start a digital currency node (for example, Geth or TESTRPC).
Compile * Smart contracts using solc*. = = Get binary code.
Deploy the compiled contract to the network. (This step consumes the etheric currency, and you need to sign the contract with your node's default address or the specified address.) = = Gets the contract's blockchain address and ABI (the JSON representation of the contract interface, including variables, events, and methods that can be called). The author is here to confuse the ABI with the contract interface. The ABI is a binary representation of the contract interface. )
Use the JavaScript API provided by Web3.js to invoke the contract. (depending on the type of call, it is possible to consume the etheric currency.) )

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.