A
A
Alexey Ukolov2014-08-14 07:48:22
symfony
Alexey Ukolov, 2014-08-14 07:48:22

How to properly organize bundles in Symfony2?

I haven’t quite figured out the concept of bundles yet, so I’m asking for help.
The site has 3 main sections - public, personal account and admin panel. Should these sections be separate bundles or controllers? If these should be different bundles, then what about entities that are used in several bundles?
UPD: I will add that the load on the project is quite high and, perhaps, in the future each section will be moved to a separate machine with one common database.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex_dm, 2014-08-14
@alexey-m-ukolov

In this case, you will not receive any benefit from splitting projects into bundles. Therefore, it will be more convenient to put all three sections in one bundle, but to separate the controllers and templates into different directories.
something like:

CompanyName\YourBundle\Controller\Admin\UsersController;
CompanyName\YourBundle\Controller\Admin\NewsController;

(for admin)
CompanyName\YourBundle\Controller\Public\UsersController;
CompanyName\YourBundle\Controller\Public\NewsController;

(for public section)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question