MVC框架理想的文件夹结构

发布于 2024-08-12 00:33:13 字数 198 浏览 2 评论 0原文

我想问一个能够支持多个安装的MVC框架的理想文件夹结构是什么。例如,我安装 xyz 框架,并基于 xyz 框架的单个安装运行两个或多个站点,而不是为每个站点安装框架。

这可能也是在 Codeigniter 中完成的,但我对 CodeIgniter 不太了解,所以我需要你的建议。我知道你们中的一些人可能比 CodeIgniter 所做的事情有更好的想法,所以请分享。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

找回味觉 2024-08-19 00:33:13

这是我的 MVC 库结构的通用示例。没什么特别的,我想保持简单。

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

这种结构的好处是库不(也不应该)依赖于库。这意味着您可以复制该库以供其他项目使用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文