Home > Web Front-end > JS Tutorial > How to choose Javascript Framework (Javascript Framework)_javascript skills

How to choose Javascript Framework (Javascript Framework)_javascript skills

WBOY
Release: 2016-05-16 17:13:13
Original
1066 people have browsed it

The rise of Ajax has brought new vitality to Javascript. A large number of JavaScript frameworks (Javascript Framework) are emerging one after another. Some frameworks come from the summary and refinement of developers' project experience, and some frameworks come from commercial companies. At the same time, they are open source and commercial releases. With the help of these frameworks, the development speed of Ajax projects can be greatly accelerated, but at the same time, they also face different learning curves, architecture scalability and other issues. How to choose a Javascript framework has become a headache for developers and architects. If you are facing such a problem, I hope the following suggestions will be helpful to you in choosing a JavaScript framework.

What are your project requirements?
First ask yourself what kind of project this is, what are the specific requirements, is it an ordinary website or an online one? Does a web application need to handle a large number of keyboard and mouse events, does it need to provide users with various advanced Ajax features, or does it only need to implement a simple asynchronous page refresh and some simple DOM operations? If it is the latter, you can choose a A relatively simple JavaScript framework that encapsulates basic xmlhttprequest operations and DOM operations is enough.

Browser support
Browsers compatible with different frameworks will be different, especially some advanced javascript frameworks, which are not suitable for lower version browsers. No, there are some frameworks that only support IE and Firefox, but do not support other browsers such as Opera and Safari. Therefore, the target users of the system should also be considered when selecting the framework. If the target users only use IE6.0 or above browsers, then there will be more room for framework selection.

Is there a core development team behind the framework?
Many frameworks are often developed by individuals during business hours and may stop updating at any time, but if there is a team behind it , you can ensure code updates to a certain extent, respond to bugs and some problems in a timely manner, and at the same time, the code quality is relatively guaranteed.

Framework maturity
If a new framework has just been released, there are often not many people using it. If you adopt it rashly and encounter problems during use, It may be difficult to find someone who can help you solve the problem or to find information online. So something should be considered in this regard.

Frequency of release and update of the framework
A framework with a high frequency of release and update indicates that new features are constantly being added or bugs are being fixed quickly, and vice versa. The framework has not released a version for half a year, which basically means that this framework has not been taken seriously by developers and it is difficult to get new development.

Document friendliness
A framework, especially a relatively complex framework, without sufficient and friendly documentation, the learning curve will be relatively high, and users will have to In the process, you often need to learn how to use and solve some problems by reading code and other external articles. So documentation is also a very important factor.

Is there an active community?
There is often a community behind some successful open source frameworks, where everyone exchanges experience and helps each other solve problems during use. problems encountered. For any problem, as long as you seek help in this kind of community, you can often get help from others quickly. Such a framework, even if it is not very mature at the beginning, will develop quickly.

Extensibility of the framework
In the actual project process, it is often difficult for a specific framework to directly meet all your needs, which requires you to need Do some customization and expansion work. If a framework does not have good scalability, you may have to use another new framework in order to achieve a specific requirement later in the project, which greatly increases the cost of the project. Therefore, choosing a framework with good scalability, such as support for plugins and other mechanisms, will be of great help to your future system expansion.

Performance and network environment
Different systems will have different emphasis on performance and functions. For example, an Internet-based project may consider more It is required to ensure accurate performance, and then talk about functions. Many advanced JavaScript frameworks are often unsatisfactory in terms of performance. Part of the reason is that they encapsulate too many functions, causing the js file to be very large. In the Internet environment, download this js The file will take a lot of time, and in order to ensure the scalability of the framework, multiple layers of encapsulation and abstraction are often made, which to some extent is actually at the expense of some performance. So such a framework may be more suitable for some intranet projects rather than Internet-based projects.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template