Digging into the codebase of Newscoop over the last days (trying to understand some of its guts and dealing with dependencies - see other thread) left me with a rather chaotic impression ;)
I understand that Newscoop has grown organically over time, has a legacy with certain constraints, should try not to break backwards compatibility… wants to keep all kinds of audiences happy:users, developers, professionals and amateurs etc.
What worries me most from a developers perspective, is that mix/or lack of conventions (folder structures and naming) different class loading approaches, code style, spreading dependencies throughout the project could evolve it into an unmaintainable unloved creature, cursed to die slowly.
Who would want that?
I think the decision to "refactor" the codebase towards ZendFramework and adopt patterns like MVC etc. was a good one. Having an old blogpost on refactoring in mind, I would say its a tough (maybe binary) decision wether to rewrite or refactor. In the end it comes down to how. Its hard to not rewrite, when you go from oldschool php towards a zfApp. A smooth incremental transition from one state to the other is very desirable. But calling it a refactor(of a code monolith), avoiding/ignoring to rewrite (separate old and new app)... dont' know what exactly happened. maybe we are just stuck somewhere in between?
Looking at it now, I would like to discuss some ideas (painful and maybe radical or just cosmetical?)
lets follow some conventions and don't have nested multiples: ideally there is only one place (folder each) to look for
Newscoop mixes in some zf project directory conventions already - why not adopt them more consequently, where it makes sense http://framework.zend.com/manual/en/project-structure.project.html I also find *nix naming like /bin /var /vendor tempting ;)
We might end up with something like the following (see attachments) - please add your ideas and requirements
in terms of conventions there probably is no perfect solution - one might even prefer the current dir structure over that suggested. Its also quite likely that I didnt think of requirements for distribution"/packaging" or certain stacks (like heroku requiring an /index.php which is stupid ;))
For me, going into the direction described, would def. ease my pain in working with Newscoop.
I hope I am not stealing your time on this..
Cheers, Leander
By the way, the forum "WYSIWYG" editor is a lemon
It looks like you're new here. If you want to get involved, click one of these buttons!