DApps vs Conventional Web Apps - What's the Difference?

Do repost and rate:

With the rising popularity of blockchain development and the number of dApps popping up every day, it's easy to get lost in understanding how a dApp differs from a standard web app.

A conventional web app will have a front end, typically written in HTML, CSS, JavaScript that will define the user interface. Then there's the backend code, which is typically written in NodeJS, Java or Python that will define the logic. And finally, there must be a place to store all the essential data, such as users posts, comments, likes and so on, which requires a database.

If we compare, a fully decentralized application will have the last two steps completed on the blockchain. 

Back-end code that defines app logic will be executed by smart contracts, while data that needs to be persisted will be stored on the blockchain ledger.

You might be asking, how do we actually connect our app to the blockchain so we can run our apps, codes, and store information? 

Before we get into that, we need to remember what a blockchain is. We know that a conventional database is a single source of information or truth. If you want to get data from a database, you typically make a get request to the server, or you'd make an API call to communicate to this single source.

Now, blockchain in the simplest terms is just a distributed ledger. You can think of it almost like a distributed database, except with a couple of big differences. The first is that it's a ledger. A LEDGER is a record of transactions completed by the network. 

The reason it's called a blockchain is that each transaction is represented as a block, and every following transaction is appended to the previous block, forming a chain. The reason blockchain is often referred to as decentralized is that this ledger is not stored in a single place like typical databases or servers. 

It's distributed among several nodes, and these nodes are responsible for validating the transactions that will append the chain. A node is where. The blockchain lives. Because every node has an identical record of all transactions, it's nearly impossible to tamper, modify, or delete information on the blockchain. 

So for us to allow our app to access information from the blockchain, from the ledger, or to make transactions append the ledger, we need to be connected to a node. There are two ways to do this. You can either run and operate your own node or much more preferably and most commonly use nodes provided by third-party services like Infura, Alchemy, and Quicknode, just to name a few. 

The nodes you connect with when you need to interact with the blockchain are called providers. Once you connect to the blockchain through a provider, you can read data stored on the blockchain. But if you want to write data on the blockchain or create a transaction, you'll need to sign the transaction using your crypto wallet's private key. 

This signing of the transaction is where METAMASK typically comes in. MetaMask is a crypto wallet plugin for the browser that stores our private keys. And whenever our front end needs the user to sign a transaction, it calls on MetaMask and it pops up in the corner. 

And that brings us to the end of this article. dApps may seem to be quite confusing at first glance, however, I hope that this quick article has provided some insight into how dApps differ from standard web apps.

Regulation and Society adoption

Events&meetings

Blockchain News

Ждем новостей

Нет новых страниц

Следующая новость