- Tech know how online


iBATIS is the name for a simple data mappingframework that is available at the link below as open source for both the Java and . NET platform. Since iBATIS is one of the lightweight persistence frameworks, it is well suited for persisting Plain Old Java Objects( POJO). With the use of iBATIS the possibility is given to work on basis of SQL statements and nevertheless to let realize the conversion of the objects for the illustration in a relational data base by a framework. iBATIS consists essentially of the two persistence layers SQL maps as well as data access objects.

iBATIS is therefore not a complete ORM mapper like the similar mechanisms of Hibernate, JDO, Oracle TopLink or earlier EJBCMP. iBATIS can be integrated into other frameworks such as Spring or also used as an independent framework. RBatis, a version ported to Ruby and Ruby on Rails, is also available. For JavaScript there is a persistence framework influenced by iBATIS.

The iBATIS Mapper Framework

The iBATIS Data Mapper Framework simplifies the mapping of relational database tables to Java objects. In particular, the iBATIS framework is an interesting alternative to Java Database Connectivity( JDBC). It does not implement Object Relational Mapping (ORM). For this purpose, the code of the application is separated from the code responsible for accessing the database. The SQL queries are combined in an XML file- the so-called SQL maps - and made available to the application Data Access Objects( DAO). The SQL queries from the XML file can thus be referenced in the source code. Since the mapping of objects to the tables of a relational database is done by manual programming, the persistence framework is not assigned to the ORM. But in the end iBATIS as an open source software of the Apache Software Foundation is simpler than the ORM framework Hibernate, but still more comfortable than JDBC. Other features of iBATIS are caching, lazy loading or even join fetching, all of which help to optimize the performance of iBATIS. In addition, iBATIS supports transactions via the Java Transaction API( JTA).

Advantages of iBATIS

One advantage of iBATIS, besides its ease of use, is the strict decoupling of the application from the database. The concept certainly proves itself in smaller applications. Only really needed data can be loaded, which will have a positive effect on the available resources. In addition, the low coupling increases the readability of the source code. Disadvantageous in this connection is however also that clearly more code must be written. Likewise, the development must be database-driven, which in turn has an influence on the object model. A central decision criterion is also that when using iBATIS, changes to the data model are not as easy to implement as with Hibernate, for example.

Englisch: iBATIS
Updated at: 04.04.2020
#Words: 458
Links: name, data, link, Java, network entity title (OSI) (NET)
Translations: DE

All rights reserved DATACOM Buchverlag GmbH © 2024