Backbone.js essentials : build amazing high-performance web applications using Backbone.js /
If you are a developer with baseline JavaScript proficiency and are familiar with the jQuery library, then this book is ideal for you. Whether you've tried building complex web applications before and been frustrated by the challenge of doing so without the proper tools, or whether you've...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2015.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Building a Single-Page Site Using Backbone; What is Backbone?; Why choose Backbone?; A Brief History of Web Development; Benefits of Backbone and single-page applications; Full User Interface Asset Control; Simpler Data Management and Event Triggers; Enhanced performance; Backbone and Its Competitors; Summary; Chapter 2: Object-Oriented JavaScript with Backbone Classes; JavaScript's class system; The new keyword; Prototypal inheritance
- Extending Backbone classesApplying parent methods; Introducing Underscore; More Underscore; Each, Map, and Reduce; Extend and defaults; Pluck and invoke; Further reading; Summary; Chapter 3: Accessing Server Data With Models; The purpose of Models; Attributes, options, and properties; Getters and setters; Listening for events; Available events; Custom events; Server-side actions; Storing URLs on the client; Identification; Fetching data from the server; Saving data to the server; Validation; Return of Underscore; Summary; Chapter 4: Organizing Models With Collections; Working with Collections
- Collections and ModelsAdding to and resetting Collections; Indexing; Sorting; Events; Server-side actions; Underscore methods; Previously mentioned methods; Testing methods; Extraction methods; Ordering methods; Summary; Chapter 5: Adding and Modifying Elements with Views; Views are the core of Backbone-powered sites; Instantiating Views; Rendering view content; Connecting Views to Models and Collections; Accessing a View's el element; A brief aside on Variable names; Handling events; Rendering strategies; Simple templating; Advanced templating; Logic-based; The combined approach
- Other render considerationsChild views; Repeatable versus one-time renders; Return value
- this or this.el; Summary; Chapter 6: Creating Client-side Pages with Routers; Backbone routers enable single-page applications; How Routers work; Backbone.history; Differences between routes and pages; Creating a new Router; Creating routes; Route styles; A note about routing conflicts; Trailing slashes; Redirects; 404s and other errors; Routing events; Multiple routers; Page views; Summary; Chapter 7: Fitting Square Pegs in Round Holes: Advanced Backbone Techniques; Taking it up a notch
- Methods in place of propertiesCollection.model as a factory method; Overriding a class constructor; Class mixins; Publish/subscribe; Wrapping widgets of other libraries; Summary; Chapter 8: Scaling Up
- Ensuring Performance in Complex Applications; Backbone and performance; Causes of performance issues; CPU-related performance issues; Event delegation; Bandwidth-related performance issues; Downloading excessively large files; Downloading excessive number of files; Memory-related performance issues; Summary; Chapter 9: What Was I Thinking? Documenting Backbone Code; Backbone and documentation