Skip to main content

Factories and Aggregates

  • Chapter
  • First Online:
Domain-Driven Laravel
  • 1250 Accesses

Abstract

In this chapter, we will be going over factories, factory methods, and aggregates and what purpose they serve in an application. There are some prerequisites you should understand before diving into aggregates that will give you a better core understanding of what they do and why they are one of the hardest concepts to get right in the technical portion of domain-driven design. We will explore the value that factories and factory methods have in regard to an aggregate design and explore some cool things we can do in Laravel and Eloquent to make the code easier to understand and more concise.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Jesse Griffin

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Griffin, J. (2021). Factories and Aggregates. In: Domain-Driven Laravel. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6023-4_15

Download citation

Publish with us

Policies and ethics