精通Backbone.js:构建可扩展Web应用指南

5星 · 超过95%的资源 需积分: 9 53 下载量 91 浏览量 更新于2024-07-21 收藏 2.09MB PDF 举报
"Mastering.Backbone.js.1783288" 本书《Mastering Backbone.js》深入探讨了使用Backbone.js构建可扩展Web应用程序的技巧和最佳实践。Backbone.js是一个广泛使用的库,因其灵活性、强大功能和简洁性而备受全球初创公司的青睐。它允许开发者根据自己的规则选用最适合的工具和库来构建出色的单页应用。然而,由于其灵活性,创建可维护和可扩展的应用可能颇具挑战性。 书中首先介绍如何组织Backbone.js应用,明确每个模块的位置并了解如何将它们连接起来。通过逻辑和物理层面的代码组织,你将掌握如何划分视图的责任,并处理复杂的布局设计。接着,书中将解决双向绑定下模型同步的复杂性,特别是涉及子资源时的处理策略。在管理项目中的模块依赖方面,书中有专门的章节指导你如何有效地进行操作,并探讨向RESTful API上传文件的方法,以及如何在浏览器中直接存储信息以便与Backbone.js配合使用。 测试是确保应用质量的关键,书中的内容也包括了对应用进行测试的指导。最后,当你准备好将应用部署到生产环境时,书中的最后一章将涵盖不同类型的授权策略,确保你的应用在上线后能够安全运行。 掌握Backbone.js库并非易事,但通过本书,读者将获得必要的技能集,能够用它来构建应用,并且能够在你的技术栈中自由选择其他库进行配合。本书的目标是让你不仅学会使用Backbone.js,还能灵活地与其他工具和技术结合,打造高效、稳定的Web应用。
2016-01-29 上传
Backbone.js is a popular library to build single page applications used by many start-ups around the world because of its flexibility, robustness and simplicity. It allows you to bring your own tools and libraries to make amazing webapps with your own rules. However, due to its flexibility it is not always easy to create scalable applications with it. By learning the best practices and project organization you will be able to create maintainable and scalable web applications with Backbone.js. With this book you will start right from organizing your Backbone.js application to learn where to put each module and how to wire them. From organizing your code in a logical and physical way, you will go on to delimit view responsibilities and work with complex layouts. Synchronizing models in a two-way binding can be difficult and with sub resources attached it can be even worse. The next chapter will explain strategies for how to deal with these models. The following chapters will help you to manage module dependencies on your projects, explore strategies to upload files to a RESTful API and store information directly in the browser for using it with Backbone.js. After testing your application, you are ready to deploy it to your production environment. The final chapter will cover different flavors of authorization. The Backbone.js library can be difficult to master, but in this book you will get the necessary skill set to create applications with it, and you will be able to use any other library you want in your stack.