[TYPO3-core] Domain model "page"

Philipp Gampe philipp.gampe at typo3.org
Fri Feb 20 10:29:08 CET 2015


Hi Steffen,

Steffen Müller wrote:

> I disagree. Extbase already ships pointless domain models for a
> fictional CMS domain, e.g. FrontendUser. IMHO these models violate the
> domain driven design principle: I have never seen a domain which uses
> all properties of FrontendUser and therefore these properties should not
> be exposed. The same would go for pages.
> One could argue with convenience to create domain models facets based on
> the core models, but it gets rather pointless when you want your domain
> model classes to also serve as a documentation of your domain. You would
> have to add all properties + getter/setters to the facet anyway.

Theory.

Real live: You have to rewrite domain models for almost every extension, 
because the extensions builder cannot simply extend from a common core  
domain model or automatically create one from existing TCA. Therefore you 
have to write your own model every time or you create yourself an abstract 
model that gets reused by every project. So whats the difference to the core 
shipping the model?
If you don't need it, you can ignore it.
I also disagree with extbase shipping the frontend user model. But not 
because I do not want such a model, but rather because this belongs to 
ext:frontend.

With more dedicated backend modules for specific tasks, we will see a bigger 
need for solid models. With your proposal, each module will have its own 
model, each with different bugs and flaws. We will see an increase of cross-
cutting dependencies, because devs will try to reuse models to avoid code 
duplication. This already happens with the backend user models which are 
part of the backend user management module instead of the ext:backend.
We had this situation with tree extensions before, because the core did not 
ship a solid solution.

In theory you start from scratch for each project. In real live you will try 
to save costs by reusing components.

IMHO, code required for most projects should be part of the core, leaving 
specifics to individual projects.

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!



More information about the TYPO3-team-core mailing list