官术网_书友最值得收藏!

What this book covers

Chapter 1, Reducing Boilerplate with Plugin Development, starts with the basics of why reusing your code is important, and how we can achieve that by creating custom Backbone.js widgets and mixins.

Chapter 2, Working with Views, discusses the different points related to view rendering and layout management. Starting from partial updating of views, functionality of nested views or subviews for different processes of JavaScript template management and best practices, this chapter covers most of the problems a developer may face while working with views. We conclude by writing about the Marionette custom views and the Layout Manager plugin for complex app layout management.

Chapter 3, Working with Models, talks about different patterns while working with Backbone models, including data validation, model serialization to fetch data, and saving data to the server. We also analyze the relational data model for one-to-many and many-to-many relationships using Backbone's relational plugin.

Chapter 4, Working with Collections, covers a number of common problems that developers face while using Backbone collections. We explain how to apply basic and multiple sorting, how to apply filtering to a collection, and how to manage a collection while a mixed set of data is passed from the server.

Chapter 5, Routing Best Practices and Subrouting, covers a number of best practices you should follow while working with routers. We also discuss the benefits of using multiple routers or subrouters for complex and large-level applications.

Chapter 6, Working with Events, Sync, and Storage, begins by describing the importance of custom events to enhance an application's modularity and reusability. We also discuss using an application-level event manager to work as a centralized PubSub system, and the use of the Backbone.sync() method to create different data-persistent strategies.

Chapter 7, Organizing Backbone Applications – Structure, Optimize, and Deploy, is one of the most important chapters that a developer will find very useful if they are developing a complex Backbone application. It talks about the application directory structure, organizing and managing files with RequireJS, and the different architectural patterns that every JavaScript developer should follow to develop large-scale application architectures.

Chapter 8, Unit Test, Stub, Spy, and Mock Your App, talks about the benefits of unit testing your JavaScript application, and introduces you to the QUnit and SinonJS test frameworks.

Appendix A, Books, Tutorials, and References, lists a number of useful Backbone.js resources that you may find helpful.

Appendix B, Precompiling Templates on the Server Side, describes the benefits of precompiling JavaScript templates at server side with examples.

Appendix C, Organizing Templates with AMD and Require.js, discusses the process of storing and organizing JavaScript templates with the RequireJS, text!, and tpl! plugins.

主站蜘蛛池模板: 奎屯市| 绍兴县| 当雄县| 旬邑县| 浮梁县| 稻城县| 天台县| 商河县| 邵阳市| 六枝特区| 屏边| 宜兰市| 宜兴市| 庆元县| 武城县| 建瓯市| 乌兰浩特市| 石阡县| 灌阳县| 苍梧县| 林口县| 抚松县| 轮台县| 内江市| 开鲁县| 瓮安县| 郧西县| 抚宁县| 安阳县| 曲阳县| 皋兰县| 增城市| 唐山市| 杭锦后旗| 青海省| 平湖市| 安康市| 穆棱市| 上蔡县| 佛坪县| 阿拉善右旗|