[TYPO3-50-general] FLOW3 and DDD

Robert Lemke robert at typo3.org
Fri Jan 16 09:46:20 CET 2009


Hi Nino,

Am 16.01.2009 um 08:23 schrieb Nino Martincevic:

> I was excited to finally see a project in the PHP community that tries
> to include some (or most?) of the ideas of DDD.
> First: I'm a very enthusiastic follower of this philosophy and never  
> to
> want to switch back again to "conventional" style anymore, like so  
> many
> who inhaled it. The main reason is that it forcefully leads to a pure
> style of OOP programming, following the real true ideas of it,  
> foremost
> decoupling and encapsulation, not just of code but of mindsets.
>
> Most concepts and documents to learn DDD you find came out of the Java
> and .NET world, so for a PHP programmer (still) like me it wasn't that
> easy to convert those ideas to PHP.
> Btw: IMHO the most PHP applications and frameworks suffer from the
> "object-relational-impedance-mismatch-mental-illness", just using  
> tools
> and frameworks without knowing how to build true complex OOP  
> applications.
>
> Perhaps it's not the right language for it? I don't want to believe  
> it.
> Because I think not the tools limit you but your knowledge and  
> affort to
> change your mind [yes, we can! ;-)]

I fully agree. Although PHP put us some little obstacles on the way to
develop FLOW3 it's not really the limiting factor.

> - Is it possible to use Flow3 or the parts from it, especially the
> mentioned parts I see missing yet in PHP, and more especially the
> ORM/Hibernate part?

Yes. FLOW3 provides a very convient and powerful IoC container with true
dependency injection (a bit Spring-like, but with some neat extras).
AOP turned out to be very helpful for making the code clean and  
readible,
so we also implemented a fully fledged AOP framework.

The ORM part is solved by FLOW3's persistence subpackage together with
the TYPO3CR. The Domain Model stays completely clean (persistence is
woven in through AOP), no base model or public properties required.

Please note though that FLOW3 is not released yet, which means that
some APIs are not completely frozen yet and speed and security might be
an issue. We ourselves want to use FLOW3 ASAP, so I depending on your  
requirements
you'll surely get something you can really work with this spring.


> - Does Flow3 really follows "pure" DDD concepts, not polluting your
> domain with infrastructural or technical stuff?

Yes, absolutely. The Domain Model doesn't know anything about  
infrastructure
or persistence. The repositories of the aggregates use the TYPO3CR's  
querying
mechanisms but don't have to take care of loading or saving objects.

 From the developer's point of view there are just objects, no database.

> - Are the other important concepts of DDD like value objects, domain
> services, bounded contexts etc. implemented or their usage intended?

Yes. We do have support for entities and value objects and the  
persistence
framework recognizes aggregate boundaries. Especially the art with value
objects and lazy / eager loading mechanisms is not fully implemented  
yet,
but currently in the works.

I'd be happy to hear your feedback about our concepts after you played  
with
it a little - just let us know on this list if you need help with  
something.

Best regards,
Robert



More information about the TYPO3-project-5_0-general mailing list