Mastering Backbone.js.
Annotation
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Packt Publishing,
2016.
|
Temas: | |
Acceso en línea: | 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
- Layout
- Putting 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 server
- Attaching 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 store
- Performing 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 Jasmine
- Expectations
- 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
- Service applications
- OAuth2 grant types
- Authorization code grant
- Implicit Grant
- Resource Owner Password Credentials Grant
- Client credentials grant
- Resume
- Implementing HTTP Basic Authentication
- Implementing OAuth authentication
- Summary
- Index.