Mastering Backbone.js : design and build scalable web applications using Backbone.js /
Design and build scalable web applications using Backbone.js About This Book Level up your Backbone.js skills and create professional web applications with the best practices Use the Backbone.js components in the right way and avoid maintenance nightmares Improve your development workflow from appli...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2016.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Architecture of a Backbone application; Subapplications based architecture; Subapplication anatomy; Responsibilities of Backbone objects; Views; Models; Collections; Routers; Objects not provided by Backbone; Subapplication façade; Subapplication controller; Contacts application; File organization; Summary; Chapter 2: Managing Views; Identifying view types; ModelView; CollectionView; Adding new models; Deleting models; Destroying views; Resetting the collection; Region
- LayoutPutting it all together; Showing a list; Showing the details; Editing information; Rendering third-party plugins; Conclusions; Chapter 3: Model Bindings; Manual binding; Two-way binding; References; Data binding with plugins; Binding embedded data; Binding an embedded list; Validating model data; Manual validation; Validating with the Backbone.Validation plugin; Summary; Chapter 4: Modular Code; CommonJS modules; NPM and package.json; Browserify; Application dependency; Using Browserify in the app; Solving cyclic dependency; Modularizing templates; Summary; Chapter 5: Dealing with Files
- Express serverAttaching a file into a resource; Uploading the avatar photo to contacts; Showing the avatar; Uploading images from Backbone; Uploading a file with AJAX; Uploading the avatar image at creation time; Encoding the upload file; Summary; Chapter 6: Store data in the Browser; The localStorage; Starting with localStorage; Backbone and localStorage; Store models in localStorage; Store Backbone models in localStorage; Backbone.sync; Using localStorage as cache; IndexedDB; Getting started with IndexedDB; Database versions; Creating stores; Delete a database
- Add elements to an object storePerforming queries; Delete objects in the store; IndexedDB in Backbone; Summary; Chapter 7: Build Like a Pro; Development workflow; What's a task runner?; How Gulp works; Getting started with Gulp; Creating a development workflow; Bundling the JavaScript files with Browserify; Sourcemaps; Re-bundle automatically; BrowserSync; Run server with Express; Creating a production workflow; Gulp useref; Image Optimization; Fonts; Bundle JavaScript files for production; Putting it all together; Summary; Chapter 8: Testing Backbone Applications; Testing tools
- Getting started with JasmineExpectations; Testing asynchronous code; Karma test runner; What and how to test Backbone applications; Testing models and collections; Testing views; Testing controllers; Mocking dependencies; Fake objects; Testing ContactEditor; Testing the subapplication Façade; Summary; Chapter 9: Deploying to Production; Heroku; Dynos; Getting started with Heroku; Production environment; The HTTP Server; Do not run as root; Process Management; Summary; Chapter 10: Authentication; Stateless API authentication; HTTP Basic authentication; The OAuth2 authentication