I've read a lot of different things about bundles and the architecture of a Symfony2 project, however I've yet to come to a conclusion on the best practice for an individual project which isn't concerned with re-using bundles etc. The reason being that this is a client specific project.
The application is a large website with different sections such as News, Blog, Multi step application form, Contact, Testimonials etc. Each section will need backend and front end functionality e.g News articles can be added by an administrator in the backend and can be viewed in the front end. THe backend will contain some backend only functionality such as Admin Users and will have an admin log which will log the activity of each admin user, therefore this needs to be accessible within each backend section.
I initially thought about having different bundles for each section i.e AdminUserBundle, NewsBUndle, BlogBundle etc before I quickly realised there is a lot of shared layouts/templates and functionality (such as AdminLog). Therefore, what would you suggest would be best practice for this kind of project? I think I've got three options but open to additional suggestions:
- 1 bundle for all with backend and frontend directories within Controller, Views, Tests etc.
- 3 bundles - CoreBundle, FrontendBundle and BackendBundle where CoreBundle will contain all shared functionality such as Entities, AdminLog etc.
- A bundle for each section with Frontend and Backend directories within Controller, Views, Tests etc. I.e NewsBundle will contain the News Entity and will contain frontend and backend Controllers, Views and Tests. BlogBundle will contain the Blog Entity and frontend and backend COntrollers, Views, Tests etc.
Thanks