-1

我正在开始一个新的 Symfony 3.4 应用程序,以便为我们的小型企业创建一个文档管理平台。我想我知道如何在几个自定义包中组织我的所有代码,但我宁愿在这里寻求建议;)

下面是我脑海中的树:

---- MyCompany
-------- app
-------- bin
-------- src
------------ Custom bundle with UI / design elements ( = all the main templates / layouts for the app : header, footer, sidebar etc...)
------------ Custom bundle for User management ( = user management controllers, entities profile view etc...)
------------ Custom bundle for Product management ( = products CRUD, controller, entities, product page views etc... )
------------ Custom bundle for miscellaneous operations / tools
-------- tests
-------- var
-------- vendor
-------- web

这是启动应用程序的好方法吗?还有另一种方法吗?谢谢 !

4

1 回答 1

2

是的,还有另一种方式。就我个人而言,我不喜欢将我的应用程序逻辑与我的框架结合起来,甚至Symfony 最佳实践也不建议为您的应用程序逻辑创建多个包。

您可以只有一个包(AppBundle/ApiBundle)并以不同的方式组织您的逻辑(在您的包或其他文件夹中)。

于 2018-01-09T09:41:33.830 回答