Is this code insane?

yack

New Member
I'm following a tutorial which I think is written by someone who doesn't know what he's doing (already caught 2 obvious mistakes and the rest of code is messy). But I don't want to discredit the guy completely, so I'm asking here about something else that I don't understand.\[quote\] First of all, I will send 100 brownie points, my 2 pets, and a box of chocolate to whoever can explain to me what is going on with this code.\[/quote\]He's using module-based architecture. Module name is \[code\]frontmodule\[/code\]. Module has MVC. And module has an internal \[code\]library\[/code\] of its own.\[code\] /modules/ /frontmodule/ /models/ /views/ /controllers/ -- the /module controller is here (undestandable) /library/ /Controller/ -- the /module/library controller is here (why?!) /Action/\[/code\]First comes the confusing part. Why each module has an internal library, and why that intenal library has its own \[code\]controllers\[/code\] and \[code\]actions\[/code\]. Is this a best practice? I'm thinking this library could be moved to a plugin that the module can use. Not sure..Now comes the interesting part.... in addition to each module having its own internal library, there's also a Common library shared by all modules (see it below at the same folder level as \[code\]/modules\[/code\]) and that Common library also has its own controllers and actions (just like each internal libraries have their own controllers and actions)\[code\] /modules /library/ /Common/ /Controller/ -- the /common/library controller is here (why?!) /Action/ /Helper/ /Plugin/\[/code\]So we have 3 controllers:
  • the module controller
  • the module internal library's controller
  • the common library's controller
Now here's the insane part that I think is over-complicating life\[quote\] He says: A module controller extends the module
 
Back
Top