How are dApps developed

Tech blog

DApps - short for Decentralized Applications - are programs that use blockchain and other technologies without a central server. It is pronounced "Dap". They run on many computers at the same time, so they are decentralized. Since the programs are widely distributed, they are difficult to attack; people like to speak of “unstoppable apps” here. Another big advantage: if the programs are programmed correctly, they automatically scale with the number of users, as the users participate in the distribution of the program. In this case, more users automatically means even greater reach.

There are currently two major frameworks for developing DApps: Truffle and Embark. Truffle (Link) is already well established in the blockchain environment. Embark (Link) is even less known, so I would like to introduce it today.

Build DApps with Embark

In terms of functionality, truffle and embark can be compared. However, Embark comes with an environment for full-fledged DApp front-end development. If you want, you can use the integrated build process to build your web front end and easily configure it according to your personal project requirements. Deployment can either be done automatically or from within the project itself using a JavaScript function. By default, Embark pays attention to file changes and packs the smart contracts into the familiar web3js objects.

So that the DApp can be really decentralized, Embark also directly supports the use of IPFS (Link) and swarm (Link) for decentralized storage of the DApp (more in the article by Frank Polster on heise-developer); and Orbit (Link) and Whisper (Link) for decentralized communication. For example, Orbit is able to send messages over an IPFS-based peer-to-peer network. A great advantage of this is that messages do not have to be managed by a central entity or can be changed. In addition, you save yourself the trip to the central instance: if, for example, two people are talking in Munich and Frankfurt, a relatively direct route can usually be used. In contrast to conventional communication systems, the messages do not first have to be sent to servers (which can also be located in the USA), which in turn forward the messages to Munich.

On request, Embark can also start an http server directly, with which the DApp can be started and tested locally - very helpful for development work.

Fewer? Is also possible

Even if you prefer to have your own structure, use incompatible technologies or develop completely without JavaScript, Embark can help. All additional modules, such as the http server, IPFS or the web3js integration, can easily be switched off. This is particularly useful in this area, as there are constantly new tools and approaches that often cannot be directly supported by frameworks. At the time of this article, Truffle still doesn't support web3js 1.0, unlike Embark, by the way. In its simplest form, Embark only deployed the smart contracts and created JSON files with all relevant information, such as ABI or address. These can then be used very easily in any environment.

In addition, Embark of course offers standards that apply to smart contract development: tests, deployment on various Ethereum chains and a detailed configuration of deployment options, such as gas parameters or the transfer of already deployed contracts in the constructor.

In general, a lot can be set with Embark, which makes work very pleasant for developers who are reluctant to be hindered by well-intentioned or technical restrictions in frameworks. From a full-fledged framework that supports everything to a thin layer between DApp and blockchain, everything is possible.

Not to be forgotten, of course, is the stylish dashboard that provides standard information about the current activities of Embark and shows the status of available services such as http servers or Whisper.

It is also practical to control the local Geth node via Embark. With the simple command "embark blockchain" a geth node is started with a local development blockchain. A connection to the Ropsten Testnet is established with “embark blockchain testnet”. Further options such as deployment to the mainnet are possible. Of course, many parameters of the Geth node can be defined in the project.

Further information and resources are available

Tweet Share Share on LinkedIn