Backbone.js Patterns and Best Practices
暫譯: Backbone.js 範式與最佳實踐
Swarnendu De
- 出版商: Packt Publishing
- 出版日期: 2014-01-27
- 售價: $1,830
- 貴賓價: 9.5 折 $1,739
- 語言: 英文
- 頁數: 174
- 裝訂: Paperback
- ISBN: 1783283572
- ISBN-13: 9781783283576
海外代購書籍(需單獨結帳)
相關主題
商品描述
A one-stop guide to best practices and design patterns when building applications using Backbone.js
Overview
- Offers solutions to common Backbone.js related problems that most developers face
- Shows you how to use custom widgets, plugins, and mixins to make your code reusable
- Describes patterns and best practices for large scale JavaScript application architecture and unit testing applications with QUnit and SinonJS frameworks
In Detail
Backbone.js is a super light framework that allows you to structure your JavaScript codes in anMV* fashion. This framework is an excellent tool when it comes to creating an organized and modular code base for web apps of any size or complexity. Although lightweight, Backbone.js results in lots of boilerplate. Learning the best practices and design patterns will help you avoid these problems and allow you to ensure that the best standards are followed.
Backbone.js Patterns and Best Practicesis packed with examples that will help you work with Backbone.js components. It also gives solutions to common problems faced by developers. It gives a complete overview of plugin development, large scale application architecture, and unit testing as well.
Starting with a discussion of why reducing boilerplate in your JavaScript code is essential, Backbone.js Patterns and Best Practices explains how to enforce reusability in your code by creating plugins and mixins. You will learn about patterns and best practices for Backbone views, models, collections, routers, and events.
You will discover solutions to common problems that developers face through simple examples, and delve into the best open source plugins available to solve these problems when they arise. This book is an excellent collection of design and implementation patterns that will help you structure and develop complex Backbone.js applications easily.
What you will learn from this book
- Develop custom plugins and mixins to reduce boilerplate in your code
- Learn about Backbone view management with nested views, subviews, layout manager, and Marionette views
- Understand template management by storing and pre-compiling templates
- Explore model validation with validation plugins and learn model serialization and relational data management with nested models
- Work with collections to implement multiple sorting and filtering behavior
- Create solid application architecture with AMD and different popular design patterns
Approach
This is a step-by-step guide to design patterns, best practices, and solutions to common problems for Backbone.js-based application development.
Who this book is written for
This book is for JavaScript developers who work with Backbone.js and want to learn the best design patterns to develop complex web applications. Basic knowledge of Backbone.js and JavaScript is essential.
商品描述(中文翻譯)
一站式指南,提供使用 Backbone.js 建立應用程式的最佳實踐和設計模式
概述
- 提供解決大多數開發者面臨的常見 Backbone.js 相關問題的方案
- 教你如何使用自訂小工具、插件和混合類別來使你的程式碼可重用
- 描述大型 JavaScript 應用程式架構和使用 QUnit 及 SinonJS 框架進行單元測試的模式和最佳實踐
詳細內容
Backbone.js 是一個超輕量的框架,允許你以 MV* 方式結構化你的 JavaScript 程式碼。這個框架在創建有組織且模組化的程式碼基礎時,是任何大小或複雜度的網頁應用程式的絕佳工具。儘管輕量,Backbone.js 會產生大量的樣板程式碼。學習最佳實踐和設計模式將幫助你避免這些問題,並確保遵循最佳標準。
《Backbone.js 模式與最佳實踐》充滿了幫助你使用 Backbone.js 元件的範例。它還提供了解決開發者面臨的常見問題的方案。它對插件開發、大型應用程式架構和單元測試提供了完整的概述。
本書從討論為何減少 JavaScript 程式碼中的樣板程式碼是必要的開始,解釋如何通過創建插件和混合類別來強化程式碼的可重用性。你將學習 Backbone 視圖、模型、集合、路由器和事件的模式與最佳實踐。
你將通過簡單的範例發現開發者面臨的常見問題的解決方案,並深入探索可用來解決這些問題的最佳開源插件。本書是一個優秀的設計和實作模式的集合,將幫助你輕鬆結構化和開發複雜的 Backbone.js 應用程式。
你將從本書學到的內容
- 開發自訂插件和混合類別以減少程式碼中的樣板程式碼
- 學習使用嵌套視圖、子視圖、佈局管理器和 Marionette 視圖進行 Backbone 視圖管理
- 通過儲存和預編譯模板來理解模板管理
- 探索使用驗證插件進行模型驗證,並學習使用嵌套模型進行模型序列化和關聯數據管理
- 使用集合實現多重排序和過濾行為
- 使用 AMD 和不同流行設計模式創建穩固的應用程式架構
方法
這是一本針對 Backbone.js 基礎應用程式開發的設計模式、最佳實踐和常見問題解決方案的逐步指南。
本書的讀者對象
本書適合使用 Backbone.js 的 JavaScript 開發者,並希望學習最佳設計模式以開發複雜的網頁應用程式。對 Backbone.js 和 JavaScript 的基本知識是必須的。