backbone.js的目的是什麼?

本文翻譯自:What is the purpose of backbone.js?

I tried to understand the utility of backbone.js from its site http://documentcloud.github.com/backbone , but I still couldn't figure out much. 我試圖從其網站http://documentcloud.github.com/backbone瞭解backbone.js的實用程序,但我仍然無法理解。

Can anybody help me by explaining how it works and how could it be helpful in writing better JavaScript? 任何人都可以通過解釋它是如何工作來幫助我的,以及它如何有助於編寫更好的JavaScript?


#1樓

參考:https://stackoom.com/question/MjZ3/backbone-js的目的是什麼


#2樓

A web application involving lot of user interaction with many AJAX requests, which needs to be changed from time to time, and which runs in real time (such as Facebook or StackOverflow) ought to use an MVC framework such as Backbone.js. 涉及許多用戶與許多AJAX請求交互的Web應用程序(需要不時更改,並且實時運行(例如Facebook或StackOverflow))應該使用諸如Backbone.js之類的MVC框架。 It's the best way to build good code. 這是構建優秀代碼的最佳方式。

If the application is only small though, then Backbone.js is overkill, especially for first time users. 如果應用程序雖然很小,那麼Backbone.js就是過度殺傷,特別是對於初次使用的用戶。

Backbone gives you client side MVC, and all the advantages implied by this. Backbone爲您提供客戶端MVC,以及由此帶來的所有優勢。


#3樓

backbone.js is Model-View-Controller (MVC) with JavaScript but Extjs better than backbone for MVC Pattern by java script backbone.js是帶有JavaScript的模型 - 視圖 - 控制器(MVC),但是通過java腳本, Extjs比MVC模式的骨幹更好

With backbone you got freedom to do almost anything you wish for. 通過骨幹,您可以自由地做任何您想要的事情。 Rather than trying to fork through the api and customize I would use Backbonejs for it's simplicity and ease of implementation. 而不是嘗試分叉api和自定義我將使用Backbonejs,因爲它的簡單性和易於實現。 Again it is hard to say what you require out of the two one is a library another a component 再一次很難說你需要的是另一個是庫的另一個組件


#4樓

I have to admit that all the "advantages" of MVC have never made my work easier, faster, or better. 我必須承認,MVC的所有“優勢”從未使我的工作變得更容易,更快或更好。 It just makes the whole codeing experience more abstract and time consuming. 它只會使整個代碼體驗更加抽象和耗時。 Maintenance is a nightmare when trying to debug someone elses conception of what separation means. 當試圖調試別人對分離意味着什麼的概念時,維護是一場噩夢。 Don't know how many of you people have ever tried to update a FLEX site that used Cairngorm as the MVC model but what should take 30 seconds to update can often take over 2 hours (hunting/tracing/debugging just to find a single event). 不知道有多少人試圖更新使用Cairngorm作爲MVC模型的FLEX站點,但更新需要30秒才能花費2個多小時(搜索/跟蹤/調試只是爲了查找單個事件) )。 MVC was and still is, for me, an "advantage" that you can stuff. 對我來說,MVC過去和現在仍然是一個“優勢”。


#5樓

Here's a quick Get Started post I wrote on BackboneJS. 這是我在BackboneJS上寫的一篇快速入門帖子。 Hope it helps! 希望能幫助到你! http://www.infragistics.com/community/blogs/nanil/archive/2013/04/01/exploring-javascript-mv-frameworks-part-1-hello-backbonejs.aspx http://www.infragistics.com/community/blogs/nanil/archive/2013/04/01/exploring-javascript-mv-frameworks-part-1-hello-backbonejs.aspx


#6樓

Is an MVC design pattern on the client side, believe me.. It's gonna save you tons of code, not to mention a more clean and clear code, a more easy to maintain code. 在客戶端是一個MVC設計模式,相信我..它將爲您節省大量代碼,更不用說更乾淨和清晰的代碼,更容易維護代碼。 Could be a little tricky at first, but believe me it's a great library. 起初可能有點棘手,但相信我這是一個很棒的圖書館。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章