Rails, Grails and .NET MVC
Posted on May 3rd, 2009
We certainly do have a lot of choices when building applications these days! :) Here is a little insight into my latest project application choice. It might or might not work for you and it is not intended to be a guide per se since as good programmers know – pick what makes sense for your application.
I needed a new web application that was only going to be used for internal administration and so I could do something fun and not care about how it scales. Here are a couple key requirements so we can discuss over them. Firstly, I need page authentication and I have no need for a database since I’ll use SimpleDB so the DAL isn’t as important.
My initial thought was, lets just roll with Rails since in the last couple months I’ve been doing a lot of R&D using Ruby and Rails however I recently started some work on Grails and so the decisions begin.
Let me prefix first by saying I could have built this using .NET MVC and I believe that would have been the fastest way, sorry but it is – that isn’t bias for Microsoft just a fact especially since my skills lie heavily in that area … but I wanted something more fun :)
ASP.NET MVC
- Easy to use for sure, especially if you’re already a .NET developer.
- Tools are fantastic.
- Authentication is as simple as using the [Authorize] decoration on your controllers.
- Data is via an existing SimpleDB Provider I wrote.
- Doesn’t run well on anything but IIS
- No exposure to other technologies <- the fun part :)
Ruby on Rails
- I think Ruby is pretty easy to learn.
- The tools are getting better – don’t be a hero, use and IDE like NetBeans/Eclipse.
- If you have complex database requirements activerecord is going to be painful for you.
- I’ve found the community a bit broken with Rails, you can generally get help but not always the easiest to understand.
- Far too many depreciated gems floating around and even the Rails wiki is out of date.
- As for authentication, well nothing easy to find – does require more code than I’d like. Not sure what is best.
- SimpleDB access was OK but not great, relative name spaces break when importing classes while using Amazon libraries so that wasn’t cool. Had to hard code some paths.
Grails
- Just started R&D on this and I didn’t feel like jumping into Groovy although it is close to Ruby I’d rather learn one new thing at a time.
- Does have the huge benefit of running on the JVM and also being able to use existing java classes.
- Can be deployed on well established application servers, so that is great.
- Tools are ok, new at this stage but Netbeans seems to do the job.
- Authentication is ok, there is a good plugin but still requires far too much code for my liking compared to .NET
- I can’t find a Grails/Groovy SimpleDB library but there is one for Java so I guess I can just use that.
and then I found ….
JRuby
- Will allow me to keep on the learning curve with Ruby but
- Lets me deploy in single packages and do java application containers.
- Exposes me to more java technology.
- Tools are pretty good and I’m using NetBeans right now.
So that kinda sealed the deal. I wanted something fun and like Ruby so JRuby lets me keep that knowledge but also I get better exposure to Java technologies. You might wonder, “If you want Java exposure why not use JSP or similiar” … right, no thanks :) Keep it simple!.
I’ll post when I’ve deployed my first working JRuby application and I plan to run it on Tomcat/Ubuntu 9x.
Tags: grails, MVC, rails
Filed under .NET, Software |
2 Responses to “Rails, Grails and .NET MVC”
-
Greg Says:
November 2nd, 2009 at 2:34 pmThis is an interesting article.
I am more of a .NET guy, but I work with Java at work. I’m starting a side project on my own time and I really want to use ASP.NET MVC. To keep things relevant with my current job, though, I’ve tossed the idea around of using Grails.
Have you used Grails much since you wrote this? If it is as easy as people claim it to be, perhaps I should give it a shot…
-
typemismatch Says:
November 2nd, 2009 at 5:09 pmUse ASP.NET MVC :) – to be fair I quit working with grails because I think (at the time) the community still missed the point about keeping it simple and so it was just going to end up being a java web app anyway.
Since then I have even ported some Ruby/JRuby sites back to ASP.NET – too many broken or unsupported gems, lack of direction with authentication etc. It is perfectly possible to write an MVC site that is compatible with the mono project and run under linux if you want cheaper hosting.
