Who doesn't love a good "versus" debate?

OK, actually the holy wars over platforms and languages isn't all that entertaining. But still, for all the hype surrounding Ruby on Rails, I had to check it out to see if I'm really missing something.

Looking at examples, I don't think I am. It's an interesting approach to be sure, but I'm not seeing anything that jumps out at me as being more super sweet than anything I can do with ASP.NET today. In fact, I was thinking about how I should build the same app using VWD and SQL Express that they use in this tutorial. I bet I could do it faster.

But who has that kind of free time? :) 

19 Comments

  • I agree with speed of development being as good or better with VWD and ASP.NET 2.0.

    My biggest complaint with Rails is that it forces a lot of very stringent requirements on how you build your application. If you don't structure your database a certain way (no sprocs, some column naming constraints, constrained key support) then a lot of its features don't work well or sometimes even at all. If you don't keep your html UI relatively simple, things start to get complicated (basically classic ASP inline code maintence). If you have a lot of code in your application things run slow. You have to "stay on the tracks" or you will literally "fall off the rails".

    What I love about .NET is I can extend/adapt it however I want and I never feel like I am hitting a wall. I also have never run into a performance issue or an inability to connect with a legacy database that has limited my ability to build even the biggest of applications.

    Rails does have a number of nice features that the default .NET 2.0 install doesn't have today. A nice ORM data implementation being the big one in my book. What is cool is that there are now a number of libraries for .NET that provide equivalents today. Rob Conory's SubSonic project is a good one to look at: http://www.codeplex.com/Wiki/View.aspx?ProjectName=actionpack

    Ayende is also working on a nice ActiveRecord build provider for .NET: http://www.ayende.com/Blog/ActiveRecordRocks.aspx

    What I can't wait for is the LINQ support that is coming with .NET next year. That is going to make data access sooo much better with .NET then what we have today, and much richer then what Rails provides. It also doesn't have the annoying limitations of Rails' activerecord implementation.

  • Rails doesn't force anything on you. IF you want to take advantage of the things that make development in Rails fast, easy, and convenient, then you structure your database tables, column names, etc. accordingly. Rails calls this configuration by convention.

    That said, you can override *any* convention you like. Its a convention, NOT an absolute. Yes, you will probably have to write some more code to accomplish this, but how is this in any way different that ASP.net (except that Ruby allows you to redfince the methods of a class at any time, in any file... no extending needed)? If you don't like the html a ceratin ASP.net control spits out, you have to write a control adapter to override the default. Same concept, different implementation.

    Plus, now with the composite_primary_keys plugin and the uuid library, you have support for for GUIDs and composite primary keys. Also, there's nothing preventing you from creating sprocs in your db. You just don't have a Ruby-ish way of creating them in your migrations as you do table creation.

  • ASP.NET, especially the disaster that is ASP.NET 2.0 is an overcomplicated attempt to bring Windows Forms development to the web. Rails at least has simplicity in favour.

  • ASP.NET is a disaster? In what universe?

  • I agree. I watched the demo videos for Ruby On Rails and thought it looked like a lot of work. I guess it's a step up if you're used to PHP or "classic" ASP, but there sure seems to be a lot of tradeoffs - you have to follow a lot of conventions, you have to run a lot of obscure command line applications, you have to mix code with markup, and you have to give up all those ASP.NET server controls. Oh, and you have to learn a new language. Sure, it's elegant or something, but learning a new language to use a new framework isn't likely to pay off too quick in terms of productivity if you actually know how to use ASP.NET.

    Some cool things that Ruby On Rails does offer:

    Scaffolds - quick and dirty admin screens bound to your data. Grid view and detail edit view.

    Migrations - since Ruby On Rails manages your whole application including data accesss, it has support for automatic database schema changes between specific version. Say you're on version 5 of the DB and I've since removed a table, added twelve columns, and set a default value for an existing column. I'm on version 9. When you run the migration, it steps through all my changes to bring you up to version 9. If you don't like it and want to go back to version 5, the backwards migration will undo all the changes. Migrations seem like they'd encourage more ruthless refactoring at the database level.

    As I've said on my blog, I really like SubSonic because it brings some of the benefits of Ruby On Rails into the ASP.NET world without throwing out the good stuff in ASP.NET. You can use it to get up and running quickly, then jettision it later if you want without having to rearchitect your project.

  • Jon,

    "Obscure command line applications"? You mean rails, script/generate, script/destroy, script/console, script/server, script/breakpointer... I bet you could make an accurate guess as to what exactly those "obscure commands" do. They are no more obscure than csc.exe, or msbuild.exe. They are the tools that come with the framework to work within the framework. Sure, you can push a button in VS to get a nice dialog to access the settings for those. Thats what and IDE does, and thats what Radrails and Saphire in Steel do, too.

    You absolutely do NOT have to mix code with markup. In fact, I would dare say that your are encouraged to put far LESS code in your rails views than in your aspx files. In Rails, your code SHOULD go in your controllers and models. But there's nothing to stop you from putting them in your view. Just like there is nothing forcing you to define your SQLCommends for a GridView in your code behind. You're free to declare these in your aspx file, if you so please. Its about discipline, weather it is Rails or ASP.net.

    Learning a new language to use a new framework, at least for me, has paid off just as quickly weather it was C# and ASP.net or Ruby and Rails.

  • I don't think Colin Ramsay has actually used asp.net 2.0. The only thing I don't like about asp.net 2.0 is the compilation model, but that can be fixed. At least it *HAS* a compilation model, unlike RoR.

    Asp.net 2.0's only real problem is that it needs LINQ now, not later. But overly complicated? The framework is big, yeah, but you don't have to know all or even most of the framework to be very productive with asp.net.

  • I think with enough playing around and knowledge you can make Rails as effective as ASP.NET with even the most hardened ASP.NET guys and gals.

    I love Rails and the way it's pushing other platforms along, ASP.NET is learning from Rails and that's a good thing. :-)

    Look at IE, the best thing that ever happened to it was Firefox.

  • I've blogged about Rails a number of times and I think that its popularity stems from a number of directions:

    Growing 'barrier to entry' around the Java framework.

    The Ruby language is smalltalk-like which appeals to many of the 'cool kids' and is dynamically-typed which is flavour of the month.

    It accepted and packaged in a number of features - O/R mappers, unit testing, build scripts that while available for other platforms have not been so vendor pushed.

    That said its offers less than, say Foxpro, did functionally, but it is targetted towards people who have previously looked down on RAD environments.

    The tragedy is that just as MS has decided to be 'grown-up' to avoid any more Vb ridicule the 'grown-ups' have decided 'being kids' is the way forward.

    MS could capitalize on that movement and certainly LINQ, BLINQ, and if someone has the guts for it pushing VB back to RAD look like postive reactions. MS does need to own this space tnough, IMO, it's where they have been leaders in the past.

  • "Asp.net 2.0's only real problem is that it needs LINQ now not later"

    You missing AJAX, Rails has one of the most beautiful integration of AJAX I have seen so far.

  • http://atlas.asp.net

    ...That's pretty AJAXy to me, and idiot proof if you already get ASP.NET.

  • "...That's pretty AJAXy to me, and idiot proof if you already get ASP.NET."

    Unfortunately it’s still not ready for production probably we are still two months away from release

    I am asp.net developer by profession, I tried rails just out of curiosity and from what I have seen so far in Rails it looks promising for at least small to medium sized application.

  • Not ready for production? Is http://local.live.com/ not in production?

  • I think Rails is popular because a large number of people have an almost religious fervour that prohibits them from using anything by Microsoft.

  • Hmmmm, what would you think of a port of Django to IronPython?

    re: learning Ruby. It's a small language and the syntax makes a lot of sense. I use Ruby(under linux/OSX) or Python(under windows) instead of VBScript or Bash script for day-to-day one-off and admin scripts.

    Rails is great for prototyping. Although I'm considering writing a few upcoming small appliations using it simply because Visual Studio 2005 is a disaster. It drove me back to EditPlus development.

  • I'll never understand that either, how VS 2005 is a "disaster." Compared to what? I use it every day, and it's not very frequent that the IDE gets in the way of development.

  • Let me clarify that. In my experience, Visual studio 2005 is a disaster when doing Winforms development. I haven't had any problems using Either Web Developer Express or VS 2005 for ASP.NET development.

    A few things I've had happen to me while using VS 2005 for Winforms development:
    1) columns in the DataGridView are re-arrainged when opening the form in the designer.
    2) Runtime errors when using generated ST datasets with generated SQL and sprocs.
    3) VSTS only: "Run tests" button is disabled after running and I had restart the IDE to get it to come back. May be something I was doing wrong, but it wasn't intuitive.
    4) "Cannot find Microsoft .NET 2.0.blah blah" when compiling with ClickOnce security enabled. Known bug.
    5) Set DataGridView column visible=false, compile, run, column shows up in DataGridView. Have to re-set column visibility after databinding.
    6) When addding queries to existing table adapters, I sometimes get an dialog box showing an error in the designer telling me that it can't load the connecion string. Even though there is only one connection string defined in the project and it has the same name as the connection string it says it can't load.

    IMO, Winforms 2.0 was left by the wayside in the tidal wave of WPF development and it shows in the IDE support.

  • "http://local.live.com/ not in production?"


    Use of atlas at live.com does not mean any thing, I don't think that I can convince my superior to use software which still going beta stage(in fact its still pre-beta) for production site



    According to Scott Guthrie we are still two to three months away from release.



    "Atlas" 1.0 Naming and Roadmap



  • I didn't ask you for your opinion, I asked if it was being used in production. You can go on all day about whether or not you think it's ready, but you haven't used it, so your opinion means little to me.

Comments have been disabled for this content.