Web3 stack: What Web 2.0 developers need to know

Although Web3’s developer ecosystem is a small percentage of the larger web developer ecosystem, it appears to be growing rapidly – so it makes sense to experiment and identify the components of the Web3 tech stack. We know it includes blockchain for decentralization, and cryptocurrency wallets as a form of identity. You may also have heard of flamboyantly named distributed storage solutions like the Interplanetary File System (IPFS). But what else do developers need to learn to enter the Web3 world? In addition, how do traditional web technologies such as JavaScript adapt to the Web3 environment?

The best definition of the Web3 stack I’ve come across so far is written by Nader Dabit, a developer relations engineer at a Web3 company called Edge & Node. My first interview with Dabit was in August 2020, when he was working as a serverless specialist at Amazon Web Services. At the time, he had just published a book called “Full Stack Serverless: Modern Application Development with React, AWS, and GraphQL” at O’Reilly Media. In April 2021, he brought these skills to the nascent Web3 world. Part of his work at Edge & Node was helping build The Graph, “a Web3 protocol for indexing and querying blockchain data with GraphQL.”

I contacted Dabit and asked him how being a Web3 developer was different from his previous work at a web2.0 company. But first, let’s take a closer look at his Web3 reference article. He categorizes the Web3 stack as follows:

  • blockchain
  • Blockchain Development Environment
  • file storage
  • P2P database
  • API (indexing and querying)
  • identity
  • Client (framework and library)
  • Other agreements

As he points out, this stack is “completely different in many ways” from traditional network architectures — blockchain and cryptocurrency-based identities being the two most obvious differences. Dabit also cautioned that “Web3 tools, technologies and ecosystems are not as mature as Web2.”

“From a network infrastructure perspective,” Dabit told me, “the main difference is really around what we think of as ‘backend’ technologies, but in Web3 they’re often called ‘protocols.'”

front end

Let’s start with the easy part first. According to Dabit, Web3’s client-side technologies (frameworks and libraries) are essentially the same as Web 2.0. JavaScript is heavily used in front-end applications, and as far as the current state of Web 2.0 is concerned, React is a leading JavaScript framework. “The vast majority of Web3 projects and examples are built with React,” Dabit noted.

Dabit explained to me, “Besides the actual HTTP client library, the front-end technology isn’t much different.” So, to communicate with the server over the HTTP protocol, “you can use web3.js or ethers.js with rpc[ Remote Procedure Call], or use a 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, identities and how we handle them are different on the front end,” Dabit said. “To read data, you don’t need to know anything about the user, because almost all data is public. But to write data, you usually need to connect to the user’s wallet. There are several ways to do this. In In desktop applications, users will typically add a browser extension to their wallet which automatically injects a global window object (e.g. Solana, Ethereum, Arweave) for the network. Or on mobile, it will allow you to add a browser extension to the wallet application Authenticate in and redirect after signing the transaction.”

If you’ve tried buying cryptocurrencies or NFTs, or tried dapps (decentralized applications), chances are you’ve used MetaMask – it has a browser extension available for Chrome, Firefox, and Chrome-based browsing device, such as Brave. MetaMask is owned by ConsenSys, which justifiably calls itself “the leading Ethereum software company.”

ConsenSys also has one of the leading IDEs (Integrated Development Environments) in Web3. Truffle is a “blockchain development environment, testing framework and asset pipeline using the Ethereum Virtual Machine (EVM).” Among other things, it provides “Smart Contract Lifecycle Management” and “Automated Contract Testing”.

Learn Ethereum (and Rust)

Now let’s look at the more complex aspects of the Web3 stack. By now, most developers are familiar with the concept of a 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’s programmability is like a calculator — as ethereum researcher Justin Drake put it in an episode of the podcast “Web3 Breakdowns”, ethereum is a fully programmable “Turing-complete” computer.

The programmable nature of Ethereum has led to a new paradigm of blockchain-focused web development stacks — otherwise known as “Web3.” One of the principles of Ethereum is that in theory you can 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 some other blockchains. So, the main way to become a Web3 developer is to learn how to use Ethereum.

You may have heard of Solidity, a programming language for the Ethereum blockchain that is somewhat similar to JavaScript. While this is true, Solidity is only used to write “smart contracts” for the blockchain – putting data and any instructions for the data on the blockchain.

“In the blockchain world, learning Solidity and the EVM (or the Ethereum Virtual Machine) is probably the best way to get started as a blockchain developer,” Dabit explained in his article. “Using this skill set (and tech stack), you can build not just for Ethereum, but other Ethereum Layer 2s, sidechains, and even other blockchains like Avalanche, Fantom, and Celo.”

However, as another nod to the Web 2.0 world, Rust is also emerging as a must-have skill for smart contract developers. Dabit lists Solana, NEAR, and Polkadot as three examples of blockchains with “best-in-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 with relatively few experienced smart contract programmers, they can easily get “hundreds of thousands of dollars a year” Salaries in the $100,000 range, I’ve even seen some of the most experienced programmers earn around $1 million a year. “

How to store and query data

One of the trickiest parts of Web3 development is the storage and use of data. While blockchains excel at being “trustless” chains for 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 data permanently and sustainably for an up-front fee.” It is essentially a peer-to-peer (P2P) network, but with its own set of Crypto terminology – its mining mechanism is called “Succinct Proofs of Random Access (SPoRAs)”, and developers can deploy applications to “permaweb” (“a permanent decentralized network built on top of Arweave” ).

To complicate matters, dapp developers can choose to use an “off-chain” solution, where data is stored elsewhere than the main blockchain. Two common forms are “sidechains” (secondary blockchains) and so-called “layer two” (L2) solutions such as Bitcoin’s Lightning Network and Ethereum’s Plasma. For more on how to manage data in Web3, check out a recent article on The New Stack by Shashank Golla of data API company Fauna.

As for how to index and query data on the blockchain, this is a relatively new area of ​​development. But as mentioned above, Dabit is working on a solution – The Graph powered by GraphQL. Among other things, it allows developers to use GraphQL in their applications to query directly from the L1 or L2 chain.

Decentralization: The Web3 Developer’s Dilemma

Based on the Web3 stack described by Dabit, it is clear that traditional web programming skills – from JavaScript to Rust – will serve you well in Web3 development. But you also have to learn how to program blockchains with smart contracts and adapt to the unfamiliar world of encrypted file storage and off-chain solutions.

From a developer perspective, Web3 currently appears to be in a transition period, trying to find a way out of its reliance on centralized services like Coinbase, OpenSea, and Alchemy. But doing this is where all the complexity comes from, because true decentralization is hard to achieve for dapps.

I’m curious how the Web3 stack will evolve beyond 2022 as it finds ways to achieve its own decentralization hype. In the meantime, if you want to learn more, check out Nader Dabit’s Web3 Developer’s Guide. Last October, he gave a talk at Next.js Conf, where he explained the stack.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/web3-stack-what-web-2-0-developers-need-to-know/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (2)
Donate Buy me a coffee Buy me a coffee
Previous 2022-01-26 08:03
Next 2022-01-26 08:05

Related articles