TLDR; Blockchain is a database!
In this post, you’ll understand blockchain based on the comparison a traditional web application and a blockchain application. Moreover, you’ll learn about Smart Contracts and Distributed Applications (DApps) as a bonus!
A Traditional Web Application
Now, I have a million dollar question: How would you build an application on top of blockchain instead using a web back-end database?
A Blockchain Application
So, how would you build an application on a blockchain?: Well, it would work a little bit differently. Instead of connecting directly to a server, you’ll access the client side application via a browser. However, this client-side application won’t talk to a web back-end in a database, instead it’s gonna actually talk directly to the blockchain. And, on the blockchain, you’ll have code that’s written with Etherium smart contracts that will contain all of the business logic for your application. Moreover, all the items are gonna be stored on the blockchain itself and that’s fundamentally how a blockchain application would work and how it’s different from a traditional web application.
So that might bring up a lot of questions like “well, how do you connect a blockchain?” and “how does the blockchain work?”..
What is blockchain?
Your client-side application is actually talking to a blockchain which is a peer-to-peer network of nodes that all talk to one another. It's a distributed network so there are actually different computers or machines that talk to another.
You can connect to an individual node on the blockchain in order to use it and that’s what your web applications doing here. All of the nodes on the network participate in running the network and they all contain a copy of the code on the blockchain. All of the data on the blockchain is contained in bundles of records called blocks which are chained together to make up the blockchain.
The public ledger is secure and unchangeable and that’s what makes blockchain so powerful!
What is smart contract?
What about the code on the blockchain? Well, all the blockchain is contained in smart contracts which are basically just programs that run on the blockchain. Smart contracts are written in a programming language called solidity. The smart contract is immutable which that means it’s unchangeable so whenever you deployed to the blockchain you won’t be able to update that code and that’s important understand that’s what makes the blockchain so secure!
I actually think about smart contracts kind of like micro services on the web. They’re on the blockchain and they read and write data from the blockchain. They do stuff with it, and they execute business logic.
What is Distributed Application (DApp)?
Distributed Applications (DApps) are software applications that are stored and executed mostly on cloud computing platforms and that run on multiple systems simultaneously. In contrast, a traditional app utilizes one dedicated system to achieve an assigned task.
A decentralized application (DApp) is an application built on a decentralized network that combines a smart contract and a front-end user interface.
In this post, you learned blockchain, smart contract and decentralized applications! Now, you know what blockchain means! YAY!