DEV Community

Jesus Guerrero
Jesus Guerrero

Posted on • Updated on

Web 3.0 for mortals: An honest look at the next generation of the web

Cover

Introduction

Lately has emerged a lot of information and hype about Web 3.0 even though it is claimed as the future of the web I missed an honest take. Information about how to get your hands on, what useful products are made with it, the real benefits, the cons. I was looking for this rather than someone selling me the idea.

That's why in this article, we'll take an honest look at the next generation of the web:

  • A conceptual explanation
  • Examples of Web 3.0 apps
  • How the code looks like.
  • How to get started.
  • The cons

The concept "Web 3.0"

Before telling what web3.0 is about let's explain a little bit what were the previous generations were about. It can be summed up like this:

  • In the original web A.K.A Web 1.0 the information flowed in one direction and was static, it was from the sites to the users.
  • Web 2.0: Information started to be bidirectional, users interact with web apps feeding them with data (uploading photos, creating content, sharing, etc). Its pick was social apps, video/streaming apps as we know today.
  • Web 3.0 Aims to be a more semantic, intelligent, and decentralized web where Artificial Intelligence, Blockchain, crypto play the main role in web development.

Notice how each generation is built upon the necessity created by the previous one, In this case, the current Web 2.0 where our data is practically owned by big companies, that can censor us, and used it to whatever thing they put in their terms and conditions made the data centralized. The main task of the decentralized aspect that web3.0 introduces is privacy, security and brings ownership to the users; and here is where blockchain comes in.

What is Blockchain?

Basically, Blockchain is a way to store information where data is grouped together, secured by a crypto signature, and immutable, once created can't be changed instead a new block is created with the new information, which is known as a block. Every block saves a reference of the previous block as well as the next one if exists, the information is chained together in chronological order.

But in addition, Blockchain is responsible for keeping this information in the main ledger that will work as a source of truth and can be read by anyone. This is replicated in multiple computers known as nodes that also have the role of adding new blocks to the chain and share with the network in order to be validated and finally added in the main ledger.

Ethereum

There are many implementations of blockchain but here I am going to cover The Ethereum Blockchain that not only saves transactions and state data but also serves as a platform to run programs called Smart Contracts (we'll talk a little more about them below) this is the difference between Ethereum blockchain and others like Bitcoin Blockchain (not the cryptocurrency).

Ethereum is a technology that lets you send cryptocurrency to anyone for a small fee. It also powers applications that everyone can use and no one can take down.

It's the world's programmable blockchain

Ethereum works like a big computer, that uses the resources of its nodes as one and every node in the network is running a system called The Ethereum Virtual Machine(EVM) this is the one that allows us to run programs on the Blockchain.

Talk is cheap, show me the code

Now that we are familiar with the concept let's see what a blockchain developer does and how the programs look like.

The resulting program for the Ethereum Blockchain is known as Smart Contract. There are high-level languages that compile the code to EVM language, Solidity is the most popular and has some similarities with javascript but there are others like Serpent and LLL (Lisp Like Language).

This is how a hello world would look like in Solidity:

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

contract Greeter {
    string private greeting = "Hello world";

    function greet() public view returns (string memory) {
        return greeting;
    }
}
Enter fullscreen mode Exit fullscreen mode

The first line is an instruction for the compiler setting the version of Solidity due to breaking changes of the latest versions with the previous ones, It is a strongly typed language. Here is a variable definition and how a function is defined. Don't worry I'll let you sources to learn more about it here I just wanted to show how the code looks like to give you an idea.

Smart Contracts will behave as our backend and can be connected to a frontend to create a Decentralized App (Dapp)

Live Examples

The most common examples fall into categories like finance, games and marketplace. Some of the Dapps that standout are:

  • Brave Browser: Brave made a reimplementation of how ads work in browsers offering tokens to users to see ads and selecting the frequency they want to see them. Those tokens can be used to support content creators and exchange for future services.
  • Open Sea: Digital Art Market Place where web artists can sell digital resources (image, video, audio, or 3D art)
  • Gitcoin: That allows users to earn money building open-source public projects.

How to get started

There's a gamified tutorial that can serve as a practical introduction with the Solidity language and dapps called cryptozombies

After grasp some of the main concepts of Solidity you can go and install hardhat to create your own contracts and test, deploy in your own local development environment

Connect the smart contract with a frontend (can be your framework of choice) ether.js is a lightweight, ESM ready package to interact with smart contracts in javascript.

Blockchain challenges.

It isn't all roses in blockchain, every new block created requires a strong amount of computation to solves a Proof of work the first node to solve that problem ends up adding the new block to the blockchain and emit the change to all other nodes.

How Ethereum incentives nodes to spend those resources in solving the proof of work fast, and how to prevent developers and its smart contracts from consuming all resources with an accidental infinite loop for example. The answer was paying.

The first to solve a proof of work receives a payment from the network, and every transaction requires payment so if an infinite loop consuming resources is introduced in a small contract it will stop when it has nothing to pay. The fee payments are in Ether(ETH) the cryptocurrency of Ethereum.

Cons

  • It is expensive to develop apps in the blockchain because of the cost associated with every transaction
  • Computation requires a lot of energy currently
  • Transactions are slow compared with web 2.0
  • The extra steps, software, and education can be a barrier for new developers and by extension the main adoption

Conclusion.

The main concerns of web 3.0 are interesting and a big contrast of how we see and apply the web today

It opens a lot of possibilities and I am willing to see how it evolves in the near future and how it creates conditions to make development more affordable to expand the vision of a more secure, decentralized and private web.

Thanks for reading. I hope the article helps to bring some clarity on the topic if you have any questions the comments are open, or if you like Twitter as well as my Github where I do some experiments and projects.

Have a good day.

Resouces

Top comments (2)

Collapse
 
lil5 profile image
Lucian I. Last

I fear that Web 3.0 is a trap.
Technology is only as good as it's usefulness.

Currently the planet is going down a spiral of human induced destruction. So IMO technology should be adapted to halt, heal or defend-against this existential crisis.

I'm so sorry but Crypo (not as the technology but rather as a valuta) is not future proof;

  1. It depends on the Internet continuing to work during a tsunami or other natural disaster
  2. As long as the cost of GPUs + electricity is lower than the "worth" of crypto, it will suck as much power as electricity providers are willing to put up with, daily with wind and solar - nightly with gas and coal.
  3. It falls short in its initial spirit: the winners of crypto are not the poor, those are buying in to the idea, then fall pry to scams or bad luck without fallback, thus control evermore fastens at the top.

The true technologies of the next Web lie in their usefulness during wild fires, famine & flooding. These technologies come to mind; P2P networks, immutable blockchain databases for user authenticity, compression algorithms.

Collapse
 
jesusantguerrero profile image
Jesus Guerrero • Edited

Thanks for the comment Lucian.

I have many doubts too. Good brakedown but they have some points.

But two points:

  • A lot of the things we have today depends on internet and can be damaged by natural disasters.

  • Web 3.0 is not only limited to Blockchain and crypto so saying it is a trap is not fair at all.

But Blockchain or whatever solution that solves the descentralization problem have to be faster, more scalable, less expensive and should consume less energy than the current one, because if not, those things can't supply the requirements and use cases that the current web 2 has solved.

They identified the problem and are iterating with the solutions the current one it is not the perfect one and they are aware of this.