Symfony bundle

I still have difficulty to understand the concept of symfony bundle, for example I should have AdminBundle for admin area, UserBundle for user area? Please explain more.

Hi nimasdj,
here is a simple and concise explanation you can find in the official Symfony2 documentation:

"When Symfony 2.0 was released, most developers naturally adopted the symfony 1.x way of dividing applications into logical modules. That’s why many Symfony apps use bundles to divide their code into logical features: UserBundle, ProductBundle, InvoiceBundle, etc.

But a bundle is meant to be something that can be reused as a stand-alone piece of software. If UserBundle cannot be used “as is” in other Symfony apps, then it shouldn’t be its own bundle. Moreover InvoiceBundle depends on ProductBundle, then there’s no advantage to having two separate bundles."

I hope that helps.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.