Data Access Goals

I assume the following goals for data access:

  • It should be efficient.

  • It should ensure data integrity.

  • It should ensure correct behavior on concurrent attempts to access and manipulate the same data. This usually means preventing concurrent updates from compromising data integrity, while minimizing the impact of the necessary locking on application throughput.

  • Data access strategy shouldn't determine how we implement business logic. Business logic should be implemented in object-oriented Java code running in the J2EE server, however we choose to access data.

  • It should be possible to change an application's persistence strategy without rewriting its business logic, in the same way as we should be able to change an application's user interface without affecting business logic. Usually, this means using an abstraction layer such as ordinary Java interfaces or entity EJBs between business objects and persistent store.

  • Data access code should be maintainable. Without due care, data access can account for much of an application's complexity. In this chapter and the following two chapters, we'll look at strategies for minimizing complexity in data access, including using O/R mapping frameworks, using an abstraction library to simplify the use of JDBC and concealing some data access operations inside the target database.



Expert One-on-One J2EE Design and Development
Microsoft Office PowerPoint 2007 On Demand
ISBN: B0085SG5O4
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net