10种顶级javascript框架比较-The Top 10 Javascript MVC Frameworks

转载于:http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/

Gordon L. Hempton是西雅图的一位黑客和设计师,他花费了几个月的时间研究和比较了12种流行的JavaScript MVC框架,并在博客中总结了每种框架的优缺点,最终的结果是,Ember.js胜出。

Framework

UI Bindings

UI绑定

Composed Views

复合视图

Web Presentation Layer

Web表现层

Plays Nicely With Others

与其他框架良好协作

Backbone.js
SproutCore 1.x
Sammy.js
Spine.js
Cappuccino
Knockout.js
Javascript MVC
Google Web Toolkit
Google Closure
Ember.js
Angular.js
Batman.js

1. Backbone.js

Backbone.js 是web人士的最爱和首选.  GroupTalent.

优点pros: 良好的兼容性. Underscore.js (也比较大量地使用) 则是另一个很好框架. 强大的社区,强劲的势头

缺点Cons: Lacks strong abstractions and leaves something to be desired. The entire framework is surprisingly lightweight and results in lots of boilerplate. The larger an application becomes, the more this becomes apparent.  抽象较弱,很多功能亟待增加

2. SproutCore 1.x

SproutCore is what Apple used on its iCloud initiative. Despite having a horrible name, it is actually an extremely well thought out framework. It is also one of the largest frameworks.

优点pros: Bindings support. Solid community. Tons of features. 对绑定的支持,可靠的社区,大量特性;

缺点Cons: Overly prescriptive. Hard to decouple from unneeded features. Forces a native-like paradigm. I have a serious problem with any framework which discourages using html for layout.  过度规范,难以和不需要的特性解耦。

3. Sammy.js

Sammy.js was a smaller framework that I stumbled upon. Due to its simplicity, it almost didn’t make this list. It’s core feature is a routing system to swap out areas of an application with AJAX.

优点pros: Simple learning curve. Easier to integrate with an existing server side app. 易于学习,更容易和现存的服务端应用程序整合

缺点Cons: Too simple. Not sufficient for larger applications. 过于简单,无法应用于大型应用程序中。

4. Spine.js

Based on the name, Spine.js is obviously heavily influenced by backbone. Like backbone, it is very lightweight and follows a similar model.

优点pros:  Lightweight with good documentation. 轻量级,文档很完备;

Cons: Fundamentally flawed. A core concept of spine is “is asynchronous UIs. In a nutshell, this means that UIs should ideally never block”. Having built a serious non-blocking realtime application in the past, I can say this is entirely unrealistic unless the backend has something like operational transformation. 它的核心概念“spine”是异步的用户界面,这意味着理想状况用户界面永远不会发生堵塞,而这个基础有缺陷。

5. Cappuccino

Cappuccino is one of the more unique frameworks, coming with its own language Objective-J. Cappuccino tries to emulate Cocoa in the browser.

优点pros: Large thought-out framework. Good community. Great inheritance model.  大型深思熟虑后的框架,良好的社区,很棒的继承模型;

缺点Cons: Out of all the languages you could emulate in javascript, Objective-C would be my last choice. This is coming from an iOS developer. I simply can’t get past the idea of programming Objective-J in the browser.  由iOS开发者创建,使用JavaScript模拟Objective-C。

6. Knockout.js

Knockout.js is an MVVM framework that receives lots of praise from its supporters. It stresses declarative UI bindings and automatic UI refresh.

优点pros: Binding support. Great documentation and amazing tutorial system. 对绑定的支持,完备的文档和教程;

缺点Cons: Awkward binding syntax and lacks a solid view component hierarchy. I want to be able to reuse components easily. I also feel like identifying as an MVVM framework is deleterious. Hardly any of these frameworks are MVC, but are of the MV* variety (MVP, MVVM, etc). 绑定语法拙劣,缺少统一的视图组件层级关系。

7. Javascript MVC

Javascript MVC, in the interest of full disclosure, is a framework that I didn’t spend very much time evaluating.

优点pros: Solid community and legacy.  可靠的社区;

缺点Cons: Awkward inheritance model based on strings. Controllers are too intimate with views and lack bindings. The name is way too generic - the equivalent would be if RoR was called “Ruby Web Framework”.  基于字符串的继承模型很差,控制器与视图关系过密而缺少绑定。

8. Google Web Toolkit

GWT is a serious client-side toolkit that includes more than just a framework. It compiles Java to Javascript, supporting a subset of the standard java library. Google used it internally for Wave. 

优点pros: Comprehensive framework with great community. Solid Java-based component inheritance model. Great for behemoth client-side applications.  全面的框架,良好的社区,可靠的基于Java的组件继承模型;

缺点Cons: Despite what Google says, GWT is not going to stand the test of time. With initiatives like DART its clear that Java is not the future of the web. Furthermore, the abstraction of Java on the client is slightly awkward.  可能无法经受时间的考验,另外,Java在客户端上的抽象有些笨拙。

9. Google Closure

Google Closure is more of a toolkit than simply a javascript framework. It comes bundled with a compiler and optimizer.

优点pros: Use by Google for many of their major apps. Nice component-based ui composition system.  很好的基于组件的UI组合系统。

缺点Cons: Lack of UI-binding support. 缺少UI绑定支持。

10. Ember.js

Ember.js (formerly Amber.js SproutCore 2.0) is one of the newest contenders. It is an attempt to extricate the core features from SproutCore 2.0 into a more compact modular framework suited for the web.

优点pros:  Extremely rich templating system with composed views and UI bindings.  很丰富的模板系统,拥有复合视图和UI绑定;

缺点Cons: Relatively new. Documentation leaves lots to be desired.  相对较新,文档不够完备。

11. Angular.js

Angular.js is a very nice framework I discovered after I originally posted this review. Developed by Googler’s, it has some very interesting design choices.

优点pros: Very well thought out with respect to template scoping and controller design. Has a dependency injection system (I am a big fan of IOC). Supports a rich UI-Binding syntax to make things like filtering and transforming values a breeze. 对模板范围和控制器设计有很好的考虑,拥有依赖注入系统,支持丰富的UI绑定语法。

缺点Cons:Codebase appears to be fairly sprawling and not very modular. Views are not modular enough (will address this in more detail in the cons of Batman.js).  代码的模块性不强,视图的模块化也不够。

12. Batman.js

Batman.js, created by Shopify, is another framework in a similar vein to Knockout and Angular. Has a nice UI binding system based on html attributes. The only framework written in idiomatic coffeescript, it is also tightly integrated with Node.js and even goes to the extent of having its own (optional) Node.js server.

优点pros: Very clean codebase. Has a nice simple approach to binding, persistence, and routing.  代码清晰,绑定、持久化的方法简单;

缺点Cons: I very much dislike singletons, let alone the idea of enforcing singleton controllers. Suffers from the same ailments as Knockout and Angular with regards to nested components. I want to be able to declaratively reuse more than just templates. What Ember has over these frameworks is a way to declaratively re-use entire components that are backed by their own (possibly controller-level) logic.   使用了单例控制器。

(注解:英语水平有限,慢慢来翻译)

转载于:https://www.cnblogs.com/JoannaQ/archive/2012/08/31/2664734.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/448567.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

数据结构之顺序表(一)

有关顺序表,由于代码太长,我将分成2部分,这边是头文件SeqList.h和主函数: #ifndef __SEQLIST_H__ #define __SEQLIST_H__#define FALSE -1 #define TRUE 0#define INIT_SIZE 100 #define INCRESS_SIZE 20typedef int Seq…

centos7 安装 node.js 运行环境、卸载

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。 一.安装 1.进入官网下载最新版本 https://nodejs.org/en/ 选择下载后上传或直接使用wget下载 wget https://nodejs.org/dist/v8.11.…

白云山脚下的廉价菜-饮胜酒家

亚运将至,我们已经渐渐感受到那种气氛了,最明显就是搭公交车不用钱,我可以不再做那辆兜路的54路车,每天可以睡多10分钟,然后从家楼下转3趟车上班,重要部部都有位置坐,每天在路上都看到有好多好多…

科目三考试指南

正在准备科目三的您,对顺利通过考试有信心吗?今天,小编为大家带来科目三靠边停车技巧,通过讲解靠边停车考试要求,让学员更好地掌握相关技巧,希望能帮到大家。 靠边停车考试项目中规定,车前保险杠…

docker学习4-docker安装mysql环境

前言 docker安装mysql环境非常方便,简单的几步操作就可以了 拉取mysql镜像 先拉取mysql的镜像,可以在docker的镜像仓库找到不同TAG标签的版本https://hub.docker.com/_/mysql?tabtags 我这里选择mysql:5.7标签 [rootyoyo ~]# docker pull mysql:5.7 5.7…

数据结构之顺序表(二)

这是接着之前的剩下来的部分&#xff1a; #include <stdlib.h> #include "SeqList.h" #include <stdio.h>SeqList *Create_List() {//创建一个顺序表SeqList* s (SeqList*)malloc(sizeof(SeqList)/sizeof(char));if (NULL s){return NULL;}//初始化顺…

Dynamics CRM 2015 站点地图公告配置实体显示名称的变更

CRM更新2015后&#xff0c;在设置里找不到公告配置了 在原来的位置上你会东西一个叫活动源配置的东西&#xff0c;点开看后就是原来的公告配置。 版权声明&#xff1a;本文为博主原创文章&#xff0c;未经博主允许不得转载。 转载于:https://www.cnblogs.com/VicTang/p/4799531…

解决:liunx 光标消失(显示光标)

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 2个命令可以管控光标&#xff1a; 隐藏光标 &#xff1a; echo -e "\033[?25l" 显示光标 &#xff1a; echo -e "\0…

科​目​三​路​考​操​作​步​骤

科目三路考操作步骤 一、起步前五大操作顺序&#xff1a; 1.检查手制动是否拉紧 2.踩下离合器踏板&#xff0c;挂空挡 3.开汽车电源 4.轻踩油门&#xff08;电喷车不需要&#xff09;&#xff0c;接通马达 5.发动后&#xff0c;手马上离开 二、起步顺序6个步骤&…

漫谈微服务架构:什么是Spring Cloud,为何要选择Spring Cloud

Spring Cloud是基于Spring Boot的&#xff0c;因此还在使用SpringMVC的同学要先了解Spring Boot。先上一段官话&#xff0c;Spring Cloud是一个基于Spring Boot实现的云应用开发工具&#xff0c;它为基于JVM的云应用开发中涉及的配置管理、服务发现、断路器、智能路由、微代理、…

数据结构之头指针链表de三种插入方式(头插法,尾插法,在pos处插入)

1、头插法&#xff1a; 流程&#xff1a;1 &#xff0c;判断传入数据是否正确 2&#xff0c;如果正确则创建一个新的节点&#xff0c;并判断节点是否创建成功 3&#xff0c;然后给节点成员变量赋值 4&#xff0c;最后让新节点变为链表的第一个节点。 代码实现: // 链表的头插…

c# 科学计数法值转换成正常值,返回字符串

/// <summary>/// 科学计数法值转换成正常值/// </summary>/// <param name"value"></param>/// <returns></returns>public string ValueScientificNotationConvert(JToken value){if (value null) return "";var …

使用 Docker 部署 Node 服务

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 前言   Docker 是一个开源的容器引擎。开发者可以将自己的应用以及依赖打包为一个可移植的容器&#xff0c;然后发布到 Linux 机器上。…

科目三电子考的通过率普遍偏低

据调查&#xff0c;科目三电子考的通过率普遍偏低&#xff0c;是学员们公认的最难考项目。今天小编要通过自己的所看所听分析科目三电子考通过率低的三大原因。 原因一&#xff1a;考生基本功不扎实 从历年来考试失败的理由中&#xff0c;可以发现&#xff0c;大多都出现上车、…

打印python包含汉字报SyntaxError: Non-ASCII character '\xe4' in file

因为本人主要使用Scala语言&#xff0c;但是之前同事包括老大都是使用python&#xff0c;加上python在spark的使用中的确越来越受欢迎&#xff0c;所以最近准备入坑python&#xff0c;但是装完写demo的时候出了问题&#xff0c;如下&#xff1a; 查了下发现&#xff0c;这是pyt…

数据结构之头指针链表的逆序、输出和指定位置的删除

头指针链表指定位置的删除 实现&#xff1a;1&#xff0c;先判断传入的数据是否正确&#xff0c;然后再判断是否为空表&#xff0c;最后判断pos的值是否满足题意 2&#xff0c;分删除位置为1和不为1讨论&#xff1a;为1时&#xff0c;直接将h指向第二个节点并释放第一个节点的…

软件包管理 之 fedora-rpmdevtools 工具介绍

作者&#xff1a;北南南北来自&#xff1a;LinuxSir.Org提要&#xff1a;fedora-rpmdevtools 是一款Fedora的RPM包的开发工具&#xff0c;用于Fedora Core 2.0 以上版本&#xff1b; 正文 一、fedora-rpmdevtools 介绍&#xff1b; 用于制作RPM包的工具&#xff0c;为开发者提供…

Node.js 多版本安装配置(Window、Ubuntu 、CentOS 、Mac OS、Cloud Studio)

前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家。点击跳转到教程。 向大家介绍在window和Linux上安装Node.js的方法。 本安装教程以Node.js v4.4.3 LTS(长期支持版本)版本为例。 Node.js安装包及源码下载…

场外科目三考试技巧

科目三考试可以说是学车中最有用的&#xff0c;因为这和将来正式上路是完全相同的&#xff0c;所以掌握c1科目三考试技巧也是很必要的。下面就来看看小编为大家总结的场外科目三考试技巧吧。 一、考前准备 要从车头前绕过进入车内&#xff0c;并注意关牢车门&#xff0c;之后双…

数据结构之单链表(头结点)的一些常用操作(增删改查逆)

删除指定结点 流程&#xff1a;判断传入数据和pos的位置是否符题意——找到删除位置的前一个结点&#xff0c;找到后要判断所找的位置是否越界——删除指定结点。代码&#xff1a; //删除指定结点 int Delete_Pos(Node* h, int pos) {if (NULL h || pos < 1){return FALS…