Hi Everyone,
I'm working on a CMS as my hobby project. Because I'm not paid for it, time is not very essential and I aspire to make a well-architected system.
I have a set of business classes which are responsible for the main logic, and they are getting data from a database through interfaces, and the data provider (which sould implement an interface) can be set from configuration.
Currently I use LINQ to SQL as my data access layer, but the more I read about this topic, the more I'm convinced that I should use a more advanced ORM, because LINQ to SQL doesn't support some things that would be very good for the overall performance of the application. For example, caching and persistence. (I read that NHibernate, for example, only consults with the database if necessary, otherwise it simply gets the data from its cache. - This is good, because on average, a website doesn't get new content for days, so instead of wasting performance by reading from the database on every request, it would be just fine to serve those from a cache.)
I'm thinking about some options and would like to know what should I do about this.
- Write my own persistence logic for my business classes, and keep using LINQ to SQL.
- Use NHibernate directly, or through Castle ActiveRecord or Fluent NHibernate
- Use some other ORM
My favourite choice would be the second, because NHibernate is more robust than what I need, and ActiveRecord seems to hide most of the complexity. (And, by the way, I also intend to use Castle Windsor.)
The only problem is, that I couldn't find any information on the performance of these tools. I spent a few hours googling (and binging (and I was looking on this site, as well)), found quite a few articles and blog posts, but none of those said anything about performance.
Will this be better than the current solution, or should I use something quite different for the task?
Thanks in advance!