21 Feb 2015 - Tags: zf2, developer, open source, module, MVC, code segregation, SOLID
Today all frameworks are modulable but it isn’t just a beautiful word, behind it there are a lot of concepts and ideas:
The modularity helps you to reuse parts of code in different projects
Every component is indipendent so you work on single part of code
Every component solves a specific problem… it’s a beautiful concept that helps you with maintainance!
As you can imagine there is a drawback, all this requires a big effort.
Ideally every component requires personal circle of release, repository, commits, pull requests, travis conf, documentation etc. etc.
Anyway several shorcuts are available. For instance, git subtree could help you in this war but the key is this: you need an agreement to win.
Zend Framwork Community choose another street, Zend\Mvc in this moment required:
A few require-dev dependencies are used into the component to run some features, why? This force me to think “Dependencies of this feature are included or not?”!!
Composer was born to solve it! In my opinion the cost of the question is highest than download a few unused classes.
There are a lot of unused classes? Maybe too much?
Even if the right answer donsn’t exist I think thant some indicators may help you to understand when is the moment to split the component: