views
Blockchain and decentralized applications
With blockchain innovation came the advancement of dApps , applications that never again rely upon focal programming for their activity, however are dispersed across large number of gadgets that speak with
each other over Internet channels. Bitcoin and other cryptocurrency systems are examples of decentralized applications , decentralized app developer which do not need intermediaries to host or manage the code or user data.
The development of decentralized applications is not subject to the authorization of any central entity, which, by design, does not exist as such. The most commonly used platform to run dApps is Ethereum , where more than a thousand applications of this type have been built.
Traditional App Development vs. dApp Development
Perhaps the primary difference between decentralized and traditional applications in terms of their development is the level of detail with which the dApp code is analyzed before being released . In this sense, an analogy can be made with the development of hardware, which is also as rigorous as the budgets and the firm behind them allows it, in the first case, and demands it, in the second.
As with hardware, dApp testing prior to launch is usually quite strict, as the costs of releasing a poor product to the public are often quite high, also affecting the reputation of the manufacturer . The smart contracts coded in the development of a dApp cannot be modified once released on the mainnet, and errors in their programming cast doubt on the professional skill of their developers and put users’ money at risk.
In the development of traditional applications, what is sought is to launch a minimum viable product (MVP) on the market, which is why it is customary to use rapid iteration cycles. The software is considered ready for the public to use and then the necessary patches or updated versions of the software are released as soon as possible.
When it comes to security, formal code verification is much more prevalent in decentralized app development . This process consists of checking if an algorithm meets certain logical requirements. Verification tools like Coq and Isabelle are often used to prove that a program is free of errors.
dApp development tools
Among the many existing tools, the most used by decentralized application developers are:
Parity
Parity is an Ethereum client written in a recent low-level language called Rust. Modularly structured , Parity offers an advanced command line, multiple consensus mechanisms, and minimal storage and memory footprint. Thanks to the number of projects that use this tool, decentralized finance development services during the attack that the Parity wallet suffered on July 19, 2017, a group of white hat hackers intervened in the wallets that had not yet been emptied, being able to save some 514,000 ETH , which for back then they were worth more than $100 million.
Truffle
The Truffle framework is used by companies such as ShapeShift, Digix Global, and STABL. It comprises tools to create, compile, test, and deploy dApps in an agile manner .
In addition to those mentioned, we have Listener, which runs static analysis on smart contracts, Remix, a Solidity editor and compiler for browsers, and EthPM, a package manager for Ethereum.
The best practices for the development of dApps (Consensys) are available on Github, and there are third parties that perform audit work on smart contracts implemented on the Ethereum tesnet, such as Zeppelin. For those who want to test their smart contract security skills, Zeppelin has a game called “The Ethernaut” where, in order to advance, participants must be able to hack the contract for each level .
Smart contracts are only one part of dApps
The source code of decentralized applications actually contains a small portion of smart contracts, constituting a minor percentage of the total code.
In the case of Storj , the decentralized cloud storage, smart contracts, whose function is to support the logic of transactions, occupy only 9% of the code . The programming that is in charge of the encryption and protection of shared files, the use of the hard disk or the way in which the nodes are updated, is in a separate module, written in NodeJS. Golem smart contracts occupy a smaller percentage, 3%. The main code, in charge of carrying out the rest of the functions, is written in Python.
Smart contracts are on-chain, which means that the code directly interacts with the blockchain. By contrast, defi development off-chain code does not directly relate to it.
New development platforms
To code decentralized applications on Ethereum it is necessary to master a custom programming language. However, there are next-generation development platforms that support the use of traditional languages (JavaScript and Python, for example), such as Tendermint and Cosmos .
tendermint
Tendermint is made up of two elements: the blockchain consensus engine ( Tendermint Core ) and the generic application interface. Tendermint Core ensures that all transactions are logged in at the same time, in the same sequence, on all machines , thus achieving Byzantine fault tolerance. ABCI (Application Blockchain Code Interface) is the name of the interface, it runs on top of Tendermint Core and supports many programming languages to process transactions.
Cosmos
The Cosmos platform is based on Tendermint , which allows you to use any programming language to build interoperable decentralized applications belonging to different chains. If you want to develop a more independent and flexible dApp, you can develop it on your own blockchain, and avoid the complications of other networks, such as their consensus mechanisms.
For less ambitious applications that do not require their own blockchain, you can go to Ethermint , an environment with better performance than Ethereum and all of its capabilities available.
blockstack
On the new Blockstack dApp development platform, users are the owners of their personal data. In this case, applications run off-chain , using the JSON REST API to communicate with the underlying Blockstack core.
Applications can be written in a variety of languages. Additionally, Blockstack offers a tutorial showing how dApps can be built on their platform.