Symfony2 bundles: am I using them right?

后端 未结 3 645
-上瘾入骨i
-上瘾入骨i 2020-12-10 04:54

I have an application which is developed in Symfony2. Now the structure for it is as follows:

  • FrontBundle - includes everything rela
3条回答
  •  感情败类
    2020-12-10 05:26

    There are different ways to organise application structure for your projects. But if you want to distribute your bundles and follow symfony best practices, then bundles are more features than separation of UI. More about bundles read in documentation.

    I have two projects with the following structures, both valid I think:

    1. making a bundle for each feature: BlogBundle, StoreBundle and so on, and AppBundle that contains general stuff. No Backend/Frontend separation. It's SaaS where backend is frontend in most cases.
    2. One bundle for frontend, one for backend. They share only entities and domain specific stuff. The application has two different ends.

提交回复
热议问题