Welcome
This is my exhaustive personal opinions, brain dump, study notes, guide, curated resources on web2/3 development.
No matter you're complete newbie to even web2 or web2/3 dev with some experience, hope you'll find this doc helpful to get comfortable with web3 development.
If you're really noob, please get started with "Prerequisite", if you're not, skip this part cuz that's too many baby steps.
Please note that what's included in this doc are not necessary what's right, if there's anything wrong, plz rectify in Github's Issue Page. And there's definitely gonna be a lot of typos in the doc, plz forgive me when I make mistakes.
I also want to use this repo as a practice to CI/CD into IPFS.
Here are some of the good resources you can refer to as well:
- devpill.me
- useWeb3.xyz
- Learn Web3
- DeFi-Developer-Road-Map
- awesome-web3 (Reminder: If you want
to find any curated resource, just add
awesome-
in front of your topic on Github) - Everything I Know this site is what exactly inspired me, but the resources is quite messy and uncategorized.
Web2 Concept Pre-req
If you don't even know what frontend and backend are (the traditional architecture), you need to know about these concepts of web2 first (google it if you don't understand):
- HTTP
- request & response
- method
- specify what actions, typcially GET (get resource), POST (create new resource), PUT (modify resource) and DELETE (delete resource)
- URL
- use URI to specify location
- header
- client vs server
- Frontend is on the client side
- Responsible for presentation, it's the code lying in your browser
- Always initiates the request
- Backend is on the server side, it's the code lying in the remote,
centralized server
- responsible for handling client's request, biz logic, data persistance
- listen to request, then process the request to send the response
- Data persistence
- use centralized database to store your data
- API (an interface that software agree on, used for communication)
- REST API
- a stateless interface that frontend and backend agree on, typically over HTTP
- use JSON to transmit the payload typcially
- Identity & Authentication
- Register & Login
- Username & password
- Backend use Session or JWT (and other stuff) to identify user, then find user information in the database to control and restrict access to user
BTW, this article gives a great detailed review of what happens under the scene when you use the browser.
Web2 vs Web3
Web3 typically differs from web2 from following aspect:
- use decentralized infrastructures to (partially) replace your centralized backend server, typically using the blockchain
- use smart contract lying in blockchain to serve client's request & store your data
- still uses the http protocol (or WebSocket) to transmit data underlyingly,
instead of RESTful API
- use ABI to "send
transaction" to blockchain communicate between smart contract & client
- consists of
- contract location to identify the resource
- function selector
- arguments
- consists of
- use ABI to "send
transaction" to blockchain communicate between smart contract & client
- use PKI to identify user, see
Cryptography Section of Master Ethereum
and
Wallets
- user sign a transaction which is verifiable by anyone without revealing the private key (the secret) and populated it to blockchain instead of giving username & password to server to authenticate first
- smart contract can access your wallet address, so it's natural that they can restrict access to some addresses
I recommend reading Mastering Ethereum before getting started on web3 dev.
Todos
I'll put some of the todos here:
- continuously deploying to IPFS
- push to other branch after finishing the initial edition
- update Github & Social Media Links
- search function
- may integrate with discuss?