6.1 Best practices
We have some best practices when developing for Integrated, or developing applications based on Integrated.
- Store brand-related code in your AppBundle, for example your datafixes (which contain the implementation of content types and relations) and your theme in the AppBundle.
- Store application logic in separate bundles, with reuse for other applications in mind.
- The use of Integrated relations is recommended to connect bundles. Because relations are not administrated in code bundle separation is a lot easier in this way.
- If it is useful to use a bundle without Integrated, try to avoid dependencies with Integrated core bundles
- Try to avoid bundle dependencies in general
ODM vs ORM
- Use XML mappings (in preference to YAML and annotations) to be able to choose between ODM or ORM (now or later)
- The developer weighs in what is best for the situation
- Try to avoid relations/dependencies between ORM and ODM
- Always keep the performance in mind
- Data with a volatile or dynamic structure
- When storing different objects in de same collection is preferenced
- Data that has a solid structure
- Data that always need to be kept consistent
- Data that needs the use of transactions