Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
jQuery Design Patterns

You're reading from   jQuery Design Patterns Write Elegant, Structured and Efficient jQuery

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher
ISBN-13 9781785888687
Length 246 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Thodoris Greasidis Thodoris Greasidis
Author Profile Icon Thodoris Greasidis
Thodoris Greasidis
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. A Refresher on jQuery and the Composite Pattern FREE CHAPTER 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 Index

Introducing the Builder Pattern


The Builder Pattern is part of the group of Creational Patterns and provides us a way to create objects that require a lot of configuration before they reach the point where they can be used. The Builder Pattern is often used for objects that accept many optional parameters in order to define their operation. Another matching case is for the creation of objects where their configuration needs to be done in several steps or in a specific order.

The common paradigm for the Builder Pattern according to Computer Science is that there is a Builder Object that provides one or more setter methods (setA(...), setB(...)) and a single generation method that constructs and returns the newly created result object (getResult()).

This pattern has two important concepts. The first one is that the Builder Object exposes a number of methods as a way to configure the different parts of the object that is under construction. During the configuration phase, the Builder Object preserves...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image