Question

There are a two main codebase structures that I have seen when it comes to MVC frameworks. The problem is that they both seem to have an organisational bug that goes with them.

Standard MVC

/controller
/model
/view

Problem: No separation of related components (forum, blog, user, etc..)

Modular MVC

/blog
    /controller
    /model
    /view
/user
    /controller
    /model
    /view
/forum
    /controller
    /model
    /view

Picking the module-based system leaves you with a problem.

  • Long names (Forum_Model_Forum = forum/model/forum.php) (Like Zend)
  • File system searches using is_file() to find which folder has the forum model? (Like Kohana)

Are their any other MVC structures that work well when trying to separate different modules? Are there benefits from these structures that I'm missing?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top