This lesson starts with an introduction to decentralized applications, or dApps. Next, we’ll compare dApps with regular web apps to see how they’re different. We’ll look at the benefits of using dApps over web apps, and also consider some of their drawbacks. This way, you’ll get a clear picture of what dApps offer in today’s digital world.
Table of Contents
Introduction to dApps
A standard web app, such as Facebook or Amazon, is owned and maintained by an organisation. This organisation has the full authority over the app and how it operates. There may be multiple users on one side, but the backend is controlled by a single organisation. To compare this to dApps: a developer can create a Facebook-like dApp and put it on a blockchain, where any user can use it. Once a message is posted, not even the app creators can delete the messages.
Since Bitcoin launched in 2009, different blockchain protocols have been developed and refined to unlock new functionalities and use cases. The industry of decentralised applications (dApps) – applications that run on top of blockchain networks – is growing rapidly. These dApps rely on blockchain protocols to process the data and execute transactions with smart contracts. As described in the previous lesson, a smart contract is a self-executing code that carries out a set of instructions. These executions are then verified on the blockchain. These contracts are trustless, autonomous, decentralised and transparent. Once deployed, they are irreversible and unmodifiable. These smart contracts are the key element of the dApp technology.
Just like developers build applications for mobile and desktop devices, dApp developers create applications to function on specific blockchain networks. The vast majority of dApp development is on the Ethereum blockchain.
Deeper dive in web apps vs dApps
Traditional web applications depend on two main elements: the front end and the back end. Web applications use software that runs on centralised web servers. Computers and servers communicate via messages through the HTTP protocol. For instance, when you open Facebook on your web browser, the feed on your display (the front end) is drawn from data that is being stored on the company’s web server (the back end).
On the front end, decentralised apps and websites use the same technology to render a page on the internet. On the back end, dApps interact with the blockchain network that they are build on. This communication runs through a “wallet,” which serves as a bridge to the blockchain ecosystem. Web apps channel data through (massive) centralised servers. While the user experience of a well-designed dApp may not seem so different from a web app, it differs from the latter in that it lacks servers, potential censorship and potential data manipulations.
The mentioned “wallets” manage your blockchain address and the cryptographic keys necessary to identify and authenticate yourself. Instead of using the HTTP protocol to communicate with the servers, dApp wallets trigger smart contracts that interact with the blockchain. Summarised, dApps contain a front-end user interface that communicates with smart contracts that transact on the blockchain. At that point, the validation mechanism behind the blockchain validates and confirms the dApp data.
Benefits of dApps vs web apps
- Zero downtime
Once the smart contract is deployed and on the blockchain, the network as a whole will always be able to serve clients looking to interact with the contract. Web apps can go down if the centralised servers run into issues. Also, hackers who try to attack individual dApps don’t stand a chance. - Trustless computation and verifiable behaviour
When we use online banking systems, we must trust that financial institutions will not misuse our financial data or tamper with our records. Smart contracts execute in pre-determined and therefore predictable ways, without the need to trust a central authority. - Resistance to censorship
No single entity on the network can block users from submitting transactions, deploying dApps or reading data from the blockchain. - Privacy
You donβt need to provide your real-world identity to interact with a dApp. - Complete data integrity
Data stored on the blockchain is immutable and indisputable. No single entity on the network can forge transactions or other data that has already been made public.
Disadvantages of dApps vs web apps
- User experience
It may be harder to engineer user-friendly experiences because the average end-user might find it too difficult to interact with the blockchain in a truly secure manner. - Maintenance
DApps can be harder to maintain. The code and data published to the blockchain are harder to modify. Itβs harder for developers to make updates to their dApps once they are deployed compared to web apps. - Network congestion
When one dApp uses too many computational resources, the entire network gets backed up. For example, the Ethereum network can only process about 10-15 transactions per second. When transactions are being sent in faster than this, the amount of unconfirmed transactions can quickly increase.