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

Let's Recap

In order to have a clean architecture that helps you create easy to write and test applications, we can use Hexagonal Architecture. To achieve that, we encapsulate user story business rules inside a UseCase or Interactor object. We build the UseCase request from our framework request, instantiate the UseCase and all its dependencies and then execute it. We get the response and act accordingly based on it. If our framework has a Dependency Injection component you can use it to simplify the code.

The same UseCase objects can be used from different delivery mechanisms in order to allow users access the features from different clients (web, API, console, and so on.)

For testing, play with mocks that behave like all the interfaces defined so special cases or error flows can also be covered. Enjoy the good job done.

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 $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon