2006/12/05

Data Access + Simplicity = iBatis (power)






Complexity is not always the best option, actually keeping things simple can help you to boost your application and make more extensible and able to go over the limits.
This is iBatis aproach.

What is iBatis?
iBatis is a data access framework for Java, .Net and Ruby.
iBatis has two parts that can work separely: iBatis DataMapper and iBatis Data Access Objects.
iBatis is one of the Apache projects and is actually used in the JPetShopStore.

iBatis Data Mapper
The Data Mapper will let you create the access to the database whitout writing having to write a single line of JDBC or ADO.Net code, you will instead use iBatis and write XML's to match your database with your objects using SQL. This gives a great flexibility and simplicity.

iBatis Data Access Objects
This framework give you a layer to hide the details of how you are handling the persistence in your program.


Image from iBatis site.

Abator
Abator is the code generator for iBatis. It can generate the XML's and clases for you based on your database.

You can use both Data Mapper and Data Access Objects together or separly
We all know that once the project gets more complicated sometimes doing some complex tasks with complicated technologies or aproach it actually takes more time to resolve the problem that it should be. With this aproach you can actually keep a good architecture with simplicity and able to extend and there is only a short learning curve.

I will add some tutorials in future days, I'll probably start with .Net (because there are too few tutorials about it in .Net yet) and perhaps Ruby or ColdFusion (using Java) after that.

Resources:
iBatis: http://ibatis.apache.org
Abator: http://ibatis.apache.org/abator.html

Best regards,
Feto