iBatis Framework
iBATIS is a persistence framework which automates the mapping between SQL databases and objects in Java, .NET, and Ruby on Rails. In Java, the objects are POJOs (Plain Old Java Objects). The mappings are decoupled from the application logic by packaging the SQL statements in XML configuration files. The result is a significant reduction in the amount of code that a developer needs to access a relational database using lower level APIs like JDBC and ODBC.
Other persistence frameworks such as Hibernate allow the creation of an object model (in Java, say) by the user, and create and maintain the relational database automatically. iBatis takes the reverse approach: the developer starts with an SQL database and iBatis automates the creation of the Java objects. Both approaches have advantages, and iBatis is a good choice when the developer does not have full control over the SQL database schema. For example, an application may need to access an existing SQL database used by other software, or access a new database whose schema is not fully under the application developer’s control, such as when a specialized database design team has created the schema and carefully optimized it for high performance.
- from wikipedia
개요
+ JDBC 코드 패턴
- Connection -> Statement -> 쿼리전송 -> 연결 close
- 모든 JDBC 코드는 위의 패턴을 가진다.
- 이 패턴을 캡슐화 하여 JDBC 코드를 간편하게 사용할 수 있도록 Framwork 화 가능
+ iBatis 란
- SQL 실행 결과를 자바진즈 혹은 MAP 객체에 매핑해 주는 Persistence 솔루션으로 SQL 을 소스코드가 아닌 XML로 따로 분리해 관리하도록 지원
+ 장점
- SQL 문장과 프로그래밍 코드의 분리
- JDBC 라이브러리를 통해 매개변수를 전달하고 결과를 추출하는 일을 간단히 처리가능
- 자주 쓰이는 데이터를 변경되지 않는 동안에 임시 보관(Cache) 가능
- 트랜잭션 처리 제공














![Validate my RSS feed [Valid RSS]](http://jongsunkim.pe.kr/img/valid-rss.png)
