[Backbone]Make Backbone Better With Extensions
Backbone is becoming wildly popular as a web application development framework. Along with this popularity comes countless extensions
and plugins to enhance the power of the framework, and fill in holes that other felt needed filling. Let's take a look at some of the best choices.
Developed by Derick Bailey, this extension is quite large and is my personal favorite. Rather than adding one or two features to Backbone, Derick decided to fill in all the biggest holes that he felt existed. Here's what he says about it in the readme file
of theGitHub project.
"Backbone.Marionette is a composite application library for Backbone.js that aims to simplify the construction of large scale JavaScript applications. It is a collection
of common design and implementation patterns found in the applications that I (Derick Bailey) have been building with Backbone, and includes various pieces inspired by composite application architectures, such as Microsoft's "Prism" framework."
Let's take a closer look at what Marionette provides us with:
- Application: This is a central object that everything in your application can communicate through. It offers a way to set up the main view(s) of your application quickly and easily, a central event hub that every module in
your application can communicate through so they aren't dependent on one another, and initializers for fine-grained control of how your application boots up. - Modules: A means of encapsulating module code and namespacing those modules on the central application object.
- Views: New view classes to extend that offer native methods for cleaning up, so you don't end up with memory leaks. It also contains rendering boilerplate; for simple views, simply specify the template and model, and it'll
handle the rest. - Collection/Composite Views: This is where the "composite application library" bit comes into play. These two views allow you to easily create views that can handle the process of rendering all the views in a collection, or
even a nested hierarchy of collections and models, with very little effort. - Regions and Layouts: A region is a object that can handle all the work of rendering, unrendering, and closing views for a particular place in the DOM. A Layout is simply a normal view that also has regions built into it for
handling subviews. - AppRouter: A new type of router that can take a controller to handle the workload so that the router can just contain the configuration of the routes.
- Events: Extended from the Wreqr project, Marionette makes Backbone's
events even more powerful for creating large-scale event-based applications.
[Backbone]Make Backbone Better With Extensions的更多相关文章
- 【Backbone】 Backbone初探
前言 在此之前研究了一段React,但是不得不承认React.Vue等MVVM框架相对于原有的Jquery来说,简直是翻天覆地的不同.它们之间的差异不仅仅体现在框架思维的不同,而是ES5到ES6的编程 ...
- [Backbone] Customzing Backbone
Convert the AppointmentForm view below to use Mustache templating. Make sure you remember to change ...
- MVC、MVP、MVVM、Angular.js、Knockout.js、Backbone.js、React.js、Ember.js、Avalon.js、Vue.js 概念摘录
注:文章内容都是摘录性文字,自己阅读的一些笔记,方便日后查看. MVC MVC(Model-View-Controller),M 是指业务模型,V 是指用户界面,C 则是控制器,使用 MVC 的目的是 ...
- Backbone源码分析(一)
距离上一篇博客有一段时间了,期间各种琐事萦绕.最主要的一件是,当我差不多将整个dojo核心源码看完,惊讶的发现dojo1.*的设计以是老态龙钟之象,而我沉溺在dojo中太久,已经不知道前端世界变成了什 ...
- RequireJS与Backbone简单整合
前言 昨天我们一起学习了Backbone,最后做了一个备忘录的例子,说是做了不如说是看了下官方提供的例子,所以最终我感觉我们还是没能掌握Backbone,今天还得做个其它例子先. 然后前面也只是草草学 ...
- 浅谈HTML5单页面架构(二)——backbone + requirejs + zepto + underscore
本文转载自:http://www.cnblogs.com/kenkofox/p/4648472.html 上一篇<浅谈HTML5单页面架构(一)--requirejs + angular + a ...
- TodoMVC中的Backbone+MarionetteJS+RequireJS例子源码分析之二 数据处理
当我们使用jQuery时大部分时间是聚焦于Dom节点的处理,给Dom节点绑定事件等等:前端mvc框架backbone则如何呢? M-Model,Collection等,是聚焦于数据的处理,它把与后台数 ...
- TodoMVC中的Backbone+MarionetteJS+RequireJS例子源码分析之一
Marionette牵线木偶,Backbone是脊骨的意思,Marionette是基于Backbone做扩展库,可以理解为把脊骨骨架绑线扯着变成牵线木偶动起来哈哈,使backbone更易使用呵呵! 构 ...
- Django+Tastypie作后端,Backbone作前端的TodoMVC
TodoMVC是各种js框架入门的比较经典的例子,详细可查看github地址https://github.com/tastejs/todomvc 接着上篇文章, 1,先在github上把backbon ...
随机推荐
- 如何捕获winform程序全局异常?(续)
前言 上篇文章我提供了一种方案可以供我们捕获单线程程序中的所有未处理异常.但是如果程序是多线程,那么新增线程出现了异常上个方案就无能为力了.本着方案总比问题多的态度,我再给大家提供一种新的方案,供大家 ...
- Oracle数据库top10物理段
select owner, name, type, mega, tbs from (select owner, case when ...
- linux命令:rm
删文件要一个个回答y,谁有好办法自动删除? rm -rf 用rm递归删除目录下面的所有.o文件: find . -name "*.o" | xargs rm -f :
- 在Python中使用正则表达式同时匹配邮箱和电话并进行简单的分类
在Python使用正则表达式需要使用re(regular exprssion)模块,使用正则表达式的难点就在于如何写好p=re.compile(r' 正则表达式')的内容. 下面是在Python中使用 ...
- 单选按钮易忽略的Group属性
Group就其意思就是一组的意思.就是说用于选择多个控件组合,选了TRUE后,你就可以为这组新建一个变量.把一组控件当一个控件来使用.例如多个单选按钮用group属性,这样你就可以用一个变量来管理这些 ...
- XDU 1284 寻找礼物
枚举+二分查找. A+B+C >= K ----> C >= K - A -B ----> 统计大于等于C的个数就可以. #include <cstdio&g ...
- Vmware linux 安装 Vmware Tools 提示只读
在Vmware 虚拟机里安装完linux ,安装Vmware Tools,的时候会提示只读问题,是因为在安装 Vmware Tools 使用的是光盘挂在,光盘为只读文件,所以没有办法再光盘上直接的解压 ...
- DataReader,DataTable利用泛型填充实体类
using System; using System.Collections.Generic; using System.Linq; using System.Web; /// <summary ...
- SilkTest Q&A 11
101. 如何从其他的机器访问脚本? 答案:将包含脚本的文件夹共享出来…非常简单…你可以使用connect()在你本机运行脚本从而使得它们在其他的一些机器上执行…但是其他人无法访问这些脚本,除非你将它 ...
- Swift - 给项目导入资源
如果想添加资源到项目中去,只要通过鼠标左键将文件或者存有文件的文件夹直接拖到Xcode中. 当松开鼠标后会弹出如下面板: (1)勾上“Copy items if needed”就会拷贝文件进项目, ...