Chapter 6. The Builder and Factory Patterns

In this chapter, we will showcase the Builder and Factory Patterns, two of the most commonly used Creational Design Patterns. These two design patterns have some similarities with each other, share some common goals, and are dedicated to easing the creation of complex results. We will analyze the benefits that their adoption can bring to our implementations and also the ways in which they differ. Finally, we will learn how to use them properly and choose the most appropriate one for the different use cases of our implementations.

In this chapter, we will:

  • Introduce the Factory Pattern
  • See how the Factory Pattern is used by jQuery
  • Have an example of the Factory Patten in a jQuery application
  • Introduce the ...

Get jQuery Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.