Friday, November 21, 2008

Learning LINQ to Entities as compared to Hibernate

It took me hardly two days to implement a Generic Data Access Layer on .NET 3.5 SP1 by using LINQ to Entities. The first time I worked on an ORM solution (Hibernate) was on a project for the Danish Commerce and Companies Agency around two and a half years before. It took us around one week to set up Hibernate and even after the system went into production we had problems with performance and memory leaks which were later fixed by the folks at hibernate. Of course, hibernate is open source and sure it is much more powerful but still is has its lots of problems. Earlier this year, together with my team at M-ITC LTD, we built an in house ORM solution (TinyORM) by using annotations and reflection APIs. We wanted something simple without any persistence and usage of traditional SQL. We further extended this solution to provide support for Oracle PLSQL for the needs of our client. Performance wise, we were far better than Hibernate and it was superb experience. Object Relational Mapping has been in software development for a while now. Every language I have been into now has such implementations. However, LINQ to Entities (DLINQ as it was called in the past) and Entity Framework are to me the most promising. Coupled with Dynamic Data Framework, they can be of great effect in enterprise applications.

Until now my .NET learning has been going on all so good. I am really impressed with the speed at which I can develop features in my application as compared to JAVA. I still feel that JAVA is much more powerful though. Perhaps, its all down me having much more experience in JAVA. Hopefully, one year from now, I will unleash its full potential.

No comments: