[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.
相关文章
- Edit PDF Pages With ComPDFKit in Objective-C
- ORA-02096: specified initialization parameter is not modifiable with this option ORACLE 报错 故障修复 远程处理
- ORA-19699: cannot make copies with compression enabled ORACLE 报错 故障修复 远程处理
- ORA-25156: old style outer join (+) cannot be used with ANSI joins ORACLE 报错 故障修复 远程处理
- ORA-31052: Cannot delete ACL with other references ORACLE 报错 故障修复 远程处理
- ORA-55443: a virtual model cannot be used with a rulebase in a SEM_MATCH query ORACLE 报错 故障修复 远程处理
- Java之创建对象>3.Enforce the singleton property with a private constructor or an enum type详解编程语言
- 工具使用Linux下的Make工具分享编程之旅(linux下的make)
- 建立 Linux:抛弃Make 的新方式(linux没有make)
- Secure Your Data with Effective Oracle Password Management(oracle口令管理)
- Maximizing Data Efficiency with Oracle TAB Tables: A Comprehensive Guide(oracletab表)
- Redis Makes Managing Directories a Breeze: How to Streamline Your Data with Redis Dir(redisdir)
- Efficient Date Generation with Oracle: Tips and Tricks(oracle生成日期)
- 语句Oracle中简洁的With语句(oracle 中with)
- MySQL查询优化使用WITH子句的限制与替代方案(mysql不能用with)