Monday, April 02, 2007

JSF, Spring, iBatis integrate

Recently I created an application with JSF, Spring and iBatis. It seems pretty easy to integrate them together. Following list the system environment:
  • Tomcat - 5.5.23
  • Java - 1.5
  • JSF - 1.2
  • Spring - 2.0.3
  • iBatis - 2.3.0
  • database - Oracle
The system includes 3 simple configure file: applicationContext.xml, face-config.xml and sql-config.xml.



JSF have the following different features:
  • Swing-like object-oriented Web application development
  • Backing-bean management
  • Extensible UI component model
  • Flexible rendering model
  • Extensible conversion and validation model
However, one JSF thing that I really do not like is its huge configure file. For a big project, it huge configure file will make maintanance pretty hard.

A serviceLocator class is created in system to glue the JSF with Spring.



Like other persistence layers, iBATIS strives to ease the development of data-driven applications by abstracting the low-level details involved in database communication, as well as providing higher-level ORM capabilities. iBatis SQL Maps is a straightforward data access tool, working at the SQL level like JDBC code, but externalizing SQL statements and their result and parameter mappings into an XML file. Above figure shows the simple example for iBatis.

1 comment:

Unknown said...

Hi,

Nice intro. But I miss more details about faces-config and other configurations. Is that DelegatingVariableResolver used and what's about the web.xml file?

Could you be so kind and provide some code for download?

Do you know a good tutorial somewhere out?

Thank you.

Regards,
Andreas