You might have seen a barrage of mentions about Web 3.0, if you follow a certain group of people on Twitter. You probably read enough to get an idea. If you have not and also never heard of Web 3.0, read along.
What is Web 1.0?
The first iteration of the internet was largely “read-only”. Users could visit webpages, click on hyperlinks, look at pictures, and consume content passively. These pages were hosted on Web Servers and the technology stack was made up of HTML and CSS.
Web 2.0
The transition to Web 2.0 was quiet and then exploded as interactivity increased. A typical Web 2.0 website/application includes:
Database
Backend code (written in a language like Node.js, Java) for business logic
Frontend code (written in JavaScript, HTML, CSS) for UI logic
Now, let’s talk about Web 3.0
Web 3.0’s big promise is it to eliminate the middleman. There is no centralized database and no single web server to house the business logic.
Where do you store application state then? You store the application state on a blockchain which is maintained by anonymous nodes on the internet.
The data that is written to the chain is immutable and can never be updated. Bitcoin and Ethereum are examples of Blockchains. Ethereum supports running programs called smart contracts. You can write logic that defines the state changes. This logic is executed on Ethereum Virtual Machine (EVM) to process state changes which are globally accessible.
What about the Front-end? Before we talk about how your front-end can interact with the blockchain, let’s talk about something else first. Keep in mind, blockchains like Ethereum are on a decentralized network. Every node keeps a copy of all the states. When your front-end application (built using JS, HTML, CSS) needs to interact with the blockchain (to read or write state), you need to interact with one of the nodes (you could do this via a ‘provider’ (like Infura, Alchemy). A miner will then execute the transaction and propagate the state change to all the other nodes on the network.
Don’t worry, I will break all this down, over my next few posts.