Foreword
I must admit that when I first heard of the Domain-Driven Design in PHP initiative, I was a
bit worried. The danger was twofold: first of all, when glancing over the table of contents,
the subject matter looked like it was a rehash of content that was already available in
several other Domain-Driven Design books. Second, writing a book on Domain-Driven
Design targeted specifically toward the PHP community seemed needlessly narrowing,
particularly as Domain-Driven Design itself is not language specific. As such, this might
inhibit PHP developers from looking past the boundaries of their own community,
especially when considering that there's a lot going on beyond the scope of PHP. In fact,
even Domain-Driven Design is one of those things, as it didn't originate in the PHP
community.
After reading the book, I'm happy to inform you that my worries have been invalidated!
With regard to my first concern: of course there is some overlap with previously published
Domain-Driven Design books. Yet the authors have restrained themselves. The theoretical
parts are exactly what you need to be able to understand what's going on in the code
samples. Besides, if you never read another Domain-Driven Design book, this one gives you
what you need to start applying some Domain-Driven Design principles and patterns in
your code, as it's practical by nature.
My second concern — about the PHP aspect of this book — has been addressed very well. It
turns out there are a lot of things to say about Domain-Driven Design in a PHP world. This
book is specifically targeted at an audience consisting of PHP developers. The code samples
resemble real-world PHP projects, and the authors use a programming style we know from
projects using Symfony or Silex. For persisting Domain objects, Doctrine ORM — which is
the de facto standard data mapper for PHP — is used.
This book also fulfills a need I've often seen in the PHP community: the need for concrete
examples. It's not always easy for authors to come up with proper illustrations of how to
apply certain ideas that have a low risk of being misinterpreted or abused in real-world
projects. And in Domain-Driven Design, which is philosophical by nature, this is even more
challenging.
评论1
最新资源