Back

The Definitive Guide to Understanding Web3

The Definitive Guide to Understanding Web3

As a developer, you must have heard the following terms “web3”, “blockchain”, or “cryptocurrency” whether in the news, in the office, or when talking to a friend. As of last year, there was much hype around web3 and the cryptocurrency space. You might be wondering ‘what’s fueling all this hype?’, ‘Is the new technology here to stay?’, ‘what is the whole web3 about?’, ‘What problems does it solve?’. To answer all these questions, we first need to understand the history and progression of the web and what has led us here.

The progression of the web

The web, as we know it has come a long way from its inception(web1). Let’s take a journey and see how we have arrived here. Let’s go back to the 1980s where it all started.

web progression

Web1.0 otherwise known as the read-only internet was the first adoption of the internet where companies built web pages with HTML, and on open protocols like HTTP and people could only read what was displayed or shown to them. There was no interactivity with these websites, and users could not add their information to the websites, making it a little unsatisfying for the internet users of that time.

Web2.0 - With Web1.0, it had become costly for companies to keep on creating these read-only websites and it became kind of a necessity for internet users to create and upload their content. That is how web2.0 was born. In the mid-2000s, lots of companies created businesses and services that allowed more people to create and upload content for zero cost. These services made developers lives easier. This was nice at first, but then came one of the biggest problems of web2.0 which was ownership.

Developers wanting to make building and shipping a product a lot easier went from using open protocols to using closed APIs belonging to big corporations like Facebook and Twitter. Meaning if there were to be any crash to any of the corporations the developers relied on for their application to work, it would lead to a crash in these apps. Now the question remains, what is web3?

What is web3

Now developers have seen that completely depending on other platforms is a huge risk, the need for a decentralized system was important and web3.0 was born. You can look at web3 as the next version of the web which is more secure and user focused. It solves the problem of trust when it comes to finance between people or organisations. The term “Web3” was coined by ****Ethereum co-founder Gavin Wood in 2014. The term is used a lot, and the main take-away is it being a decentralized ecosystem that is built on the blockchain, which is why we need to understand decentralization and the existing blockchain technology.

Decentralized meaning, there is no central governance or authority to dictate how something should run or make decisions that affect an entity. The power to make decisions is now distributed to groups of individuals.

Web3.0, therefore, is an internet that is owned by users and builders as developers no longer need to rely on third-party enterprise software for their apps to function and users can create their content and own it without any interference by any corporation. Web3.0 is a widely used term and you’ll hear “buzz words” like blockchain and cryptocurrency along the way.

Please note that web3.0, blockchain, and cryptocurrency mean different things. Cryptocurrency can simply be seen as a digital currency used as a medium of exchange to replace fiat currencies (government-issue currency not backed up by a commodity such as gold).

What is a blockchain?

Photo by Shubham Dhage on Unsplash

You know how in web2, information is stored in a central database and hosted on servers, leading to the whole issue of ownership, that’s where blockchain comes in as it introduces a new way of processing and storing data. Blockchain technology is built on the idea of peer-to-peer technology where data is stored in blocks/nodes and each block is then linked to its predecessor by use of cryptography. This process of storing and processing data allows for security and trust between users of the system.

The web3 ecosystem We have looked at the progression of the web, what web3 is and what a blockchain does, now let’s dive into the ecosystem of the new internet. A lot is going on on web3, as it is a fast-paced space with a lot of new ways to do things popping out now, and then. For now, the major web3 trends are:

  • Decentralized autonomous organization(DAO) - Just like the blockchain with no central authority, a DAO is built on blockchain technology. It is a virtual organization without any leader or central authority so every action taken by such an organization is transparent.

  • Non-fungible token (NFT) - Unlike fungible tokens like ethereum with its value being interchangeable meaning you can trade 1 ETH for another 1 ETH and the value will remain the same, NFT’s are not interchangeable as an NFT will differ in value to another NFT. The main reason NFT’s have become such a trend is the ability to easily buy, own and sell digital products ranging from art to videos and even songs, etc.

  • Decentralized finance(DEFI)- Decentralized finance being one of the most useful technologies to come out in the web3 space allows for secure, fast, trustworthy, and seamless financial transactions without the need for any third-party like the bank or brokerage. It uses smart contracts built upon the blockchain meaning the code is the law.

There is still a plethora of implementations in the web3 ecosystem. Gaming and metaverse are also some of the implementations of blockchain technology becoming popular. The best way to keep up with most of the ecosystem is really to start doing a lot of research and reading publications that publish web3 content.

Technologies used by developers in web3

As a developer, you might be wondering what are the technologies used to build web3 and how you can get started. If you are the type of developer that gets excited about new technologies and likes to experiment with them, then you’re making the right step. Building on web3 brings an entirely new way of thinking and implementing ideas. Developers build on web3 either by building the core of the blockchain or accessing the power of the blockchain to build decentralized applications.

What is a dApp As a web2 developer getting into web3, you’ll likely start by building a decentralized application (dApp). Just like the regular applications you build as web apps or apps in the play store, decentralized applications are just like normal applications, but this time, they are built on the blockchain. A dApp consists of the frontend and backend.

Frontend - The frontend of a dApp is not particularly special as it is built the same way frontends are built in web2 which uses HTML, CSS, and javascript which is the tech stack. You can also use any frontend framework as it does not matter what you use.

Backend - the backend of a dApp is what we call a smart contract. This smart contract can be written in a wide variety of programming languages. The most popular blockchain which is ethereum has smart contracts built on it with the solidity programming language.

Let’s look at how a dApp is built in the next section.

Building a dApp

So far, we have looked at what a decentralized application is, and the technologies used in building these dApps. In this section let’s discuss how we can build a dApp and the tools we will be needing. As we saw in the last section, a typical dApp consists of a frontend, a backend. But how does the dApp work?.

How does a dApp work The only difference between the frontend of a web2 app and the frontend of a dApp is the way user authentication works. In our dApp we do not need to collect a user name and password or use a third-party service to authenticate. All the data belongs to the user. The way authentication works in a dApp is the user has a public wallet with an address and a private key that is used to sign transactions on the wallet account.

Your private key is not to be shared with anyone as you can potentially lose all control of your wallet or all your funds if the private key is exposed.

Users of your site can connect the site to a browser plugin like metamask. Once metamask is connected to the site, the frontend connection to metamask allows the user to perform tasks like purchasing an item or sending a token to someone else. In our frontend code, to connect to the metamask wallet, we need libraries like web3.js and ether.js to make accessing and performing operations on our wallet easier to handle.

To build the backend for our dApp application, in this case, a backend for a dApp on the ethereum blockchain, we need tools like hardhat and truffle to streamline our development experience. Using this kind of tools prepares a development environment for you and you can start writing your solidity code. With a simple command, you can deploy your contract.

Open Source Session Replay

OpenReplay is an open-source, session replay suite that lets you see what users do on your web app, helping you troubleshoot issues faster. OpenReplay is self-hosted for full control over your data.

replayer.png

Start enjoying your debugging experience - start using OpenReplay for free.

Where to start

If this has gotten you interested, there are a plethora of resources out there for you to get started. I’ll mention a few below:

You can follow these YouTubers :

  • EatTheBlocks for quick tutorials on explaining web3 terms and concepts.
  • DappUniversity for complete tutorial on solidity development and latest web3 news.

Conclusion

One of the peculiarities of being a developer is keeping up to date on new technologies in the development space. Web3 is one of the hot topics that has been discussed a lot lately and it was time to learn about it and see if it’s something you want to jump into or not.

I hope you go further from here and build interesting things in web3. The web3 space is a fast-growing environment with a lot of new implementations coming out, so you’ll do well to keep up with it :). If you have any questions you can reach out to me on Twitter.

newsletter