Front-end technologies, especially front-end frameworks, have had an explosive growth in the last few years. Each of them is capable of building great web applications. So how do you as a developer compare and decide which framework to adopt for use in our software projects?
First, we need to make a meaningful comparison, focusing on the following important factors.
1.Real-world operational applications. It can't just be "to do". Often the to-do does not convey the real knowledge and perspective to build real applications.
2.Standardization. Items that meet certain specifications. Hosted on a server that includes backend API, static HTML, CSS & specs.
3.Developed by experts. A consistent, real world project. Ideally, software is built by technologists. This is true, at least most of the time.
So how do we get such a project? The good news is that Mr. Eric Simons has created the real project, which is a medium-sized blog. This project has implemented the same HTML structure, CSS and API specification, but the front-end uses different libraries and frameworks.
I developed a functional implementation in ClojureScript and later did a re-build, I don't consider myself an expert. Thanks to the experts on my team for reviewing my code.
For benchmarking performance, we need to use the following metrics for real-world testing. Includes the following indicators.
How long does this app need to be launched available and how long does it take for the content to show up?
How big is this app installation package and how much space does it take up after installation?
3.Number of lines of code
How many lines of code did the developer use to develop a live specification-based application? Frankly, some applications have a confusing development directory for developers, but it shouldn't have much effect on compilation. My source code only has a src directory.
At the time of writing (as of December 2017), the leading front-end frameworks involved in the review include the following (21CTO note: because we can't add external links to WeChat Public, we've attached them to the software name).
React / Reduc
React / MobX
Metric 1: Performance
Use Chrome's own LighthouseAudit for rendering tests. The earlier it renders, the better the user experience of using the app. Light is also making the first interaction, which is connected to most applications.