Archive for the ‘codeproject’ Category

SELECT N +1 problem

Check Ayende post on the topic: Combating the Select N + 1 Problem In NHibernate

Basically, when using an ORM like NHibernate or EntityFramework, if you have a one-to-many (master-detail) relationship, and want to list all the details per each master record, you have to make N + 1 query calls to the database, “N” being the number of master records: 1 query to get all the master records, and N queries, one per master record, to get all the details per master record.

More database query calls –> more latency time –> decreased application/database performance.

However, ORM’s have options to avoid this problem, mainly using “joins”.


Topic on StackOverflow:

Catarsa: ASP.Net MVC applications framework

Check out Catarsa website

Also, this step-by-step tutorial to create an example web-app using Catarsa framework.

But first, make sure you have it installed.

Some features:

  1. HTML 5 (IE 7+, FireFox, Chrome, Opera 11+) – IE 6.0 is not supported anymore
  2. Wiki .NET Paresr II,
  3. NHibernate 3.2
  4. jQuery 1.7
  5. StructureMap 2.6
  6. OpenXML 2.0 (MS Excel, MS Word 2007+ export/import),
  7. OOP for Razor with strong Controls support

I think iI will give it a try!

PS: Catarsa is based on C# Coding Standars by Lance Hunt

ASP.NET MVC3 Razor With jQuery For Beginners

Really excellent post about MVC3!

ASP.NET MVC3 Razor With jQuery For Beginners

OOP in ASP.NET MVC 3.0 despite of the Razor

Serialization for Rapid Application Development: A Better Approach

Excellent post about Serialization, Reflection, Assenblies and Dynamic Types

Serialization for Rapid Application Development: A Better Approach