Episode 11 - Decentralized Apps (DApps)
Blockchains, just by themselves, are a collection of nodes sharing data and agreeing on its state. To make blockchains useful for the end-users, applications are built on top of them. Simply put, applications which use a decentralized backend (like a blockchain), are called Decentralized Applications or DApps.
Any user-facing software application mainly has two primary components — Frontend and Backend. The frontend is what the user interacts with while the backend provides the data and processing logic. Similarly, DApps also have these two components, but their backend is a blockchain network instead of a single server.
DApps usually provide better ways of communicating with blockchains by adding an abstraction layer on top. One of the best practices with DApps design is that the end-user should get the same user experience as they would get with any other conventional application, while also enjoying the security and decentralization provided by blockchains.
DApps are built in such a way that the frontend could connect to any node in the blockchain network. The business logic for DApps is generally written in smart contracts. In most scenarios, to enable scalability, only the critical business logic is put on the chain in smart contracts while the rest of it stays in conventional systems and services.
Sometimes a DApp may have multiple decentralized backends for optimizations and better decentralization. For example, the business logic is written in smart contracts on a blockchain while the data is stored in decentralized storage systems like IPFS. The DApp frontend then connects to these systems to provide a unified interface to the user.
A simple example of a DApp is software wallet applications that allow the user to query and transfer balance on a blockchain while interacting with a familiar user-interface.