While beeing a platform technology in its core, the OSGi technology seems to use and promote certain patterns as well. The Whiteboard and Extender pattern are well-known examples for this. So why shouldn't we put these patterns in a more jokey and useful way?
Zen of OSGi
- Graphs are better than trees.
- Prefer services over objects.
- Import is better than required.
- Although required is better than classpath.
- Only export stuff you want to provide support for.
- Once you support something, support it forever.
- Import your exports.
- Minimise your dependencies.
- But do not omit imports you really use.
- Do not rely on start ordering.
- Listen to your customer, do not make them listen to you.
- Communicate your version policy.
- Be as permissive as possible but no more.
- Use the obvious OSGi way.
- Although that way may not be obvious at first unless you're Dutch.
- Expect the unexpected (especially when you are dealing with services).
Any important rules missing?