Home > Article > Web Front-end > Web3.0 is coming! Is it front-end friendly?
Recently, the calls for web3.0
are really getting louder and louder, and they are getting more and more crazy. For our front-end, what technology do we need? (Learning video sharing: web front-end)
First introduce how web3.0
is derived
Let’s first talk about what the web is. In 1989, a technical group led by Tim Berners-Lee at CERN (European Institute for Particle Physics) submitted a new protocol and an application for the Internet. The document system of this protocol is named World Wide Web, or WWW (World Wide Web) for short, which is what we now know as the "Internet". Its purpose is to enable scientists around the world to use the Internet to exchange their work documents. The technologies it uses are mainly HTML, URI, URL, HTTP, etc., and can display web content in a static way. That is our
Generally speaking, Web1.0 refers to the Internet in the 1990s and early 21st century. To put it bluntly, it is the Internet composed of blogs, message boards, and early portals such as AOL and CompuServe. The well-known websites in China such as Sina, Sohu, and NetEase were products of that time. On Web1.0, static web pages are basically read passively, and web page construction protocols use HTTP, FTP, etc. In the case of Web1.0, web page content is read-only and static, similar to a magazine. It can only be viewed but cannot be modified or interacted with. Under Web1.0, users are only consumers of information (web pages) and cannot interact with them. Web1.0 also uses dial-up Internet access, with an average bandwidth of 50k.
In general, Web1.0 is read-only and decentralized.
And Web2.0 probably became prominent around 2005. The general meaning of Web2.0 is that users can create and publish their own content on web pages, actively participate in the Internet, and no longer simply passively read web pages. The final funds and control of the entire web page are still occupied by the owner of the web page. Social media such as Facebook, Twitter and YouTube are also products of this era. Of course, the proliferation of user-generated content in this way also creates a natural monopoly, which will also lead to several problems: 1. User data is centralized; 2. User data is not portable; 3. User data is sold
In short, Web2.0 is the coexistence of reading and writing
Web3.0 is a decentralized network that integrates power and data centralized into the hands of users rather than exclusive to one company. Distribute data to the network with decentralized blockchain technology. Web3.0 is a term that has been around for years, but has only started to gain popularity in the past year. With Web3, the network is decentralized, so no authority controls it, and decentralized applications (dapps) built on top of the network are open. The open nature of a decentralized network means that no one party can control the data or restrict access. Anyone can build and connect different dapps without permission from a central company.
The main features of Web3.0 include the following:
Semantic Web - It is the key to Web3.0 and makes it easy for machines to process data.
AI - AI is one of the main key factors affecting the popularity of Web3.0 technology. It enables machines to become smarter through large amounts of web data to meet user needs.
3D graphics - Web3.0 has surpassed the traditional Internet because of its three-dimensional technology, which provides a more realistic three-dimensional online world than 2D.
Ubiquity – The concept of being present or everywhere at the same time, the increasing rise of mobile devices has made it easier for many people to access the Internet anytime and anywhere.
Openness and interoperability, which refers to openness in terms of application programming interfaces, data formats, protocols and interoperability between devices and platforms.
Global data repository, the ability to access information across programs and networks.
In short: Web3.0 is everything about reading, writing, and owning the Internet.
For us front-end developers, what technologies should we master or what should we know? Simply put, web3 developers create decentralized full-stack applications that live on and interact with the blockchain. Let’s talk about it briefly below.
Let’s first understand what the professional terms are:
After introducing the above, let’s talk about the classification of blockchain for developers. Mainly core blockchain development (core blockchain engineers are responsible for the architecture and security protocols of the blockchain system) and blockchain software development (these blockchain developers create Dapps using the design architecture provided by core blockchain developers ).
Let’s get down to something practical. For our front-end development, we want to develop decentralized applications that reside and interact with the blockchain. You must use the web3.js and Ethers.js libraries.
web3.js is a JavaScript API library. To make a DApp run on Ethereum, we can use the web3 objects provided by the web3.js library. web3.js communicates with local nodes through RPC calls, and it can be used with any Ethereum node that exposes the RPC layer. web3 contains the eth object - web3.eth (specifically for interacting with the Ethereum blockchain) and the shh object - web3.shh (for interacting with Whisper)
Introducing web3
into your project is basically the same as our existing reference method
if (!web3) { web3 = new Web3(web3.currentProvider); } else { web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); }Since this API is designed to interact with local RPC nodes, all The function uses synchronous HTTP requests by default. If you want to make an asynchronous request. Most functions allow passing an optional callback function following the parameter list to support asynchronous
web3.eth.getBlock(48, function(error, result){ if(!error) console.log(result) else console.error(error); })The specific directory of the API can be
Of course, in addition to the above, we will also use it Many tools to improve our development
We want to build a full stackDapp
If you want to add a user interface to your project, react.js, vue.js or angular.js are good javascript front-end frameworks as they can be easily integrated with blockchain networks using ethers.js or web3.js. There are various platforms that allow you to create complete Dapps without writing code such as: Bunz, Dapp builder, Atra io, Bubble io
In general, Web3.0 is not a technology, but a concept. We front-end developers don’t need to panic. No matter how the technology develops, we will always use the front-end. We can use our react.js, vue.js or angular.js to build our own platform for our own developed Dapp applications, or we can use nodejs to complete it by using web3.js, the toolkit provided by Ethereum. The entire process of contract compilation, release, and contract method invocation.
For more programming-related knowledge, please visit: Programming Teaching! !
The above is the detailed content of Web3.0 is coming! Is it front-end friendly?. For more information, please follow other related articles on the PHP Chinese website!