Front-end MVC framework Comparison

Source: Internet
Author: User

First of all, the author thinks that the following four functions are very important:

    • UI Bindings (UI binding): The author wants to say more than just the template, but to talk about a declarative approach that the view layer can automatically update accordingly when the underlying model changes. Once you've used a framework that supports UI binding, such as Flex, it's hard to get back.
    • Composed views (modular view): Like all software developers, authors like to write modular, reusable code. For this reason, when programming the UI, the author prefers to use views to create (individuals prefer to use them at the template layer), which, of course, needs to be supported by a sufficiently rich view component. There is an example of a reusable page gadget on this point.
    • Web Presentation layer (Web presentation tier): We are writing programs for the web, the last thing we want is a native-style gadget, but there is no reason to create its own layout manager for a web framework. HTML and CSS are the best ways to solve styles and layouts, and they are being applied so that the framework should be at the core.
    • Play Nicely with Others (compatible, friendly): Admittedly, jquery is very sharp. The author does not like the framework that binds a sub-par jquery copy, and the framework that directly recommends jquery is what the author needs.

Candidate Scenarios
The following table lists the 12 frameworks that support the above features, which are described in more detail in later sections, and you can also click on the links in the following articles to get more information.

1. Backbone.js

Backbone.js is the web's most fiery framework, and if you don't know it will be difficult, many well-known brands support the framework, impressive, and naturally become the first attempt by the author framework. The author used it to build a group talent feature application with administrative functions inside.

Pros: A strong community, and a lot of strength to support. For example, it uses the Underscore.js (also a powerful framework) in its own right.

Cons: Abstract functionality is not strong enough, and some of the required features are not yet implemented. The entire framework is lightweight, and the result is a whole bunch of reference files and templates: And the bigger the size of the application, the more obvious it will be.

2. SproutCore 1.x

Sproutcore was first used by Apple for its icloud. In addition to the very bad name, it is actually a very good framework and one of the biggest frameworks.

Pros: Support bindings, loyal Community fans, excellent feature a lot.

Cons: too rigid, difficult to remove useless feature, forcing the use of a native style paradigm, the serious problem is that the framework does not allow HTML to be used for layout.

3. Sammy.js

Sammy is a relatively small framework that the author stumbled upon because it was too simplified to occupy a list of seats. Its core feature is a routing system that allows applications to be exchanged with Ajax.

Pros: Simple learning curve that is easier to integrate with server-side apps.

Cons: Too simplistic for large applications.

4. Spine.js

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

Pros: Lightweight, documentation is well done.

Cons: Fundamentally flawed. 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 doing 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, with its own programming language objective-j, and attempts to emulate cocoa in a browser.

Pros: Large-scale conceived framework, good community environment, strong inheritance model.

Cons: In all of your languages that can be emulated with JavaScript, objective-c is the last thing the author wants to use. It originated with an iOS developer who has not yet figured out what it means to write objective-j in a browser.

6. Knockout.js

K.O. is an MVVM framework that is heavily praised by its supporters. It emphasizes declarative UI bindings and automatic UI refreshes.

Pros: Support bindings, excellent documentation, and a great guide system.

Cons: The binding syntax is obscure and lacks a solid view component hierarchy. The authors want to be able to easily reuse components and feel that defining an MVVM framework is harmful. There is basically no MVC in these frameworks, but they are variants of (MVP,MVVM and the like).

7. Javascript MVC

The author's interest is to fully disclose various frameworks, and the JS MVC does not take much time to evaluate.

Advantages: Solid community Foundation and accumulation.

Cons: The inheritance model based on strings is awkward, and the controller is too close to the view and lacks a binding mechanism. The naming method is too unprotected, equivalent to the case where ROR can be said to be shorthand for the "Rudy Web Framework".

8. Google Web Toolkit

GWT is a series of client-side toolkits that contain many other tools besides the framework. It can compile the Java language into JavaScript and support a subset of the standard Java libraries, originally used by Google on wave.

Pros: A broad framework with strong community support. Java-based robust component inheritance model that excels in jumbo client applications.

Cons: In addition to what Google says, GWT will not be tested for time. As in the initial dart, it is clear that Java is not the future of the Web. More seriously, the client's abstraction of Java is a bit inappropriate.

9. Google Closure

If Google closure is just a JS framework, it's more like a toolkit. Comes with compilers and optimizers.

Pros: Google is used in many of its mainstream apps. A good component-based UI authoring system.

Disadvantage: UI bindings are not supported.

Ten. Ember.js

Ember (previously Sproutcore 2.0) was a competitor of the new Ding. It is an attempt to extract the core feature from SproutCore2.0 and transform it into a more compact model framework that is more suitable for the web.

Pros: A particularly rich templating system with customizable views and UI bindings.

Cons: The document can't keep up because it's too new.

Angular.js.

Angular is a good framework that was discovered after the authors published the evaluation results, developed by Googler, and contains many interesting design options.

Pros: The scope of the template and the design of the controller are considered very thoughtful. has a dependency injection system (the author himself is an iOS fan). Rich UI binding syntax is supported, which makes filtering and converting work less expensive.

Cons: code base is not sound, and is not enough modular. Views are not modular enough (more on this in Batman.js's flaws)

Batman.js.

Batman, created by Shopify, is another framework that has a similar context to knockout and angular. Batman has a good UI binding system, which is based on HTML attributes. Batman is the only framework written using the idiomatic syntax coffeescript, and is tightly integrated with node. JS, even to the extent that it has the (optional) node. JS Server.

Advantages: The code base is very clear, the binding method is good and simple, durable, process.

Cons: The author doesn't like the "maverick" style, let alone the idea of stepping up a single controller. Like knockout and angular, they suffer the same torture when nesting components. The author needs more than just templates, but also a declarative, reusable template framework. In contrast, Ember has a way of declarative reuse based on the entire set of components that ember their own logic (which may be on the controller layer).

Winner

Ultimately, Ember.js is the only framework that can meet the full needs of the author. The author recently converted a small backbone application into a ember to experiment, and in addition to some minor performance issues, the author was more gratified by the resulting code base. Supported by Yehuda Katz, the entire community around Ember.js technology is fascinating: it will certainly be a good framework to look forward to.

Front-end MVC framework Comparison

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.