Skip to Content
Hands-On Smart Contract Development with Solidity and Ethereum
book

Hands-On Smart Contract Development with Solidity and Ethereum

by Kevin Solorio, Randall Kanna, David H. Hoover
November 2019
Beginner to intermediate
267 pages
5h 47m
English
O'Reilly Media, Inc.
Content preview from Hands-On Smart Contract Development with Solidity and Ethereum

Chapter 8. What Is Web3?

Web3 is a collection of JS libraries that lets you interact with an Ethereum node remotely or locally. Simply, it provides us with an API to use so we can easily work with the blockchain. Web3 works as a wrapper for JSON RPC to connect to a remote or local Ethereum node with either a HTTP or IPC connection. Web3 is basically a connection between the Ethereum blockchain and your smart contract.

Behind the scenes, Web3 uses JSON RPC. RPC is used in many different types of programming languages. You can learn more about JSON RPC here. This chapter focuses on Web3 because Web3 makes connecting to an Ethereum node less complicated and much easier to understand than RPC.

The Frontend, Web3, and the Blockchain

In a traditional web 2.0 application, your user will interact with the frontend of an application such as React or Ember to make a request to the backend that will have databases, APIs, and models, which will then return a response from the backend. The frontend will serve up the data from the backend to the frontend, and the frontend will display it to your user.

The flow of a web 2.0 application is illustrated in Figure 8-1.

Connection between Traditional Frontend and Backend
Figure 8-1. Connection between a traditional frontend and backend

If you have experience in traditional web development, Web3 is similar to an API request that is getting or adding data to the backend. But with Web3, you’ll be reading ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood
Complete Cryptocurrency and Blockchain Course | Learn Solidity

Complete Cryptocurrency and Blockchain Course | Learn Solidity

Ravinder Deol, Codestars By Rob Percival, Thomas Wiesner

Publisher Resources

ISBN: 9781492045250Errata Page