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.pswp.cn/news/448567.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/448567.shtml
英文地址,請注明出處:http://en.pswp.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…