CHAPTER 18 CASE STUDY

A LIBRARY APPLICATION (PERSISTENCE)

In this chapter, we extend the final iteration of the application developed in Chapter 16 so that the library, its borrowers, and publications (the domain model) persist in a database. Earlier, we made use of an Action object to implement a model-view-controller (MVC) architecture and, as a consequence, keep the domain model separate from the user interaction code. In this case study, we introduce a data access object (DAO) to keep the domain model separate from database persistence code. It is implemented with the Spring framework and the Cloudscape DBMS.

The Publication, Book, and Journal classes are unchanged and only a minor change is required in the Borrower class. However, there ...

Get Groovy Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.