12 excellent JavaScript MVC Framework evaluations

Source: Internet
Author: User

In the last few months, the author (Gordon L. he has been looking for the most perfect MVC Framework. He roughly tried all the frameworks he can obtain, then, the summary of each framework is listed in the article. At the end of the article, the author shares the final recommendation product after comparison.

First of all, please note,The author believes that the following four functions are very important:

  • Ui bindings (ui binding ):Instead of just templates, the author wants to talk about a declarative method that automatically updates the view layer when the underlying model changes. Once you have used a framework that supports UI binding (such as flex), it is very difficult to turn back.
  • Composed views (modular view): Like all software developers, the author also prefers to write modular and reusable code. For this reason, when programming the UI, the author prefers to use the view method for creation (I prefer to use it at the template Layer ), of course, this requires a wealth of view components. There is an example of reusable page gadgets.
  • WEB presentation layer (WEB presentation layer): We are writing programs for the web. The last thing we want is native-style gadgets. But there is no reason to create its own layout manager for a Web framework. HTML and CSS are the best solutions to style and layout at present. They are applied in this way, and the framework should also take this as the core.
  • Play nicely with others (compatible and friendly): I have to admit that jquery is very sharp. The author does not like the framework bound with a sub-par jquery copy, but directly recommends the jquery framework that the author needs.

Candidate schemes

The following table lists the support relationships of the 12 frameworks for the preceding features, you can also click the corresponding link in a subsequent article to obtain more information.

1. Backbone. js

Backbone. JS is the most popular Web framework. If you don't know about it, it will be difficult to implement. Many famous brands have supported this framework. It is impressive that it naturally became the first framework for the author to try. The author uses it to build a feature application with administrative functions in group talent.

Advantage: a strong community with a large amount of support. For example, it mostly uses underscore. js (also a powerful framework ).

Disadvantages: the abstract functions are not strong enough, and some required functions have not yet been implemented. The entire framework is very lightweight and produces a large number of referenced files and templates: the larger the application scale, the more obvious this point will be.

2. sproutcore 1.x

Sproutcore was initially used by Apple for its iCloud. In addition to the poor name, it is actually a very good framework and one of the largest frameworks.

Advantages: supports binding, loyal community fans, and many excellent feature.

Disadvantage: It is too rigid to Remove useless feature and forced to use an native style example. A serious problem is that the framework does not allow HTML layout.

3. Sammy. js

Sammy is a relatively small framework that the author accidentally discovered because it is too simplified to occupy the list of seats. Its core feature is a routing system that allows applications to exchange with Ajax.

Advantage: simple learning curves make it easier to integrate with apps on the server side.

Disadvantage: It is too simple and it is too slow for large applications.

4. spine. js

As its name suggests, spine is obviously strongly influenced by backbone. Like backbone, spine is also a very lightweight framework that follows similar models.

Advantages: lightweight and well-performed documentation.

Disadvantage: there are fundamental defects. A core concept of spine is "a bunch of asynchronous UI sets in a nut shell, which means that the UI should never be blocked under idealized conditions ". After a series of non-blocking real-time applications, the author can say that this is simply unrealistic, unless the backend is like Operational transformation.

5. Cappuccino

Cappuccino is a more unique framework that comes with the programming language objective-J. It can also try to simulate cocoa in a browser.

Advantages: a large-scale conceived framework, a good community environment, and a strong inheritance model.

Disadvantage: in addition to all the languages that can be simulated using JavaScript, objective-C is the last choice for the author. It originated from an iOS developer who hasn't yet figured out what it means to write objective-j in a browser.

6. Knockout. js

K. O. Is an mvvm framework, which is well received by its supporters. It emphasizes declarative UI binding and automatic UI refreshing.

Advantage: supports binding, excellent documentation, and superb guidance system.

Disadvantage: the binding syntax is obscure and there is a lack of a solid view component hierarchy. The author hopes to easily reuse components and finds it harmful to define an mvvm framework. These frameworks basically do not have MVC, but they are all variants (such as MVP and mvvm.

7. Javascript MVC

The author is interested in fully disclosing various frameworks and does not spend much time evaluating JavaScript MVC.

Advantages: solid Community Foundation and accumulation.

Disadvantage: the inheritance model based on strings is very embarrassing. The controller is too close to the view and lacks the binding mechanism. The naming method is too unprotected, which is equivalent to the situation where ror can be abbreviated as "Rudy Web framework.

8.
Google Web Toolkit

GWT is a series of client toolkit, including many other tools in addition to the framework. It can compile the Java language into JavaScript and support a subset of the standard Java library, initially used by Google on wave.

Advantage: a comprehensive and broad framework with strong community support. The solid component inheritance model based on Java is outstanding in mega client applications.

Disadvantage: in addition to what Google said, GWT will not be able to withstand the time test. As in the original dart, Java is obviously not the future of web. More seriously, the client is not suitable for Java abstraction.

9. Google Closure

If Google closure is just a JS framework, it is more like a toolkit. With the compiler and optimizer.

Advantage: Google is used on many mainstream apps. A good component-based UI compiling system.

Disadvantage: Ui binding is not supported.

10. Ember. js

Ember (previously sproutcore 2.0) is a new competitor. It is an attempt to extract and separate its core feature from sproutcore2.0 and transform it into a more compact model framework, which is more suitable for the web.

Advantage: Rich template systems with customizable views and UI binding.

Disadvantage: documents cannot keep up with the new version.

11. Angular. js

Angular is a good framework discovered after the author releases the evaluation results. Developed by Googler, angular contains many interesting design choices.

Advantages: The scope of the template and the design of the controller are considerate. Has a dependency Injection System (I am a fan of IOS ). Supports rich UI binding syntaxes, making filtering and conversion very costly.

Disadvantage: the code library is not sound and modular enough. The view is not modular enough (more detailed about this in the defects of Batman. JS)

12. Batman. js

Created by shopify, Batman is another framework similar to knockout and angular. Batman has a good UI binding system, which is based on HTML attributes. Batman is the only framework written in coffeescript, which is closely related to node. JS can be integrated together and even have its (optional) node. the degree of the JS server.

Advantages: the code library is very clear, the binding method is excellent, simple, durable, and streamlined.

Disadvantages: The author does not like this "Lone hero" style, let alone the idea of strengthening a single controller. Like knockout and angular, components are also suffering from nesting. The author needs not only templates, but also declarative reusable template frameworks. In contrast, Ember has a complete set of components based on their own logic (which can be on the Controller layer) on the framework that can be declarative reuse.

Winner

In the end, Ember. JS is the only framework that can satisfy all the author's needs. Recently, the author has converted a small backbone application into an ember experiment. In addition to some minor performance issues, the author is more pleased with the generated code library. Supported by Yehuda Katz, the entire discussion community around Ember. js technology is also amazing: This will certainly be a good framework worth looking forward.

Of course, this list is not comprehensive enough. Almost all of these frameworks have been found to be notorious for being useless, or named by Hacker News.

What is the MVC framework you use?

Original article: the top 10 JavaScript MVC frameworks reviewed

From: web app Trend

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.