Mastering web application development with Express : a comprehensive guide to developing production-ready web applications with Express /
If you are a Node.js developer who wants to take your Express skills to the next level and develop high performing, reliable web applications using best practices, this book is ideal for you. The only prerequisite is knowledge of Node.js.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2014.
|
Colección: | Community experience distilled.
|
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: Diving into Express; The best parts of Express; Comparing Express with other frameworks; Goal; Conventions; Databases; Views; Overall; Use cases; Complex applications with heavy I/O bound operations; Single-page applications; Reusable applications; Code sharing between the server and the client; A base to create more complex frameworks; Bad use cases; Express into the wild; Application structure; Group files by features; Model-View-Controller.
- Developing a real MVC applicationSummary; Chapter 2: Component Modularity Using Middleware; Connecting middleware; The functionality of middleware; Pushing items to an array; Looking at the execution flow using logs; Creating configurable middleware; Closures to the rescue; Caching middleware
- a practical example; A first try at the caching middleware; Measuring the performance benefits of the caching middleware; Making the caching middleware configurable; Environment-based loading of middleware; Express routes; Specifying the path; Reusable route handlers; Route wildcards.
- Ordering of middlewareHandling errors with middleware; Mounting subapplications; Replicating the middleware system; The main file; Handling requests; Demoing the application; Adding the routes handler; Summary; Chapter 3: Creating RESTful APIs; An overview of REST; HTTP methods (verbs); HTTP status codes; Successful 2xx; Redirection 3xx; Client error 4xx; Server error 5xx; SmartNotes application requirements; Creating the RESTful URLs of the application; Implementing the SmartNotes application; The bootstrapping phase; Dealing with validation; Creating a custom validation module.
- Improving performance with memoizationImplementing the models; Test helpers; The Note model; The User model; Functional tests and route implementation; User endpoints; Notes endpoints; API versioning; API rate limiting; Throttling; Facilitating caching; Content negotiation; Summary; Chapter 4: Leveraging the Power of Template Engines; The different types of template engines; Logic-less template engines; Template engines with logic; Programmatic template engines; View helpers and application-level data; Sharing code between templates with partial views; DRY templates with layouts.
- Template engine consolidation with consolidate.jsView caching in production; The view cache setting and its effect; Clearing the cache without a restart; Integrating a template engine with Express; Choosing a template engine; Summary; Chapter 5: Reusable Patterns for a DRY Code Base; Creating the MovieApp sample application; Application structure and required modules; Creating the server.js file; Creating the route handlers; Doing the heavy lifting inside the model; Wrapping it up; Error checks and callback functions; Tiny modules for better control flow; Ensuring a single callback execution.