1

Is it better to implement web3.js in the front-end of the page or on the server, what benefits do i get if a implement it on front-end or on the back-end server?

2
  • One benefits of doing the interaction with the blockchain in the frontend is that you do not have about your users keys or passwords. Users can choose to use their own node or a public node from Infura.

    A disadvantage is the user have to install a plugin like Metamask or a browser like Brave to manage passwords and keys. This can be an important obstacle if your audience is not much into tech.

  • One advantage of a centralized approach of accessing to the blockchain through a backend server is the adding new users is very simple, you request email and password and it is registered.

    A serious disadvantage is that you have to protect each user private key. Other issues are you lose the decentralized property of a blockchain, have to guarantee the backend servers uptime.

A decentralized approach is more with the spirit of using a blockchain, and a more centralized solution is better to bootstrap a project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.