Chapter 14. Putting it all together

 

This chapter covers

  • Choosing tools
  • Setting up your project
  • Wiring components together

iBATIS is not an island unto itself—it is meant to be part of a whole. iBATIS can be used in conjunction with any application that accesses a SQL database. Given that there are a lot of different applications that may access a SQL database, we’ll focus on one popular type. Web applications are well known and usually access a SQL database somewhere behind the scenes. To put iBATIS into a useful context, we will walk through the creation of a shopping cart application. We tried to come up with something original, so we decided to make it a game store rather than a pet store. Let’s move ahead with putting this application together.

14.1. Design concept

It’s always good to begin writing an application with some sense of direction. A good overview of what we want an application to accomplish is important. Another term for this is requirements. Shopping carts are an easy concept to delineate requirements for because they have been done many times. Tiresome as it may be, we will do the same thing for this round. (Hey, at least it’s not a pet store!)

14.2. Choosing technologies

14.3. Tweaking Struts: the BeanAction

14.4. Laying the foundation

14.5. Configuring the web.xml

14.6. Setting up the presentation

14.7. Writing your service

14.8. Writing the DAO

14.9. Summary