Chapter 3. Working with Data Maps

3.1. Introduction

If you want to know how to configure and install iBATIS, see the Developer Guide section for your platform. But if you want to know how iBATIS really works, continue from here.

The Data Map definition file is where the interesting stuff happens. Here, you define how your application interacts with your database. As mentioned, the Data Map definition is an XML descriptor file. By using a service routine provided by iBATIS, the XML descriptors are rendered into a client object (or Mapper). To access your Data Maps, your application calls the client object and passes in the name of the statement you need.

The real work of using iBATIS is not so much in the application code, but in the XML descriptors that iBATIS renders. Instead of monkeying with application source code, you monkey with XML descriptors instead. The benefit is that the XML descriptors are much better suited to the task of mapping your object properties to database entities. At least, that's our own experience with our own applications. Of course, your mileage may vary.