﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Harald commented on iBatis better than Hibernate for GUI applications?</title><description>That's true for connections, but you still have to take care for opening/closing your transactions appropriately, whilst the TransactionProxyFactoryObject will decorate particular methods with begin/commit/rollback calls without any further efforts.
</description><link>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment3</link><guid>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment3</guid><pubDate>Mon, 05 Feb 2007 12:08:47 GMT</pubDate></item><item><title>Ayende Rahien commented on iBatis better than Hibernate for GUI applications?</title><description>@Harald,
  
Actually, NHibernate 1.2 Beta 3 will manage the open/close of the connection for you, so it is much easier to handle the lazy load stuff. 
</description><link>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment2</link><guid>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment2</guid><pubDate>Mon, 05 Feb 2007 08:13:43 GMT</pubDate></item><item><title>Harald commented on iBatis better than Hibernate for GUI applications?</title><description>I haven't worked with iBatis either, hence I cannot make a judgement, but I've done enough desktop app projects with NHibernate to ensure you that all these statements are bogus, as you already pointed out.
  
  
There is one possible problem that might prevent the "lazy guy" from adhering to the session-per-connection pattern which can lead to such a design: You have to know what you need in advance, deffered lazy loading won't work if the session is already closed again. This is partially NHibernates fault as figuring out which object/collection caused a LazyInitialitationException is not always easy as you therefore need to know how and where the object was loaded in first place.
  
  
Also using a second level cache in desktop apps is not always a good idea, as cache coherence cannot be guaranteed if you have multiple instances of a particular application working with the same database. That's of course a minor issue when you're only using in-memory databases like sqlite or sqlserver ce.
  
  
Regarding your simple things to remember, I almost always use the Spring.NET TransactionProxyFactoryObject which takes care of session and transaction handling. But as always, the more you hide, the more you have to know whats going on behind you.
</description><link>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment1</link><guid>http://ayende.com/2062/ibatis-better-than-hibernate-for-gui-applications#comment1</guid><pubDate>Mon, 05 Feb 2007 07:59:22 GMT</pubDate></item></channel></rss>