Saturday, January 29, 2005

The two visions about n-tier/layered systems

The best of two worlds.

The problem of ORMs has longly been reseached and debated. In order to make programs, the best proved to be OO languages. In order to persist/retrieve data the best proved to be relational databases. They are simple and more importantly fast.
Now in order for these two to work together to enable the end user to achieve his goals through better and better software, in time, two approaches have been developed: The Java world approach and the Microsoft approach.

1. The Java world approach: application servers. Everyone already knows that n-tiered/layered systems are best, especially for entreprise applications. The java world decided to let the user enjoy Java, and disregard SQL and database servers. In order to do this they developed the application servers and the EJB technology. Also, lots or ORM tools. The main concept here is that the user develops the bussiness layer, by using objects and Java in his aplication or in his application server.

2. The MS way: - CRL stored procedures. This is just showing up, and just like .NET, benefits from the Java world experience and failures. Microsoft recognized that n-tier approaches are the best, but instead of building ORM tools and application servers, they had the idea of moving the bussiness layer from the application server to the database server itself, by hosting the .NET framework into their database server and allowing developers to build the bussiness layer directly in the database server, closer to the data and independent from the UI. Suddenly, looking at ASP.NET 2.0 SQL tags, which in my opinion was not a good approach as changing one table meant changing 100 forms, makes a lot of sense. You can use the new CRL stored procedures as your middle-tier, or bussiness layer, and give one application 10 UIs.

Well, I love having concurrency on the market, so that companies are forced to come up with better and better ideas and in the end, products.

Java world , it is your turn now. Let's see your next move :)

Dan

More about CLR stored procedures at: http://msdn.microsoft.com/sql/default.aspx?pull=/library/en-us/dnsql90/html/sqlclrguidance.asp


No comments: