发布于 2016-08-23 23:32:35 | 180 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Marionette Backbone.js 组合框架

Backbone.Marionette 是 Backbone.js 的一个组合应用库,简化了大规模 JavaScript 应用的开发。包含一组常用的设计模式。


Marionette 3.0.0 发布了,该版本较 2.x 版本来说,有了许多的改进,当然也包括一些 API 的更改。下面是详细的更新内容:

View

  • LayoutView + ItemView merge and rename to View.

  • Marionette.View -> ViewMixin

  • Added LayoutView shortcut methods such as showChildView.

  • isDestroyed and isRendered made private with a public accessor method.

  • Now set _isDestroyed to false by default

  • Call Backbone.View with result of options (163188e)

  • CompositeView's renderChildren is now public.

  • Renamed childEvents to childViewEvents.

  • Removed passing view options as a function

  • Renamed templateHelpers to templateContext

  • Made sure before:render is triggered before emptying regions.

  • Regions are not attached directly to the layout. Use getRegion to access the region orshowChildView to show a View within it.

  • Allowed CompositeView to attach to existing HTML with template:false

  • Added hasRegion for layouts

  • Enabled passing preventDestroy to region.empty.

  • View now removes its element before destroying child regions. There was an option to turn it on, but now it’s available by default. This helps remove all of the synchronous paints going up the tree.

CollectionView

  • The childView attribute now accepts a function

  • getChildView was removed

  • emptyView now accepts a function as an arg.

  • Proxied events do not append “this” as an argument

  • Removed the apply:filter event from CollectionView.

  • removeChildView now returns the removed view.

Regions

  • Fixed inconsistency in addRegion, it now behaves like addRegions and adds the region to internal this.regions.

  • View can replace regions's el.

  • Replaced region manager with region-mixin.

  • Removed static buildRegion

  • Removed swap events.

Application

  • Introduced region to Application (rootRegion)

  • Removed regions

  • Removed Initializers and Finalizers Callbacks

  • Removed Application ventcommandsrequests

Object

  • Added support for Object.isDestroyed

ES6

  • Added Rest & Spread ES6 syntax

  • using ES6 Modules

  • Replaced var and let with const.

General Enhancements

  • Added DEV_MODE

  • Changed _.rest multiple arg usage to drop for lodash 3 support.

  • Behavior, View Mixins.

  • Added cid field to object, application, behavior, and region

  • Added TemplateCache options.

  • Allow a user to define trigger handlers in options.

  • Increased Lodash compatibility, (now supports upto lodash 4)

  • Added first class support for Backbone.Radio in Mn.Object

  • Updated BB and _ deps to modern versions

  • Updated Radio from 0.9 to 2.0

  • delegateEntityEvents. Delegate Events used to set delegate entity events, it was extracted because now backbone calls delegateEvent everytime the element is set.

  • Added Backbone.Babysitter to Mn and removed the Babysitter dependency.

Deprecations

  • Deprecated CompositeView

  • Deprecated Behavior Lookups.

Removed

  • Removed Marionette.Module - there’s a shim that you can pull in to get Module and Deferred

  • Removed Marionette.Deferred

  • Removed component.json

  • Removed Controller

  • Removed Callbacks

  • Removed Wreqr (replaced with Radio)

  • Removed actAsCollection

  • Removed _getValue.

API Renames

  • Renamed render:collection => render:children

  • Renamed bindEntityEvents => bindEvents.

点击查看官方发行说明:

以及更细日志:

下载地址:



历史版本 :
Marionette v3.5.1 发布,Backbone.js 组合框架
Marionette v3.4.2 发布,Backbone.js 组合框架
Marionette v3.4.0 发布,Backbone.js 组合框架
Marionette v3.3.1 发布,Backbone.js 组合框架
Marionette v3.2.0 发布,Backbone.js 组合框架
Marionette 3.0.0 发布,Backbone.js 组合框架
Marionette 3.0.0-pre.5 发布,Backbone.js 组合框架
Marionette 2.4.6 发布,Backbone.js 组合框架
Marionette 2.4.5 和 v2.5.6 发布,Backbone.js 组合框架
Marionette 2.4.4 发布,Backbone.js 组合框架
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务