“What will be hot and what to learn in 2022? This article is participating in the” Talk about 2022 Technology Trends “essay campaign.
background
In 2021, we witnessed the expansion and implementation of micro front-end, experienced the speed brought by Serverless, and realized the crazy conquest of low code in our front-end market. Can the front end continue to be popular in this environment? My answer is yes, with cross-end cross-frame, hongmeng market encroachment, the arrival of the Internet of everything era, the popularity of distributed operating system. These are inseparable from front-end development and control. Although the era of the Internet is coming to an end, but the rise of the meta-universe, the successful development of supercomputers, the construction of the behavioral Internet, we can make the front end shine in these new technologies.
Let’s be realistic. What else can the 2022 front end do?
reality
Realistically, no matter what happens in 2022, the front end is impossible to live without, so how can we learn more from our limited time? At present, the trend of the front-end has been very clear. The basic frameworks: React, Vue, typescript, etc., packaging frameworks: Webpack, rollup, Vite, etc., package management tools: NPM, YARN, PNPM, etc., and testing frameworks: Test, etc. These frameworks have been basically stable after years of fighting. All we can do is’ if we can’t take them down, join them ‘.
React and Vue cannot be replaced
React and Vue are widely used in the domestic market. React is still the most popular, while Vue has seen a breakthrough increase in popularity every year. React is backed by giants like Facebook, Vue is not. React is more flexible than Vue; Vue is smaller than React. Both of them have their advantages and disadvantages. It depends on how you choose. Generally, large factories prefer React, while VUE is the best choice for small and medium-sized enterprises to pay attention to efficiency. The following is a brief introduction to their latest status
- But first, let me say
react
Since the release of version 16hooks
, also let you experience the hook function for you to bring convenience. In version 17, released the year before last, it was a bit flat to be honest, and didn’t really stimulate our perception of React. Released last yearReact 18 Bate
I looked at it myself, and I think it’s this yearreact
What are its biggest features?Automatic batching
React will merge multiple setstates into one render.Concurrent Mode
: Break render. When a higher-priority render arrives, perform the higher-priority render immediately by abandoning the current render in exchange for visually faster response times.SSR for Suspense
Build a continuous rendering pipeline from server to client like a stream, rather than a one-time rendering mechanism like renderToString. Render the data we want on demand. - again
vue
Vue3.0, released last year, generally has the following features: 1. Faster 2. Smaller 3. easier to maintain 4. friendlier 5. easier to use. Last year, I was working on fixing the problem. Nearly 60 versions were sent in a year, and several versions were sent every week on average. Uu works very hard and submits code regularly on Saturdays and Sundays so that everyone will have something new to learn in 2022!
serverless
Let’s talk about serverless, the crazy promotion of big factories recently.
In the past, the front-end development mode has gone through four major stages: dynamic page based on template rendering, front-end and back-end separation based on AJAX, front-end engineering based on Node.js, and full-stack development based on Node.js. The latest stage is what we now call serverless.
CNCF is the Cloud Native Computing Foundation. Its original slogan was to adhere to and integrate open source technologies to make choreography containers part of microservices architecture.
Serverless is a combination of FaaS and BaaS. To put it simply, FaaS (Function as a Service) is a platform for running functions, such as Function calculation of Ali Cloud and Lambda of AWS. Backend as a Service (BaaS) is back-end cloud services, such as cloud databases, object storage, and message queues. With BaaS, we can greatly simplify our application development.
Features are as follows:
- Event-driven —- functions In the FaaS platform, a series of events are required to drive function execution.
- Stateless —- Because each function execution may use a different container, memory or data cannot be shared. If you want to share data, you can only use a third party service such as Redis.
- No operation and maintenance —- use serverless we do not need to care about the server, also do not need to care about operation and maintenance, which is the core of the serverles idea; 4. Low cost —- It is very cheap to use Serverless because we only pay for each function run. If the function does not run, it costs nothing and does not waste excessive server resources
Low code
Talking about the low code of last year’s big fire, let’s talk about what it does: reduce unnecessary work, strong platform capability support, integrated ecosystem capability reuse.
What is low code? In short, low code is a visual application development method. With low-code development, developers of all levels of experience can create Web and mobile applications through graphical user interfaces, drag-and-drop components, and model-driven logic.
Low code for the front end is also classified, one is low code HTML and CSS, one is low code logical processing.
In fact, the former will be built in the visual application, the HTML and CSS code has been input, to help developers save layout code, reduce code writing work.
The latter makes a visual selection of business logic, presenting the configuration of event handling, interface handling, global Settings, and so on to the developer in a visual way.
Last year, there was a crazy invasion of low code, and well-known companies of big factories entered the game very early, but the low code circuit has not yet formed a clear market pattern, and the players have the opportunity to turn over, but also may be turned over.
Multiterminal conversion
Now at the top of the market form is varied, the Web, the React Native, WeChat small programs and other side, when the business requirements in different side are required to show at the same time, more than to write code for different end cost is very high, obviously at that time only a set of code can be adapted to varying ability is very need.
Although multi-endpoint conversion has been popular for 18 years, there is still no uniform specification for flutter and OpenHarmony entering the market in the age of flowering. The development cost of front-end development is literally learning different things every week. It is important to have a unified development language.
This year, I participated in the development of Taro Compatible OpenHarmony. During the development process, I found that if one language is compatible with another, I need not only to adapt to all aspects of my own language, but also to understand compatible language and the stability of compatible language. But OpenHarmony is constantly being developed and improved, and that adds a lot to our development costs.
In the future, there will be unified processing for different terminals and different languages, so as to achieve the highest cost and efficiency.
conclusion
In the future, the popularity of the meta-universe and the daily entry of various algorithms into the market. We can’t change that, but we have to learn to deal with it.
2022, no matter what these new technologies will be, but we still have to block and long, line is coming, line and stop, the future can be