Ext JS和Sencha Touch的APIs增强:Deft JS
jopen
10年前
Deft JS 增强了 Ext JS 和 Sencha Touch 的 API,提供额外的构建块用以支持大的开发团队快速开发企业级应用,利用最佳实践和良好的模式实现工业化应用。
Goals
- Flexibility
- Coordinates dynamic assembly of object dependencies based on a configurable IoC container.
- Approachability
- Builds on familiar Ext JS API syntax conventions for ‘pay-as-you-go’ complexity. </ul> </li>
- Simplicity
- Eliminates boilerplate code in favor of the simplest expression of developer intent. </ul> </li>
- Testability
- Promotes loose coupling through class annotation driven dependency injection. </ul> </li>
- Extensibility
- Leverages the advanced class system provided by Ext JS and Sencha Touch. </ul> </li>
- Reusability
- Enables business layer code reuse between Ext JS and Sencha Touch applications. </ul> </li> </ul>
- Provides class annotation-driven dependency injection.
- Maps dependencies by user-defined identifiers.
- Resolves dependencies by class instance, factory function or value.
- Supports singleton and prototype resolution of class instance and factory function dependencies.
- Offers eager and lazy instantiation of dependencies.
- Injects dependencies into Ext JS class configs and properties before the class constructor is executed.
- Provides class annotation-driven association between a given view and its ViewController.
- Clarifies the role of the controller - i.e. controlling a view and delegating work to injected business services (service classes, Stores, etc.).
- Supports multiple independent instances of a given view, each with their own ViewController instance.
- Reduces memory usage by automatically creating and destroying view controllers in tandem with their associated views.
- Supports concise configuration for referencing view components and registering event listeners with view controller methods.
- Integrates with the view destruction lifecycle to allow the view controller to potentially cancel removal and destruction.
- Simplifies clean-up by automatically removing view and view component references and event listeners.
Features
IoC Container
MVC with ViewControllers