- 出版社: O'Reilly Media, Inc, USA (2011年9月16日)
- 平装: 280页
- 语种： 英语
- ISBN: 144930351X
- 条形码: 9781449303518
- 商品尺寸: 17.8 x 1.5 x 23.3 cm
- 商品重量: 463 g
- ASIN: 144930351X
- 用户评分: 4 条商品评论
- 亚马逊热销商品排名: 图书商品里排第801,010名 (查看图书商品销售排行榜)
这本书教你如何用Js编写mvc框架的应用， 教你如何编写自己的framework, jQuery插件等，然后还有介绍各种framework 比如 BackBone.js，和作者自己写的framework, Spine.js。
But, you need to be at the right stage... which is basically, when you can follow the book, although it may take a bit of effort. If you're already a ninja, you probably don't need to read the book at all, unless you simply want to be exposed to another POV. And, for a lot of non-ninja, the book will be too advanced. Luckily, O'Reilly put the entire first chapter on-line so you can judge for yourself.
Chapter 1 is no namby pampy intro. In the chapter McCaw defines a constructor function used to create constructor functions that emulate classes in languages which support classes natively. He also includes a useful discussion of how the 'this' context switches in JS and how to control it with bind or by defining a jQ-like proxy method. Later design patterns have some similarity to what he does in chapter 1 (using Object.create instead of constructors), so if you can follow this chapter, you're probably ready to take on the book.
Some of the other reviews have touched on a few negatives, but to my mind they're not enough to downgrade the book. Occasionaly, the discussion seems to jump over an explanatory detail, but if you make a lab page that links to the book errata page and download the code for the examples, you should be able to fill in any gaps. I found the first five chapters fascinating, and chapters 6-13 useful and concise roll ups on various topics like dependency management, debugging and various libraries. In addition there are appendices that do a quick survey of jQuery and CSS3.
These issues are the main reason I've given the book just three stars. I'm hoping the issues will be addressed in any future second edition, at which time this will definitely be a five star book.
One other thing, chapter 11 is on Spine.js. This chapter is now a little out-of-date, for example Spine now uses CoffeeScripts classes, so you may want to use the excellent online documentation for spine.js instead.
While all the examples and everything work if you use his libraries and versions of backbone.js, his version of backbone.js is 0.3.0 while the current version is 1.1.0!
I wasted a lot of time trying to work through the examples but using my own project's needs. For example the "bind" call in Chapter 12 is actually now "listenTo". And the "refresh" event doesn't work, I had to use the "sync" event.
Also the author's "spine" library no longer looks supported.
When you're learning something new, it's always a challenge. This is particularly difficult if you have a library that is outdated, and the text refers to that outdated library.
Unfortunately, I didn't find out in time before I could return the book.
I would look for something that is more modern and uses some latest version of backbone.js.
It's like getting a complete set of legos as a kid, with initial models to follow at first and then adapt to your own creative directions. Working through the examples is quick and addicting, and at the end you have the beginnings of the beautiful web app that you always wanted to develop.
It's helpful to know how to set up your own RESTful web service (not included in this book) to try out the Ajax persistence, but even so you can get by just fine without it using local persistence in HTML 5.
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Programming（编程） > Languages & Tools
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Programming（编程） > Software Design, Testing & Engineering > Software Development
- 图书 > 进口原版 > Reference（参考书）