Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Domain-Driven Design in PHP

You're reading from   Domain-Driven Design in PHP A Highly Practical Guide

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher
ISBN-13 9781787284944
Length 394 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Keyvan Akbary Keyvan Akbary
Author Profile Icon Keyvan Akbary
Keyvan Akbary
Carlos Buenosvinos Carlos Buenosvinos
Author Profile Icon Carlos Buenosvinos
Carlos Buenosvinos
Christian Soronellas Christian Soronellas
Author Profile Icon Christian Soronellas
Christian Soronellas
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Getting Started with Domain-Driven Design FREE CHAPTER 2. Architectural Styles 3. Value Objects 4. Entities 5. Services 6. Domain-Events 7. Modules 8. Aggregates 9. Factories 10. Repositories 11. Application 12. Integrating Bounded Contexts 13. Hexagonal Architecture with PHP 14. Bibliography
15. The End

Structuring Code in Modules

Let's dig a bit further into one of the Bounded Contexts. Take, for example, the Orders context and examine the structure details. As its name suggests, this Bounded Context is responsible for representing all the flows that an order passes — from its creation up to delivering to the customer who has purchased it. Furthermore, it's an independent Application, so it contains a source code folder and a tests folder. The source code folder contains all the code necessary for this Bounded Context to work: the Domain code, the Infrastructure code, and the Application layer.

The following diagram should illustrate the organization:   

                 

All the code is prefixed with a vendor namespace named in terms of the organization name (BuyIt, in this case), and contains two subfolders: Domain holds all the...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Domain-Driven Design in PHP
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 ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon