views:

774

answers:

7

Recently I've been playing a bit with Groovy and Grails and I have to say I'm nothing but impressed by the simplicity and productivity this framework could offer.

In the past I've also greeted the world via Ruby on Rails and what not, having that very same feeling so it's pretty much obvious that when it comes to web apps, DRY KISS is definitely the way to go.

The thing is, where I currently work people is quite Microsoft minded and I guess they would be kind of reticent to accept those jewels so I was wondering if there's any .NET project that implements the same principles than Grails and Rails?

Your comments will be much appreciated. Thanks a lot!

+9  A: 

Try ASP.NET MVC--it's very much influenced by Ruby on Rails, and they are both based on the MVC pattern.

mgroves
+1  A: 

I agree that ASP.NET MVC is probably the closest. ASP.NET Dynamic Data also has similarities to Ruby on Rails. Although I have not tried this, I have heard that you can use both of them together.

Jacob Adams
+3  A: 

Another popular choice is SubSonic.

This program examines your database and builds a strongly-typed data access layer. It can also generate a CrUD (create-update-delete) website for you based on the DB. Can be integrated with Visual Studio.

The screencasts are a great way to learn the tool.

Can easily work with another framework, like ASP.NET MVC. I have used it very successfully for maintaining a MySql database from F#.

Highly recommended.

James Hugard
+5  A: 

If you want something that feels very much like Ruby on Rails in the .NET environment, you might try going with the following combination:

  • ASP.NET MVC - Implements the MVC pattern and, as other posters have mentioned, is strongly influnced by RoR, including some scaffolding capabilities via T4 templates.

  • Castle ActiveRecord - Implements the Active Record pattern that is at the core of Rails success. You see that ActiveRecord classes are very terse and DRY. Nothing more than mapping and validation attributes. Better yet, Castle ActiveRecord uses NHibernate under the hood so you can always step down to NHibernate and use tools like the NHibernate Profiler to understand and optimize Castle ActiveRecord's output.

There are several things that haven't really translated from the RoR / Grails world. Automated migrations a'la Capistrano and the immensely valuable plug-in libraries don't exist. I'd be interested to know if anyone has comments on like-minded alternatives in the .NET world.

Thomas Beck
+1  A: 

None of those are even close to Grails in my opinion.

The answer is no. There isn't really anything in the .net world that provide what Grails does.

Grails isn't just a 'MVC' architecture, there is much more to it than that.

I would have hoped at this point in time that more work be done on creating such an environment, with IronRuby/IronPython.

The one part of Grails that shines is that it comes with everything you need - you don't have to follow 20 steps to get it installed.

Some examples of what it provides out of the box that asp.net mvc don't even touch: (1) built in support for Hibernate (2) built in support for dependency injection via. Spring (3) all the grails commands that make it so easy to work with it's conventions (4) built in testing support.

A: 

Anyone looking at this question today (in 2010) would do well to look at the Nimble plugin: http://www.grails.org/plugin/nimble

mgkimsal