Blockchains bring with them the promise of a more decentralized and fairer internet. Thanks to the newer generation of Blockchains like Ethereum which support Smart Contracts and Decentralized Applications, we are now able to run applications on the worlds largest distributed computer – the Ethereum network. But since this is a very new technology, very few people understand how to build efficiently on platforms like Ethereum. Let’s take a look at how decentralized applications are developed to gain a deeper understanding of the Ethereum platform.
What is a Decentralized Application?
A Decentralized Application (or DApp) is a piece of computer software that has its backend code running on a decentralized peer to peer network. DApps are different from traditional apps in this fashion as popular web apps run their backend code on centralized servers. Centralized content distribution networks suffer from a wide variety of problems ranging from censorship to preferential treatment of some services and frequent security breaches. The most significant advantage to running applications on a decentralized network is that applications are safer and more resilient to attempts to censor and hack. Since there is no individual ownership of the infrastructure that runs the network, it is much harder to coordinate a successful attack on the network.
How to Get Started With Making a Blockchain Application?
As with any programming language, it helps to have a basic understanding of programming concepts like Object Oriented Programming. Basic web development skills are also useful as almost all blockchain applications function with a frontend and a backend database.
Frontend – This is typically written in HTML and makes up the user interface of the application. The frontend of a blockchain application is really no different from that of a traditional web application. Frontend devices can use the same CDNs and other libraries that they use for conventional web applications.
Backend – The backend or the database is the part that remains on the ethereum network and connects with the frontend to provide its necessary function. The backend is built using smart contracts, which is merely a code that executes on the blockchain. Smart Contracts can be coded in Serpent (similar to Python), Mutan (identical to Go), LLL (identical to Lisp) and Solidity (similar to C++ with some JS concepts). However, blockchain architects should be careful to not use the blockchain for heavy computation. Heavy computation can still be relegated to centralized servers while maintaining the decentralization of the overall application. This modular design gives Ethereum its strength while also keeping the blockchain free of bloat.
Building Advanced Blockchain Applications
As with any other programming language, Blockchain applications are also seldom made from scratch. Instead, developers rely on Standard Development Kits or SDKs like uPort and others to help bootstrap their project and speed up development. Other useful tools to build a more advanced Ethereum application include:
Ethereum Client – Ethereum has a number of client applications in languages like C++, Go, Python, Haskell, etc. It is useful for the overall health of the network to have several different implementations as every implementation has its own merits. After a client is synced up with the blockchain and set up, it can be used to create wallets and send or receive ether.
Test Net – Running smart contracts on the Ethereum main network is going to cost developers a lot of Ether. So instead learners and developers use a local test network so that they do not have to download the entire blockchain and pay a lot of money to test their code. Test nets are also more useful since the blockchain is not bloated and used by several people in real time, they are much faster to use for development. Geth is the easiest way to set up a test network.
Solc Compiler – After writing a contract in Solidity, developers would require a way to compile the program – that’s where the solc compiler comes in handy. It is based on the C++ Ethereum library and is more efficient for larger programs than the browser-based Cosmo compiler.