Начать новую тему Ответить на тему
Статистика раздачи
Размер: 3.71 МБ | | Скачали: 0
Сидеров: 0  [0 байт/сек]    Личеров: 0  [0 байт/сек]
Пред. тема | След. тема 

Автор
Сообщение

Ответить с цитатой 

Backbone.js Patterns and Best Practices

Год: 2014
Автор: Swarnendu De
Издательство: Packt Publishing
ISBN: 978-1-78328-358-3
Язык: Английский
Формат: PDF/EPUB/MOBI
Качество: Изначально компьютерное (eBook)
Количество страниц: 174
Описание:

In Detail

Backbone.js is a super light framework that allows you to structure your JavaScript codes in an MV* 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 Practices is 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.

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 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.
Preface
Chapter 1: Reducing Boilerplate with Plugin Development

Basic components of Backbone.js
Using Underscore.js
Re-using code with extensions
Creating a base class
Developing plugins without extending base classes
Understanding JavaScript mixins
What is a mixin?
Creating classic mixins
Creating functional mixins
Caching mixin functions
Using curry to combine a function and arguments
Chapter 2: Working with Views
Basic usage of views
Understanding the el property
Listening to view events
Displaying model data with templates
Partially updating a view
Understanding nested views
Knowing when to use subviews
Avoiding multiple DOM reflw
Re-rendering parent views
Removing parent views
Working with templates
Storing templates in an HTML fie
Storing templates in a JavaScript fie
Precompiling templates
Avoiding evaluation in templates
Using template helper functions
Understanding automatic model-view data binding
Using Marionette's ItemView, CollectionView, and CompositeView
ItemView
CollectionView
Working with CompositeView
Using Layout Manager
Chapter 3: Working with Models
Basic usage of models
Using the defaults property
Avoiding object references in the defaults property
Data interaction with the server
Validating the data
Using the Backbone.Validation plugin
Confiuring validation rules
Prevalidating a model with the preValidate() method
Serializing models
Understanding the relational data model
Chapter 4: Working with Collections
Basic usage of collections
Performing data operations with collections
Fetching data from the server
Saving data to the server
Sorting a collection
Sorting a collection with multiple attributes
Filtering a collection
Performing basic fitering
Filtering a collection with a duplicate collection
Self-fitering with full data pointers
Understanding the collection of multiple model types
Chapter 5: Routing Best Practices and Subrouting
Working with routers
Best practices for working with routers
Avoiding large functional code in route methods
Instantiating views in router methods
Using regular expressions for selective routing
Subrouting – a key to organizing complex apps
Chapter 6: Working with Events, Sync, and Storage
Understanding custom events
A simple case study on custom events
Using an event dispatcher
Creating multiple event dispatchers
Using different event namespaces
Avoiding memory leaks with the listenTo() method
Overriding the Backbone.sync() method
Offlne storage using the Backbone.LocalStorage adapter
Chapter 7: Organizing Backbone Applications – Structure, Optimize, and Deploy
Understanding the application directory structure
Working with Asynchronous Module Defiition
Adding Require.js to your project
Confiuring dependencies
Defiing a module
Creating application architecture
Managing a project directory
Organizing code with AMD
Setting up an application
Using the module pattern
Managing objects and module communication
Understanding view management
Understanding other important features
Chapter 8: Unit Test, Stub, Spy, and Mock Your App
Understanding why unit testing is important
Testing with QUnit
Performing a basic test case
Understanding the QUnit module (), setup (), and teardown () methods
Testing Backbone.js components with QUnit
Using test spies, stubs, and mocks with SinonJS
Testing with spies
Testing with stubs
Testing with mocks
Difference between mocks and stubs
Appendix A: Books, Tutorials, and References
Books for reference
Tutorials
Unit testing
Other plugins and tutorials
Appendix B: Precompiling Templates on the Server Side
Appendix C: Organizing Templates with AMD and Require.js
Precompiling with the requirejs-tpl plugin
Index
Внимание! К данной книге имеются исходники кода, их можно найти на сайте O'Reilly или Packt Publishing
Правила, инструкции, FAQ!!!
Торрент   Скачать торрент Магнет ссылка
Скачать торрент
[ Размер 5.39 КБ / Просмотров 66 ]

Статус
Проверен 
 
Размер  3.71 МБ
Приватный: Нет (DHT включён)
.torrent скачан  0
Как залить торрент? | Как скачать Torrent? | Ошибка в торренте? Качайте магнет  


     Отправить личное сообщение
   
Страница 1 из 1
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему


Сейчас эту тему просматривают: нет зарегистрированных пользователей и гости: 1


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Перейти:  
Ресурс не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!