문제

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?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top