Thursday, August 20, 2009

Framework for .Net application rather then Visual Studio

From past months I've been researching in Spring.net framework to maximize the consistency, maintainability, reusability, and performance of any application while minimizing the repetitive boilerplate development tasks that can plague enterprise development.

For the .NET Framework platform, I've have found these 4 well known frameworks Castle Project, Spring.NET, Enterprise Library, and CSLA.

Castle Project

The Castle Project is perhaps best known for its Rails-inspired MVC framework, MonoRail. That being said, it has grown to include a full feature set of components useful at all levels of development. The Castle Project appears to be a popular and well-tested choice. If we compare Spring.Net and Castle things get trickier there is a lot of overlap in functionality between the frameworks, but they both do things a bit differently. Each one has some things that the other one doesn't. Both Spring.Net and Castle are modular and non-invasive so we can use only the modules that we are interested in and ignore others.

Enterprise Library

Enterprise Library is a set of integrated libraries produced by the Microsoft Patterns and Practices team or we can say, is simply a collection of useful "blocks”, where each block encapsulates best design practices. EntLib blocks do not overlap with Spring in any way, because they focus on things such as caching, logging, etc. where Spring focuses on providing a solid programming model and architectural foundation for your application. One area where might be quite abit of overlap is EntLib Data Acces Block and Spring.Data module, because they both provide an easier and more consistent way to write data access code. In cases like this, you really need to evaluate both options for yourself and decide which one works better for you. This would be a good choice for creating robust base class libraries while sticking with standard Windows Forms or Web Forms development for the UI. Enterprise library blocks are good but heavy according to me and have lot of things that we may not really need.

CSLA

CSLA is more about designing your applications using business objects (or domain model) and providing a patterns for persistence and location transparency of those objects. It is strongly focused on the business object layer and for that reason may not have quite the feature list of the others but is very mature, refined, and well tested. Unless we absolutely require some features not found here, this is one to strongly consider. The only negative I find is that it takes a long time to learn…. J and that it does require some fine tuning of the business objects at the end which is not really documented anywhere…. :(

Spring.NET

Spring.NET is a reimplementation of Java's Spring Framework for .NET. It seems to be most strongly suited for full-stack development of web applications and while it may not yet have all the features of the Java version it has a very impressive feature set. This .NET version is relatively new but is quickly gaining notoriety. It is suitable for building enterprise .NET applications easier. Providing components based on proven design patterns that can be integrated into all tiers of any application architecture, Spring helps increase development productivity and improve application quality and performance.

Feature Summary:

Below is a feature summary. Please keep in mind that I am not an expert in any of these technologies so there may be some errors or omissions.


Spring.NET

Castle Project

Enterprise Library

CSLA

Dependency Injection

yes

yes

yes


Object-Relational Mapping

yes

yes


yes

Transaction Services

yes

yes

yes

yes

Logging Services

yes

yes

yes


ASP.NET Web Framework

yes

yes



Component Caching

yes

yes

yes


Component Remoting

yes



yes

What differentiates Spring.Net from many others is that it exists for both J2EE and .NET, and supports the same programming model on both platforms. This is very valuable in the enterprise environment because it makes developer transition from Java to .NET and vice-versa much easier.


Cheers by,

Anand Ranjan