Battle-Tested JavaScript Frameworks – Part 2, Web3.
Table of Contents

Battle-Tested JavaScript Frameworks – Part 2, Web3.

As Web3 development will likely take off in 2022, we took a moment to prepare this list of Web3-specific tools for dApp development of tomorrow. With that being said, there are not many libraries, and frameworks, devoted only to this purpose. Conceptually, development of Web2 frontends, and Web3 is not much different despite all the obvious differences. One still needs to develop a front-end. One still needs a back-end, which has the same aim. Database is still a necessity because if you store everything on the main chain, you can easily go bankrupt before Eth2. 

With this short intro, we may now begin introducing you to all the specific frameworks and libraries.

Interacting with Ethereum’s blockchain

Ethers.js

The package aims to be a “a simple, compact and complete library for all your Ethereum needs.” It is also technically not a single library, but rather a bundle of libraries. There are four of them: Ethers.provider, Ethers.contract, Ethers.utils, and Ethers.wallets.

Ethers.js Pros

  • Written fully in TypeScript
  • Relatively small
  • Multiple ways to connect to the Ethereum nodes

Ethers.js Cons

  • Unlike Web3, it is not backed by the Ethereum Foundation (though it will still work)
  • There is only one maintainer

GitHub Repository

https://github.com/ethers-io/ethers.js

Web3.js

It was the first package to have appeared on the scene to interact with Ethereum’s chain. As such, it has a clear first mover advantage; since it was available for much longer, developers had more time to prepare educational materials. 

Web3.js Pros

  • Built by the Ethereum Foundation
  • The first one to appear on the scene

Web3.js Cons

  • Bulky. Nearly 600 kB while minified, and gzipped.
  • Only a small part of it is written in TypeScript
  • Requires a local Ethereum node running
  • You will run into issues when using Angular >11 (though they are easily fixed)
  • It uses the old “require” statements

GitHub Repository

https://github.com/ChainSafe/web3.js

Development Environments

Truffle

The complete development environment for developers, getting them from “from idea to d[A]pp as comfortably as possible.” It is the more popular out of the two environments for developers, the other one being Hardhat. Even though stars on GitHub don’t mean much, they are a good indicator of how many resources can one expect to find.

Truffle Pros

  • Automated contract testing with Mocha and Chai.
  • Licensed under permissive MIT license
  • A set of helpful boilerplates (“boxes”) available
  • Works with Hyperledger
  • No GUI
  • Supports the EthPM package manager for smart contracts

Truffle Cons

  • Boxes are not very flexible
  • No GUI
  • Testing is not the easiest

GitHub Repository

https://github.com/trufflesuite/truffle

Hardhat

Hardhat is the second out of the two main developer environments available for dApp developers. 

Hardhat Pros

  • Written in TypeScript
  • Can use Truffle for testing via plugins (@nomiclabs/hardhat-truffle4 and @nomiclabs/hardhat-truffle5)
  • A complete ecosystem of plugins
  • Caters to the more experienced Web3 developers
  • Supported by the Ethereum Foundation

Hardhat Cons

GitHub Repository

https://github.com/nomiclabs/hardhat

Deployment

Web3-specific deployment options are not battle-tested — yet. ipfs.js is in alpha, while Bee-js (that connects to Swarm) is in beta. It is a certainty, that they will mature, though it is not clear when will this happen. Because of this, we will not be talking about them. Here, you may use the good old Vercel for deployment that's as easy as typing a command into your terminal. Naturally, AWS, Azure, and Firebase will also be perfect for the job.

If you want to give the Web3-specific options a shot, ifps.js’s GitHub repo is available here, while Bee-js’s source code is available under this link.

UI

As far as UI goes, you may use whichever framework you are the most comfortable with. React, Vue, or Angular, all will work here. Svelte, Inferno, or Solid are viable as well, though the default choice, for now, is React. The library sees a lot of usage, though also has numerous prebuilt options for you, that offloads the cognitive load from you. One example is useDApp

Conclusion

As we mentioned: the list of Web3-only libraries is shorter than one could have expected. That is preferable, as it does not take much to jump on the dApp hype train. The only hurdle, if it even is one, is learning Solidity (or Vyper). Though, as the majority of the readers of this post will be JavaScript developers, we recommend learning Solidity.
If you want to have a chat with our experts about developing your next Web3 application, feel free to contact our Chief Innovation Officer, Marcin Dąbrowski.

Liked the article? subscribe to updates!
360° IT Check is a weekly publication where we bring you the latest and greatest in the world of tech. We cover topics like emerging technologies & frameworks, news about innovative startups, and other topics which affect the world of tech directly or indirectly.

Like what you’re reading? Make sure to subscribe to our weekly newsletter!
Relevant Expertise:
No items found.
Share

Subscribe for periodic tech i

By filling in the above fields and clicking “Subscribe”, you agree to the processing by ITMAGINATION of your personal data contained in the above form for the purposes of sending you messages in the form of newsletter subscription, in accordance with our Privacy Policy.
Thank you! Your submission has been received!
We will send you at most one email per week with our latest tech news and insights.

In the meantime, feel free to explore this page or our Resources page for eBooks, technical guides, GitHub Demos, and more!
Oops! Something went wrong while submitting the form.

Related articles

Our Partners & Certifications
© 2024 ITMAGINATION, A Virtusa Company. All Rights Reserved.