It is now time to look at the database. First we see how to store the records of an author in the database in the "traditional" way, and then we look at the possibilities Struts offers.
First thing to ask yourself is what gets stored in the database? Creating the
Author class to be responsible for loading and storing itself should be simple enough and the implementation would be relatively simple and uncomplicated. Additionally, we could also make the
Author responsible for its own presentation in the
View layer. This is something we go into later, when we create the shopping cart in Chapter 10. We’ll discover some problems with the approach used in this chapter, so you should read Chapter 10 as well before you ...