Want to learn about one of the central components of Web 3 that can earn you millions of bucks?
Let's learn about dApps and how you can get started!
A thread. ↓
1. The internet today
Nearly all websites you visit every day are a perfect model of how the internet works today.
Someone creates a service (a website, e.g.), hosts it somewhere, and has it under complete control.
If you own an app, you decide what happens. You store the data. You can often decide what you do with it.
And most importantly: You can prevent certain users from participating if you don't feel like they deserve to be around.
A client is distributed by hardware under your control and talks to software you built on servers you control.
This is a centralized architecture, and it works well.
Everything is controlled by one entity that manages the service.
2. Enter dApps
dApp is short for decentralized application.
Those applications basically live on a blockchain.
They have no dedicated backend other than the blockchain.
Their APIs are composed of smart contracts executed by blockchain nodes.
Their frontends are often distributed through decentralized systems, although many dApps are still distributed through traditional channels like web hosters.
All data of a dApp is stored on a blockchain and is thus distributed.
No one has complete control over it.
A dApp exists of two components (like traditional apps):
1. A backend (smart contracts deployed to a blockchain) 2. A frontend (hosted somewhere, downloaded by you, executed in your browser)
To create more trust among its users, dApps are often fully open source.
If both source code and development are transparent, people can always see what exactly happens because there are no curtains.
This is, however, not a requirement for any dApp.
3. The goals of dApps
The goal of a dApp is to build a community-powered application that users can trust.
No central entity should control the app, its users, and the data behind it.
Everything is publicly available, and everyone can transparently check what exactly is going on in the dApp at any time.
This helps with detecting potential frauds or misbehavior.
A dApp can leverage the computing power of a whole blockchain network.
The more miners or validators there are, the more computing power to execute smart contract logic.
This helps scalability as long as the blockchain scales.
Thanks to being based on a blockchain, a dApp can leverage cryptocurrencies for payments.
Especially users coming from heavily sanctioned countries or with questionable state authorities can still participate.
4. Nuances of dApps
A full dApp is achievable but sometimes not possible.
This is why there are nuances of dApps.
Some dApps still employ a traditional backend and only partially use blockchain technology.
You could, however, argue that those are no real dApps.
Some dApps only consist of a frontend and leverage existing smart contracts to create something entirely new.
They don't rely on their own smart contract logic and orchestrate existing functionality into something completely new.
5. How to get started
You can start with very little and work your way up slowly.
Get to know a few of the more popular client libraries you will need to interface with blockchains at all.
1. Web3.js 2. ethers.js
Then integrate MetaMask into your frontend, for example.
It's a browser extension that gives you a fully-fledged web wallet.
It's used to:
- Authenticate users
- Sign transactions
- Keep track of crypto and more
Do you know what many dApp developers struggle with?
Which data to put on-chain. More data on the chain can drive the cost up. Too much data might render your app unusable. Storing fewer data might not be an option.
Here are some ideas for you to fix this.
A thread. ↓
1. Use A Dedicated Database
This approach will make your dApp into an app.
If you bring in central data storage, you can circumvent the limits of some blockchains, but it doesn't keep the promise of being decentralized.
You can store anything that you can't store on-chain in your database and associate it with a user.
Whenever you need that type of data, you fetch it from your database.
From time to time you read the term Web 3.0. For many of us, however, this term is still mysterious.
Time to shed some light on it and explain what it actually is all about!
A thread. ↓
1. The Web Today
The web as we know it today is actually already Web 2.0.
It is an extension of the original Web (1.0).
In the beginning, the web was meant for websites to provide information and users to consume it.
Web 2.0 changed this and brought the user into the game.
Users started to create the content themselves, while websites became the platform to distribute this new content instead of only consuming information.