Ideal Folder Structure of MVC framework [closed]

夙愿已清 提交于 2020-01-11 03:38:11

问题


I would like to ask what is the ideal folder structure for a MVC framework that should be able to support multiple installations. For example, I install xyz framework and i run two or more sites based on this single installation of xyz framework rather than installing the framework for each site.

This is probably done in Codeigniter too but i don't know much about CodeIgniter, so i need your suggestions. I know some of you might even have better idea than what is done by CodeIgniter, so please share.


回答1:


This is, a generalized example, of my MVC library structure. Nothing fancy, i wanted to keep it simple.

Library
    - Configuration
    - Modules (Database adapters etc)
    - Core (Abstract controllers, routing functionality etc)
Application
    - Model
    - View
    - Controllers
    - Helpers

The benefits with this structure is that the library is not (which it shouldnt) dependent of the library. That means that you can copy the library for use with other projects.



来源:https://stackoverflow.com/questions/1795136/ideal-folder-structure-of-mvc-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!