Paul De Winne delivered a well-prepared session at Devoxx 2008 where he spoke about how business components can be built with reusability in mind. He works for HP and has often been called in to consult on projects that have problems with reusability and used a few war stories to add colour to his points. His key points were:
- Consolidation is re-use. Seems obvious but often developers are restricted by their view on the data model and may have different ways of representing the same type of data and how it is used.
- A valid service complies with specification. Every property or field needs to be valid when a service is instantiated (and factory classes can help here) and “validity” can only be proven by using the business rules. If invalid, objects can – and should – be corrected.
- Reuse requires organisational support. This is not only a matter of drive and management support but is also subject to good governance.
- Services should be subjected to change control to ensure that business requirements are not violated.
This all ties in with what I’ve been reading in Thomas Erl’s SOA Service Design book so was a comfortable session to have attended.