Edit: I don't use bundles for app-specific code anymore.
Personally I prefer to have a bundle per a section of an application. For example:
- UserBundle
- BlogBundle
- ForumBundle
- JobBundle
- StoreBundle
- etc
This is okay if the app is a mishmash of several functionalities, none of which is big enough to require a separate application and/or a subdomain. But if I was developing a big webstore applicaton, my bundles would be more specific:
- UserBundle
- ProductBundle
- CartBundle
- SearchBundle
- WishlistBundle
- etc
So, I'd say, it depends on the focus of the project. What's just a section for one project could be the core functionality of another.
And I usually have CommonBundle, where all the common stuff goes, like global CSS, images, layouts, etc.
Also there are at least two options for the backend organization:
- each bundle has its own backend section, or
- there is one big backend bundle.
Personally I lean towards the first option and you can read about it in my previous answer, but there are people who prefer to have a separate bundle for the whole backend — probably using one of the admin bundles.
By the way, it's perfectly okay for bundles to be interconnected — you don't have to make them all independent of each other. For example, JMSDiExtraBundle depends on the metadata library and JMSAopBundle, which in turn depends on cg-library. If you'll try to keep bundles totally independent, you'll end up with big monolithic one-bundle lumps of code.
User
andOrganisation
(assuming there are other dependencies on Organisation within the system) - Different bundles.BlogPost
andBlogPostRevision
- Same bundle. It's partly intuition based on the design of the system - a bundle should just encapsulate some functionality which you consider to be cohesive. – Ivaivah