Differences in traditional and web3/blockchain front end development
Tags: solidity, blockchain, react, web3
Published: 2024-06-16 05:47:24

Web3/Blockchain front end development differs from traditional/web2 front end development in certain ways. Here we will look at how they differ in interacting with the back end, and how they handle authentication.

In the traditional system, the front end interacts with a server. That server might have been written with NodeJS, Python, Go, PHP or any other suitable language. The back end would give some API endpoints to front end to call. In the front end, the developer could send CRUD requests, that are:

Create: POST requests to send new data to the server.
Read: GET requests to retrieve data from the server.
Update: PUT or PATCH requests to modify existing data on the server.
Delete: DELETE requests to remove data from the server.

In web3/blockchain development, there is no centralized server, there's the blockchain... We can think of blockchain as a huuuuge server plus database. I'm sure there are many people who'd grill me for this oversimplicated definition of what a blockchain is, but whatever. In order to 'serve' your own code, called smart contracts in Ethereum, in the blockchain, you have to deploy it, and deployment costs real money (gas in Ethereum). Once the smart contracts are deployed, in order to interact with it, the front end can make read and write calls. No, no CRUD in here. No API endpoints, no axios. The idea is the same, but the method is just a bit different, that's all.

Read: Calls to the blockchain to retrieve data, typically using "call" methods which do not require a transaction or gas fees (free to call). For example, querying a smart contract to get data without altering the blockchain state.

Write: Transactions that modify the blockchain state, which involve sending data to the blockchain and usually require gas fees (costs real money). This can be adding new data, updating existing data, or executing functions that change the state of a smart contract.

In short, if you just want to peek, it's all okay. But if you want to change something in the blockchain, or send a POST or DELETE request in the traditional sense, you have to pay.

**DIFFERENCES IN AUTHENTICATION**

We all know how authentication works pretty much everywhere. You either give the system your email address, create a password, or you can create an account using your existing Google, Facebook, GitHub account etc. In any case, you need to create a new account for each and every different app.

In development, authentication for some reason is one of my least favorite things to work on. You can use session tokens, JWT, OAuth, use Firebase, just save the email and password in the database...

Web3 differs heavily in authentication. I personally love it. You have a wallet like Metamask, Coinbase Wallet etc., that is generally a browser extension. When you want to use a dApp (decentralized application), you just sign in with your wallet. No registration, no email, no passwords, nothing. Just your wallet. Say you want to leave the dApp, you didn't like it? You own your data, you can just leave. Imagine owning all of your Facebook photos, comments, posts, everything and when you leave Facebook, you can take all of them into Twitter, or LinkedIn. How convenient is this!

Web3 authentication is super smooth in development too, again in my opinion. There's little to do other then integrating the necessary providers.

**###############**
If you're looking for full stack blockchain development services, check out my business page => https://www.muratcanyuksel.xyz/

I offer:

- Token smart contract creation
- Token sale dApp
- NFT platforms
- DeFi applications
- DAO development
- Marketing referral system

Smart contracts and Front end development + smart contract integration included.
**###############**