每個在 twitter 上關注 backbone.js 的人都忍不住轉帖了這個 sample code :
http://wmdmark.github.io/backbone-rivets-example/
http://wmdmark.github.io/backbone-rivets-example/
當第一眼看到 Rivets.js 的語法時, 就直覺想到 Angular.js ,
但讓我更高興的是 “在自由軟體市場上” , 多了一個可以與 Angular.js 打對台的技術了 .
Rivets.js 開宗名義就說是 “Lightweight and powerful data binding + templating solution”,
如果要追求效能 , 像這樣的作品是很值得參考的.
但讓我更高興的是 “在自由軟體市場上” , 多了一個可以與 Angular.js 打對台的技術了 .
Rivets.js 開宗名義就說是 “Lightweight and powerful data binding + templating solution”,
如果要追求效能 , 像這樣的作品是很值得參考的.
在這背後更大的議題是 “Two way data-binding” , Backbone.js 的官網有一段讓我印象深刻的文字 :
"Two way data-binding" is avoided. While it certainly makes for a nifty demo, and works for the most basic CRUD, it doesn’t tend to be terribly useful in your real-world app. Sometimes you want to update on every keypress, sometimes on blur, sometimes when the panel is closed, and sometimes when the "save" button is clicked. In almost all cases, simply serializing the form to JSON is faster and easier" ~ from backbone.js officail website.
我們真的需要 “Two way data-binding” 嗎 ?
沒有留言:
張貼留言