CodeFutures News & Industry Commentary Blog

Monday, February 20, 2006

Achieving Reuse with Data Services

The vast majority of professional Java application development is for one-off business applications. There is almost no reuse of existing code and only a general effort to achieve some level of consistency through coding standards. There's also some standardization on third party product use, such as application servers and databases (but often just at the departmental or divisional level). Popular development practices in Java like eXtreme Programming assume that every application will be designed and developed independently from first principles, assuming unique requirements. Any reuse in Java tends to be incidental and typically because the same development team has already developed a similar application before. Otherwise, organizations seem to have a kind of dementia regarding what has been done before.

CodeFutures' domain, data persistence, is typical. The data persistence tier is almost always developed for a specific application and tied to that application. In terms of developer productivity, this is not such a huge problem if a code generator like FireStorm/SDO is used. A level of reuse and consistency can always be achieved using a code generator. However, there's an architectural way to ensure reuse of data persistence code.

If you associate the data persistence code with the data source, rather than the specific application, then you only need to produce it once. If that data persistence code is based on Service Data Objects, then the data source is then available as a reusable data service.

  • Reuse becomes systematic because there's no other choice.
  • There is greater control and visibility over how the data source is used (the Data Access Service can be monitored).
  • There's much less code to maintain because the data pesistence code is only written once, rather than for each application.

Effectively, if you raise the level of abstraction from direct, application-level Java data access code to a data service, you decouple the application code from data access code, and you achieve a reusable production asset via the SDO API.

PJ Murray
CodeFutures Software

0 Comments:

Post a Comment

<< Home