[TYPO3-50-general] Package Organization to gradually increase a Package's functionality

Nino Martincevic don at zampano.com
Tue Jan 27 08:29:27 CET 2009


Hi Thomas!

Thomas Allmer wrote:
> I'm currently struggling with a logical problem. Maybe someone could
> enlighten me. (hopefully)
> 
> So I have 2 Packages:
> DirectoryRepository
> GitDirectoryRepository
> ...

and about 760 more lines.... ;-)

Could you please tell us what are you actually trying to solve?
I mean, you struggle with some DRY/SRP/organizing packages and files 
problem but I actually don't see what are trying to solve.

To me it looks like you have two different kinds of "Directory", 
(whatever that is...) doing exactly the same thing but directed with 
different controllers. [Perhaps you should have an Aggregate and 
Repository "FileSystem"?]

If that's right, they are just two different "roles of one thing" and 
probably you would only need one Repository.

Btw: The purpose of a Repository is not to "add" or "create" objects or 
"stick comments" to something, but to find, query and add an aggregate. 
Adding a comment to a file (right?) is not the job of a repository but 
of another object, e.g. File.addComment(bla).

If not, please explain it again, but only the logical part, please leave 
out the technical/file/controller/package part...:-)

Cheers,
Nino


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