Block Chain For Web Developers

Block Chain For Web Developers

The word Blockchain is pretty popular among developers, and many are curious to know more about it. Most articles on the internet are scaring people with a lot of technical jargon. In this article, I aim to simplify it for existing web developers.

Let's first understand how a typical web application works without blockchain. A website, after coding, is uploaded to a server, which serves the user's request. This server also connects to the database to fetch and dynamically deliver data to the user.

Now let us see how blockchain is different from this former setup. A web app built using blockchain is called a web3 application, and most of the other web applications we use today without blockchain are called web3 applications. As a web2 application has a front end and a back end, a blockchain application has two parts. The major components of a web3 app are the front end and smart contracts. So as you might have guessed, the front-end parts of a web2 and web3 application are similar.

Smart Contracts are code written a particular programming language which varies depending on the blockchain we choose. For Ethereum, the programming language used is solidity. These smart contracts will have functions to add and remove data from the blockchain. These smart contracts are then published to the blockchain, a chain of nodes(computers) that serves the function of a backend server but in a decentralized manner. When published, smart contracts will generate an ABI(Application Binary Interface) and return an address.

The front end uses the ABI and the address to interact with the blockchain. The connection to the blockchain is made using a wallet. Any user can execute different functions in the smart contract using a UI interface in the front end if the function being executed changes the data in the blockchain, some fees need to be paid. These fees are called gas fees, which are paid using a wallet connected to the application.