Book description
Learn the best practices on writing efficient jQuery applications to maximize performance in large-scale deployments
About This Book
- Learn about the observer pattern and the deferred observer pattern, two of the most popular design patterns that handle custom events
- Advance your jQuery skills by learning about patterns such as divide and conquer, facade, and builder and factory to handle complex results
- This step-by-step guide to applying micro-patterns and optimizing jQuery applications will help you get the best performance in a production environment
Who This Book Is For
This step-by-step guide to applying micro-patterns and optimizing jQuery applications will help you get the best performance in a production environment
What You Will Learn
- Respond to user actions
- Achieve greater flexibility and code decoupling
- Have a central point for emitting and receiving application level events
- Structure the application into small independent modules
- Structure the application into small independent modules
- Isolate the procedure of generating complex parts of the application
- Efficiently orchestrate asynchronous procedures using jQuery Deferred and Promises
- Utilize the most widely-used client-side templating libraries for more complex use cases
In Detail
jQuery is a feature-rich JavaScript library that makes HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a variety of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.
jQuery solves the problems of DOM manipulation, event detection, AJAX calls, element selection and document queries, element attribute and data management, as well as object management utilities. This book addresses these problems and shows you how to make the best of jQuery through the various design patterns available.
jQuery solves the problems of DOM manipulation, event detection, AJAX calls, element selection and document queries, element attribute and data management, as well as object management utilities. This book addresses these problems and shows you how to make the best of jQuery through the various design patterns available.
Style and approach
jQuery solves the problems of DOM manipulation, event detection, AJAX calls, element selection and document queries, element attribute and data management, as well as object management utilities. This book addresses these problems and shows you how to make the best of jQuery through the various design patterns available.
Table of contents
-
jQuery Design Patterns
- Table of Contents
- jQuery Design Patterns
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Preface
- 1. A Refresher on jQuery and the Composite Pattern
- 2. The Observer Pattern
- 3. The Publish/Subscribe Pattern
- 4. Divide and Conquer with the Module Pattern
- 5. The Facade Pattern
- 6. The Builder and Factory Patterns
- 7. Asynchronous Control Flow Patterns
- 8. Mock Object Pattern
- 9. Client-side Templating
- 10. Plugin and Widget Development Patterns
-
11. Optimization Patterns
- Placing scripts near the end of the page
- Bundling and minifying resources
- Using CDNs
- Optimizing common JavaScript code
- Writing performant CSS selectors
- Writing efficient jQuery code
- Lazy Loading Modules
- Summary
- Index
Product information
- Title: jQuery Design Patterns
- Author(s):
- Release date: February 2016
- Publisher(s): Packt Publishing
- ISBN: 9781785888687
You might also like
book
jQuery UI in Action
jQuery UI in Action is a practical guide to using and customizing jQuery UI library components …
book
Practical jQuery
Practical jQuery is your step-by-step guide to using jQuery in the real world, taking you from …
book
Web Development with jQuery
Newly revised and updated resource on jQuery's many features and advantages Web Development with jQuery offers …
book
jQuery in Action, Third Edition
jQuery in Action, Third Edition, is a fast-paced and complete guide to jQuery, focused on the …