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
Internet
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
Web1.0
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.
Web2.0
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
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.
Introduction
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:
- Web3: It is the connection between the Ethereum blockchain and your smart contracts Smart Contracts.
- Ethereum Ethereum: A decentralized open source blockchain blockchain that allows users to interact with the network by creating smart contracts. Its native cryptocurrency is Ethereum. Ethereum is the second most valuable cryptocurrency in terms of market capitalization after Bitcoin. It was created in 2013 by Vitalik Buterin.
- Smart Contracts Smart Contracts: They are computer programs stored on the blockchain that run when predetermined conditions are met. Smart contracts are written in Solidity language.
- Decentralized: Data status is not collected by a central entity, platform platform or individual individual
- Blockchain: A blockchain network is a point-to-point connection in which information is stored in multiple Shared between devices, almost impossible to hack. It is a system of recording information in a way that makes it difficult or impossible to change the information saved on the network.
- Solidity: An object-oriented programming language for writing smart contracts. It is used to implement smart contracts on various blockchain platforms, most notably Ethereum. Solidity's syntax is similar to javascript. To understand Solidity, it is best to have a background in a programming language such as javascript. Jumping directly into Solidity is a bad idea
- Dapp: stands for Decentralized App. They are applications that run their backend code (smart contracts primarily written in Solidity) on a decentralized network or blockchain. Dapps can be built using front-end frameworks such as react, vue, or Angular.
- Bitcoin Bitcoin: The world’s first widely used cryptocurrency.
- Crypto: Also known as Cryptocurrency, cryptocurrency, a decentralized digital currency.
- NFT: Non-Fungible Token, a digital asset with ownership recorded on the chain.
- DAO: Decentralized Autonomous Organization, decentralized autonomous organization.
- Metaverse: a concept of a virtual world created by technological means.
- DeFi Decentralized Finance: Decentralized financial system.
- Token Token: It can be understood as the collective name for digital assets such as cryptocurrency and NFT.
- GameFi: Game DeFi, Chinese version of blockchain game, the financial system in the game can be mapped to reality through cryptocurrencies and NFTs.
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 ).
Start
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
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)
Add web3
Introducing web3
into your project is basically the same as our existing reference method
- npm: npm install web3
- bower: bower install web3
- metor: meteor add ethereum:web3
- vanilla: dist./web3.min.js
##Use
Then you need to create an instance of web3 and set up a provider. In order to ensure that you do not overwrite an existing provider, such as one built-in when using Mist, you need to first check whether the web3 instance already existsif (!web3) { web3 = new Web3(web3.currentProvider); } else { web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); }
web3.eth.getBlock(48, function(error, result){ if(!error) console.log(result) else console.error(error); })
Ethers .js
Provides a small but complete JavaScript API library for the Ethereum blockchain and its ecosystem. It was originally used with ethers.io and has now been expanded into a more general library. The function is basically similar to web3.js. Features are as follows:- Keep the private key on the client, safe and trustworthy
- Supports imported and exported JSON wallet files (Geth, Parity and crowdsale)
- Create from any contract ABI JavaScript metaclass objects, including ABIv2 and human-readable ABI
- support connecting to Ethereum nodes via JSON-RPC, INFURA, Etherscan or MetaMask.
- The library is very small (compressed ~88kb; uncompressed 284kb)
Tools
Of course, in addition to the above, we will also use it Many tools to improve our development
- Truffle: Provides a development environment for compiling and testing smart contracts using the Ethereum Virtual Machine, used as build dependencies in the project
- Remix IDE: The perfect environment for writing and using smart contracts, we can use it to create, modify and execute smart contracts directly from the browser. It's more like an editor
- MetaMask: A Chrome extension that allows you to connect to the Ethereum blockchain network from your browser
- Ganache: Provides a local blockchain environment To test your smart contract
Build
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
Conclusion
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP and Vue: a perfect pairing of front-end development tools. In today's era of rapid development of the Internet, front-end development has become increasingly important. As users have higher and higher requirements for the experience of websites and applications, front-end developers need to use more efficient and flexible tools to create responsive and interactive interfaces. As two important technologies in the field of front-end development, PHP and Vue.js can be regarded as perfect tools when paired together. This article will explore the combination of PHP and Vue, as well as detailed code examples to help readers better understand and apply these two

As a C# developer, our development work usually includes front-end and back-end development. As technology develops and the complexity of projects increases, the collaborative development of front-end and back-end has become more and more important and complex. This article will share some front-end and back-end collaborative development techniques to help C# developers complete development work more efficiently. After determining the interface specifications, collaborative development of the front-end and back-end is inseparable from the interaction of API interfaces. To ensure the smooth progress of front-end and back-end collaborative development, the most important thing is to define good interface specifications. Interface specification involves the name of the interface

Web standards are a set of specifications and guidelines developed by W3C and other related organizations. It includes standardization of HTML, CSS, JavaScript, DOM, Web accessibility and performance optimization. By following these standards, the compatibility of pages can be improved. , accessibility, maintainability and performance. The goal of web standards is to enable web content to be displayed and interacted consistently on different platforms, browsers and devices, providing better user experience and development efficiency.

Django is a web application framework written in Python that emphasizes rapid development and clean methods. Although Django is a web framework, to answer the question whether Django is a front-end or a back-end, you need to have a deep understanding of the concepts of front-end and back-end. The front end refers to the interface that users directly interact with, and the back end refers to server-side programs. They interact with data through the HTTP protocol. When the front-end and back-end are separated, the front-end and back-end programs can be developed independently to implement business logic and interactive effects respectively, and data exchange.

Cockpit is a web-based graphical interface for Linux servers. It is mainly intended to make managing Linux servers easier for new/expert users. In this article, we will discuss Cockpit access modes and how to switch administrative access to Cockpit from CockpitWebUI. Content Topics: Cockpit Entry Modes Finding the Current Cockpit Access Mode Enable Administrative Access for Cockpit from CockpitWebUI Disabling Administrative Access for Cockpit from CockpitWebUI Conclusion Cockpit Entry Modes The cockpit has two access modes: Restricted Access: This is the default for the cockpit access mode. In this access mode you cannot access the web user from the cockpit

In front-end development interviews, common questions cover a wide range of topics, including HTML/CSS basics, JavaScript basics, frameworks and libraries, project experience, algorithms and data structures, performance optimization, cross-domain requests, front-end engineering, design patterns, and new technologies and trends. . Interviewer questions are designed to assess the candidate's technical skills, project experience, and understanding of industry trends. Therefore, candidates should be fully prepared in these areas to demonstrate their abilities and expertise.

As a fast and efficient programming language, Go language is widely popular in the field of back-end development. However, few people associate Go language with front-end development. In fact, using Go language for front-end development can not only improve efficiency, but also bring new horizons to developers. This article will explore the possibility of using the Go language for front-end development and provide specific code examples to help readers better understand this area. In traditional front-end development, JavaScript, HTML, and CSS are often used to build user interfaces

Django: A magical framework that can handle both front-end and back-end development! Django is an efficient and scalable web application framework. It is able to support multiple web development models, including MVC and MTV, and can easily develop high-quality web applications. Django not only supports back-end development, but can also quickly build front-end interfaces and achieve flexible view display through template language. Django combines front-end development and back-end development into a seamless integration, so developers don’t have to specialize in learning
