Backbone.jsの公式サイトは、各リリース時のドキュメントを残しています。
めっちゃ素晴らしいポリシーです。
歴史をたどってみましょう。
2010年
10月
0.1.0
最初のリリース
この頃のクラス
- Events
- Model
- Collection
- Sync
- View
Routerはまだありません。
How is this different than SproutCore or Cappuccino?
この頃のライバルはSproutCoreとCappuccino。
まだAngular.jsやEmber.jsは意識されていません。
Ember.jsはSproutCoreの後継のようです。
Anglar.jsは同月リリースです。お互い知らなかったのでしょう。
all three projects apply general Model-View-Controller principles to JavaScript applications.
この頃は明確にMVCを謳っていました。
0.1.2
Added a Model#fetch method for refreshing the attributes of single model from the server.
fetchメソッドはCollectionにしかありませんでした。Model単体でfetchできるようになりました。
Backbone is now published as an NPM module.
npmモジュールを提供しはじめました。
0.2.0
Instead of requiring server responses to be namespaced under a model key, now you can define your own parse method to convert responses into attributes for Models and Collections.
Added a toJSON function to Collections. Added Underscore's chain to Collections.
parseとtoJSONメソッドが定義されました。
サーバーと通信するデータ形式をカスタマイズできるようになりました。
11月
0.3.0
Controller追加
Backbone now has Controllers and History, for doing client-side routing based on URL fragments.
ControllerとHistoryが追加されました。
Controllerはその後Routerと名前を変えます。
まだHistary APIには対応していません。
0.3.1
All "add" and "remove" events are now sent through the model, so that views can listen for them without having to know about the collection.
よくわかりません。
今と逆な気がします。
0.3.2
Bugfix for IE7 + iframe-based "hashchange" events. sync may now be overridden on a per-model, or per-collection basis.
主にバグフィックスです。
12月
0.3.3
Backbone.js now supports Zepto, alongside jQuery, as a framework for DOM manipulation and Ajax support.
jQueryの代替ライブラリに対応しました。
2011年
7月
0.5.0
MVCではない宣言。
Different implementations of the Model-View-Controller pattern tend to disagree about the definition of a controller.
「伝統的なMVCとは違います」という注意書きが入りました。
HTML5 pushState support
History APIをサポートしました。
Controller was renamed to Router
Controllerの名前がRouterに変わりました。
0.5.1
Cleanups from the 0.5.0 release
0.5.0がビッグチェンジだったので、修正が必要だったみたいです。
0.5.2
The bind function, can now take an optional third argument, to specify the this of the callback function.
イベントのbind時に、コールバック関数のコンテキストを指定できるようになりました。
bind関数はその後0.9.0でonに名前を変えます。
Multiple models with the same id are now allowed in a collection.
一つのCollection中でModelのid重複を許容します。
その後0.9.0で再び禁止されます。
8月
0.5.3
A View's events property may now be defined as a function
Viewのeventsに関数を直接指定できるようになりました。
それまでは、Viewに定義した関数名だけをサポートしていました。
If the server has already rendered everything on page load, pass Backbone.history.start({silent: true}) to prevent the initial route from triggering.
サーバサイドレンダリング用のオプションが追加されました。
2012年
1月
0.9.0
いろいろ便利なものがたくさん入ります。
だいたい今と同じ形になりました。
breaking changeは...
Multiple models with the same id are no longer allowed in a single collection.
0.5.2の「一つのCollection中でModelのid重複を許容」が再び禁止されました。
bind and unbind have been renamed to on and off for clarity, following jQuery's lead. The old names are also still supported.
bindがonになりました。
2月
0.9.1
0.9.0のバグフィックスと
If you have multiple versions of jQuery on the page, you can now tell Backbone which one to use with Backbone.setDomLibrary.
複数バージョンのjQueryのサポート
3月
0.9.2
Instead of throwing an error when adding duplicate models to a collection, Backbone will now silently skip them instead.
一つのCollection中でModelのid重複したときに、例外を投げる代わりに無視するようになりました。
その他バグフィックス。
12月
0.9.9
1.0に向けた準備リリースなのか、かなりの変更が入ります。
Added listenTo and stopListening to Events.
listenToが入りました。
HTTP PATCH support
PATCHメソッドをサポート。
The Backbone object now extends Events so that you can use it as a global event bus, if you like.
Backboneオブジェクトをイベントバスとして使えるようになりました。
Backbone events now supports once, similar to Node's once, or jQuery's one.
onceが入りました。
To set what library Backbone uses for DOM manipulation and Ajax calls, use Backbone.$ = ... instead of setDomLibrary.
setDomLibraryが$に変わりました。
2013年
1月
0.9.10
Model validation is now only enforced by default in Model#save and no longer enforced by default upon construction or in Model#set, unless the {validate:true} option is passed.
デフォルトでは、saveの時のみModelのバリデーションをするようになりました。
View#make has been removed. You'll need to use $ directly to construct DOM elements now.
View#makeメソッドがなくなりました。0.0.1からあったメソッドです。
The Model#change method has been removed, as delayed attribute changes as no longer available.
Model#changeメソッドがなくなりました。0.0.1からあったメソッドです。
3月
1.0.0
Renamed Collection's "update" to set, for parallelism with the similar model.set(), and contrast with reset.
Collection#updateがModelと同じsetに変わりました。
Added listenToOnce as the analogue of once.
listenToOnceが入りました。
10月
1.1.0
Made the return values of Collection's set, add, remove, and reset more useful. Instead of returning this, they now return the changed (added, removed or updated) model or list of models.
Collectionのメソッドの戻り値を自身から、差分のモデルリストに変えました。
You are no longer permitted to change the id of your model during parse. Use idAttribute instead.
parseメソッドでidを書き換える代わりに、idAttributeを追加しました。
2014年
2月
1.1.1
Backbone now registers itself for AMD (Require.js), Bower and Component, as well as being a CommonJS module and a regular (Java)Script.
AMD、Bower、Component、CommonJSのモジュールに対応しました。
1.1.2
Backbone no longer tries to require jQuery in Node/CommonJS environments, for better compatibility with folks using Browserify. If you'd like to have Backbone use jQuery from Node, assign it like so: Backbone.$ = require('jquery');
CommonJS環境でjQueryを自動的に探すのをやめました。
Browserifyで使いやすくなりました。
2015年
5月
1.2.0
Added new hooks to Views to allow them to work without jQuery. See the wiki page for more info.
jQueryなしでも動くようになりました。代わりのプラグインは必要です。
6月
1.2.1
When using on with an event map, you can now pass the context as the second argument. This was a previously undocumented feature inadvertently removed in 1.2.0.
1.2.0で削除された、イベントマップの第二引数でコンテキストを指定できる機能が復活しました。
8月
1.2.2
Backbone Events once again supports multiple-event maps (obj.on({'error change': action})). This was a previously undocumented feature inadvertently removed in 1.2.0.
1.2.0で削除された、マップ形式での複数イベント指定のサポートが復活しました。
9月
1.2.3
Fixed a minor regression in 1.2.2 that would cause an error when adding a model to a collection at an out of bounds index.
バグフィックス
2016年
3月
1.3.3
Removed component package support.
componentのサポート中止
感想
長い時間をかけて、変更はいろいろ入っています。
それでもコンセプトが0.0.1から全く変わっていません。
すごい。