DEV Community

Neelansh Mathur
Neelansh Mathur

Posted on

How is building in web3 different from building in web2?

Part of my learning process at the Polygon Fellowship 2022

Most of you are familiar with apps being built with a frontend and backend, using the countless languages and frameworks out there.

What is up with web3? What exactly is the technological difference in web2 and web3? Let's explore that.

Paradigm of web2 vs web3

Frontend

web3 doesn't reinvent the internet. In fact, it supplements it. You still need a website, UI design and other frontend principles in order to use Decentralized Applications (Dapps).

The difference is in the new concept of:

  1. Wallet Connection (Ex: MetaMask, WalletConnect)
  2. Smart Contract Interaction (Ex: EthersJS)
  3. Handling wallet and transaction states

You may have also noticed a trend in many dApps, especially Decentralized Finance (DeFi) apps, they have:
1) Central Card Layout
2) Gradient cards, backgrounds

It is hard to trace back exactly who started this, but Uniswap is the pioneer that may have popularized this.

Backend

Think of the backend components in web2. API routes, databases, server-side processing, etc. They are what you start working on when you create, say, a social media app, an e-commerce site, etc.

Now in web3, you have the blockchain technology as your backend. Your data will directly or indirectly come from smart contracts instead of APIs and Databases.

The Smart Contracts handle all the business logic and some amount of storage. For large storage, IPFS can be used.

Does blockchain tech replace the backend?
Absolutely...Not 👀
As I said, web3 is an addition, supplementary and will not replace existing tech.

In major blockchain applications, getting data from smart contracts can cost time and sometimes fail if the RPC is unresponsive. You would still want a database and API to query data collected from smart contracts from, say, events.

Examples: The Graph, Moralis.

The database doesn't have to be centralized, there are decentralized solutions available too.

Going forward, you can learn solidity from the official docs or check out free courses from Buildspace and CryptoZombies.

Conclusion

There are conceptual differences in building blockchain applications, but it cannot exist without the existing infrastructure of web2. It is an interesting piece of technology which I think is unlocking new ways we look at governance, money and decentralization.

Follow me to get updated on my blockchain journey as part of the Polygon Fellowship 2022 :)

Discussion (0)