The Web3 Stack: What Web 2.0 Developers Need to Know
This article is from wechat official account:Old yuppie
Although the Web3 developer ecosystem is a small percentage of the larger web developer ecosystem, it seems to be growing rapidly -- so it makes sense to try and identify the components of the Web3 technology stack. We know it includes blockchain for decentralization, and cryptocurrency wallets as a form of identity. You may also have heard of flowery distributed storage solutions such as the Interplanetary File System (IPFS). But what else do developers need to learn to get into the Web3 world? Also, how do traditional web technologies like JavaScript fit into the Web3 environment?
So far, the best definition of the Web3 stack I've come across is written by Nader Dabit of Edge & AMP; Developer relations engineer of Web3 company for Node. I first interviewed Dabit in August 2020, when he was working as a serverless specialist at Amazon Web Services. At the time, he had just published a book at O 'Reilly Media called Full Stack No Server: Modern Application Development with React, AWS, and GraphQL. In April 2021, he brought those skills to the nascent Web3 world. He in the Edge & amp; Part of Node's job is to help build The Graph, "a Web3 protocol for indexing and querying blockchain data with GraphQL."
I reached out to Dabit and asked him how being a Web3 developer was different from his previous job at a web2.0 company. But first, let's take a closer look at his Web3 reference article. He classifies the Web3 stack as follows:
- block chain
- Blockchain development environment
- File storage
- P2P database
- API(Index and query)
Identity -
- Clients (frameworks and libraries)
- Other Agreements
As he points out, this stack is "fundamentally different in many ways" from traditional network architectures -- blockchain and cryptocurrency-based identity being the two most obvious differences. Dabit also cautions that "Web3 tools, technologies and ecosystems are not as mature as Web2."
"From a network infrastructure point of view," Dabit told me, "the main difference really revolves around what we think of as" back-end "technologies, but in Web3 they are often referred to as" protocols."
Let's start with the easy part. According to Dabit, Web3's client technology (frameworks and libraries) is essentially the same as Web 2.0. JavaScript is heavily used in front-end applications, and React is the leading JavaScript framework in terms of the current state of Web 2.0. "The vast majority of Web3 projects and examples are built with React," Dabit points out.
"Aside from the actual HTTP client library, the front-end technology isn't that different," Dabit explained to me. So to communicate with The server over The HTTP protocol, "you can use Web3.js or ethers.js to talk to RPC [remote procedure calls], or use The GraphQL client to talk to The Graph instead of using FETCH or Axios." Both Web3.js and ethers.js are JavaScript libraries that enable developers to interact with the Ethereum blockchain.
"Also, identity and the way we deal with identity is different on the front end," Says Dabit. "To read data, you don't need to know anything about the user because almost all of it is public. But to write data, you usually need to connect to the user's wallet. There are several ways to do this." In desktop applications, users will typically add a browser extension to their wallet that automatically injects a global window object (Solana, Ethereum, Arweave, for example) into the web, or on mobile, it will allow you to authenticate in the wallet app and redirect after signing a transaction."
If you've tried buying cryptocurrencies or NFT, or tried Dapps (decentralized apps), there's a good chance you've already used MetaMask -- it has a browser extension available for Chrome, Firefox, and Chrome-based browsers like Brave. MetaMask is owned by ConsenSys, which rightly calls itself the "leading Ethereum software company."
ConsenSys also has one of the leading ides (integrated development environments) for Web3. Truffle is a "blockchain development environment, testing framework, and asset pipeline using the Ethereum Virtual Machine (EVM)". Among other things, it offers "smart Contract Lifecycle management" and "automated contract testing."
Now let's look at the more complex aspects of the Web3 stack. By now, most developers are familiar with the concept of blockchain -- basically, it's a distributed ledger of data. But there are many different types of blockchains. The two most important are Bitcoin and Ethereum (not coincidentally, the cryptocurrencies associated with these blockchains are the two market leaders). But bitcoin is as programmable as a calculator -- ethereum is a fully programmable "Turing-complete" computer, as Ethereum researcher Justin Drake put it in an episode of Web3 Breakdowns.
The programmable nature of Ethereum has led to a new paradigm for blockchain-based web development stacks -- aka "Web3." One of the tenets of Ethereum is that you can theoretically build anything on top of it. In Web 2.0 parlance, it is a web platform. Ethereum is the largest Web3 platform, and it is also compatible with several other blockchains. Therefore, the primary way to become a Web3 developer is to learn how to use ethereum.
You've probably heard of Solidity, the programming language for the Ethereum blockchain, which is somewhat similar to JavaScript. While this is true, Solidity is only for writing "smart contracts" for blockchain -- putting data and any instructions for that data on the blockchain.
"In the blockchain world, learning Solidity and EVM(or Ethereum VIRTUAL Machine) may be the best choice for getting started as a blockchain developer," Dabit explains in his article.
"Using this skill set (and technology stack), you can build not only for Ethereum, but for other Ethereum layer2, side chains, and even other blockchains like Avalanche, Fantom, and Celo."
However, in another nod to the Web 2.0 world, Rust is also becoming a must-have skill for smart contract developers. Dabit lists Solana, NEAR, and Polkadot as three examples of blockchains with "first-class Rust support."
"I think Solidity and Rust are the most used and in demand languages for smart contract development," Dabit told me. He added that because there are relatively few experienced smart contract programmers, they can easily command "salaries in the hundreds of thousands of dollars a year, and I've even seen some of the most experienced programmers earn around $1 million."
One of the trickiest parts of Web3 development is data storage and usage. While blockchains are good at being "untrusted" chains of immutable data, they are also very inefficient at storing and processing large amounts of data -- especially for Dapps. This is where file storage protocols like IPFS, Arweave, and Filecoin come in.
Arweave is an open source project that describes itself as "a protocol that allows you to store your data permanently and sustainably, for an upfront fee." It's essentially a peer-to-peer (P2P) network, but with its own set of encryption terms -- its mining mechanism is called "Concise Proof of Random Access (SPoRAs)," and developers can deploy applications to "permaWeb" (" a permanent decentralized network built on top of Arweave ").
To complicate matters further, Dapp developers can choose to use an "off-chain" solution, where the data is stored somewhere else than the main blockchain. Two common forms are "side chains" (secondary blockchains) and so-called "layer 2" (L2) solutions, such as the Bitcoin Lightning Network and Ethereum Plasma. For more information on how to manage data in Web3, check out a recent article by Shashank Golla of Fauna, a data API company, on The New Stack.
As for how to index and query data on a blockchain, this is a relatively new area of development. But as mentioned above, Dabit is developing a solution -- The Graph powered by GraphQL. Among other things, it allows developers to use GraphQL in their applications to query directly from L1 or L2 chains.
Based on the Web3 stack Dabit describes, it's clear that traditional web programming skills -- from JavaScript to Rust -- will serve you well in Web3 development. But you'll also have to learn how to program blockchains using smart contracts and adapt to the strange world of encrypted file storage and off-chain solutions.
From a developer's perspective, Web3 seems to be in transition right now, trying to figure out a way to wean itself off centralised services like Coinbase, OpenSea and Alchemy. But doing so is where all the complexity comes from, because true decentralization is hard to achieve for DApps.
I'm curious to see how the Web3 stack will evolve beyond 2022 as it looks for ways to make its own decentralized pitch. In the meantime, if you want to learn more, check out Nader Dabit's Web3 Developer guide. Last October, he gave a talk at the next.js Conf in which he explained the stack.
The original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia