

Microsoft ASP.net or Ruby on Rails? - cavabien

How do ASP.net and Ruby on Rails compare? I couldn't find a technical comparison online and found only "microsoft sucks" answers elsewhere. I would like to understand the technical differences. I'm considering them for a social network project.
======
jhollingworth
I am a big fan of both RoR & ASP.NET (Although I only get paid to do ASP.NET
:( ) and i've found are both awsome at doing very different things.

If you want a basic data driven application which isn't going to have a
significant load, then I would go with RoR. I have personally found that when
ever you go beyond that use case, you will very quickly find the limitations
of the framework (e.g. you can't start a sepeartate thread in an action). Yes
there are workarounds to these problems, but they are all rather experiemental
and a bit hacky.

For all the thats bad about microsoft, the fact that they are making ASP.NET
for profit means they are designing it for large companies which have very
complex problems to solve. This means that ASP.NET is designed to be highly
scalable and efficent.

What I would say is avoid WebForms at all costs, it is a horrible framework
designed for desktop app dev's (using WinForms) to quickly get to grips with
web development. Unfortunatly to get WebForms to act like a WinForms app
requires a lot of horrible things (i'm pretty sure that satan invented
ViewState). Also, as xenoterracide mentioned it will run best on Windows
Server meaning you will probably have to go down the microsoft route and spend
crap loads of money.

A better option would be to look at Castle Project
(<http://www.castleproject.org/>) they have basically developed a port of
Rails for C#. It has all the core concepts of Rails, works brilliantly on
MonoRail and uses NHibernate at the core of it's ORM and so can you use
whatever DB you like.

I think in the end, you shouldn't be looking at the language and saying this
ones got more hype I should use that one. I would say look at the actual
problem you are trying to solve, what are the requirements? Do you need
something out in a couple of days which just does adds a few records to the
DB? go with RoR. Are you making a massive data mining app which is gonna be
run by 50k people? Go with ASP.NET (or MonoRail)!

~~~
grantc
Skip Castle, it pulls along a lot of baggage with it and its not for
beginners. ASP.NET MVC with LINQ + NHib is my pick as most productive .NET web
stack right now. I think there's enough literature out there to get you
started on MVC, NHib will increase your learning curve a bit, but it should be
a good second stage.

You can build anything with anything. It's mainly about what personally works
for you and what kinds of skills you want to end up with on the other side.

Good luck.

------
ericb
ASP.net would be my second-choice to ruby on rails. It's a close call. If
Castle's ActiveRecord was better when I tried it, I would have probably never
delved into rails ages ago. I'm glad I did though.

In favor of Rails:

-There are pre-existing FOSS social network apps in rails you can modify.

-You have infinite scalability where your only multiplier is hosting cost b/c there are no windows licenses, so no obstacles to moving into the cloud, virtualizing, setting up a friend

-With rails, you are mostly saved from SQL. Castle's activerecord might do this on .net, but was lousy when I tried it a while ago. Might be better now.

-It is easy to be coddled by ASP.NET and not understand the parts underneath, which works well until the abstraction leaks (viewstate, page layout, etc).

That said, asp.net is not a bad option, and would be my second choice over the
java frameworks I've tried, or php. .NET has a nice IDE and better tooling
than Rails.

~~~
subwindow
I don't understand why this post was downvoted. It seems rational and
inoffensive. The main post asked for opinions and he gave his- what's wrong
with that?

~~~
bprater
I think we have some idiots in our midst that will downvote simply because
they don't agree. It's sad.

~~~
ericb
When I posted this, I noticed several posts in this thread that were at 0 that
I thought were good, so I voted them up. Some people come here to discuss
tools, some people come here to _be_ tools.

------
snprbob86
I am a hardcore huge big time C# fan. That said, I hate ASP.net with a
passion. Two key reasons:

1) It tries to simulate WinForms. It's just the wrong paradigm for the web.

2) As much as I love C#, I feel that strongly typed languages are less than
ideal for web development. Web development is inherently a dynamic
environment. Javascript is dynamic, HTML content is dynamic, etc. etc. It is
just easier and faster to build dynamic applications and test with page
reloads than a typical compile & run loop.

~~~
tx
You don't hate ASP.NET, you seem to hate WebForms and for very good reasons.
You don't have to use WebForms though, there are other toolkits available. In
fact, I built a neat desktop application using ASP.NET stack once - you can
embed it into any .NET process to neatly handle HTTP requests.

One huge advantage of ASP.NET is that it is crazy fast. After a while it
generates native-code assemblies and you're basically looking at C/C++ speed
when handling requests.

You can get yourself one of those newer (and cheap) dual-CPU quad-core servers
with 8GB of RAM and this machine will handle some serious load (enough for
most applications). This will allow you not to mess with distributed stuff and
keep your stuff in RAM in between requests. Such setup will be an equivalent
of a farm of RoR machines with MUCH smaller load on DB layer.

Of course, it doesn't apply to high-traffic projects like Twitter/Facebook,
etc.

~~~
snprbob86
Ive also tried the MVC framework. It is a huge improvement over WebForms as it
neatly addresses complaint #1, but it completely fails to address complaint
#2. It is also beta software under heavy development and rapid change.

That said, Linq to Sql ROCKS MY WORLD. Maybe a more mature MVC framework and
better Visual Studio support will join forces with Linq to swing me back to
ASP.NET

I'm confused about the "crazy fast" comment. I'm a big believer in C#'s great
performance, but ASP.net is super slow for me on every machine I have ever
tried. Hell, every Microsoft site I can think of feels slow on round trips.
Something is very very wrong...

------
goofygrin
Three things:

1\. Look at the MVC framework for ASP.NET 3.5 as it makes ASP.NET act more
like Rails

2\. If you're going to use ASP.NET, use 3.5 so you can use LINQ and all the
new 3.5 features. It makes your life WAY easier.

3\. There is no real scaffolding for ASP.NET like there is in RoR. Well there
is a kind of like it thing that was put out
([http://www.hanselman.com/blog/PuttingASPNETDynamicDataIntoCo...](http://www.hanselman.com/blog/PuttingASPNETDynamicDataIntoContext.aspx)).

Now, here's my take... if you learn ASP.NET/C# you will have marketable skills
in most non silicon valley markets that you can use as a consultant or
employee as need be. There are significantly less corporate jobs that are RoR
than there are C#/ASP.NET.

Also make sure you look at Python/Django (which is normally what is argued
with RoR).

~~~
jon_dahl
Good point in the second to last paragraph. Do you want a corporate job? If
so, consider .NET or Java. Do you want a freelance/startup/independent job?
You may find the Ruby (or Python etc.) community more supportive. There are
exceptions to each - there are .NET startups, and Ruby is making inroads at
lots of big corporations - but your career will likely have a different flavor
depending on what you choose.

~~~
tptacek
If you can write in C#, you can write in Ruby --- Ruby is a less complicated
language. There are startups that won't hire you unless you have "3 years of
Ruby experience" on your resume, but you wouldn't want to work for them.

We looked for Ruby devs, quickly gave up, and wound up hiring a Lisp hacker.
Our runner-up was a sharp C# hacker.

~~~
goofygrin
programming is more than syntax

There is a huge amount to programming .net that has nothing to do with the
{}'s of C# and all to do with the .net framework (which won't translate to
Ruby at all).

That said, a good/sharp programmer is more than a monkey slinging code so they
should be able to work well in any language.

~~~
tptacek
I think the mentality that programming has more to do with knowing your
framework's features than it does with --- you know, how to program and stuff?
That's part of what pisses people off about Rails devs.

The reality is, learning framework features is no different than learning how
to mail-merge with your word processor. Sure, it's important. But it has
_nothing to do_ with whether someone's going to do a good job coding for you,
2 months in.

------
elad
I find that Microsoft tools in general offer a compelling package when you
start out - great IDE, good docs and purportedly good support (I never use
customer support myself, so can't comment on that from a personal experience).
The problems begin when you want to move a step further - explore the code or
hack stuff.

Also, you're stuck with their platform for everything. The advantage in using
an open package is that you can mix and match. If you're willing to do some
research and work, you can find the tools that best match your specific
requirements and hack together your dream application.

In the end it really depends on your temperament as a developer. If you prefer
easy gains initially and can live with the limitations down the road, plus you
don't really care how it all works under the hood and rather just have
something that works OK in the end, then I guess MS should be your choice.

The reason that you find mainly "microsoft sucks" answers in hacker forums, is
that hackers love the freedoms that being locked in to the MS platform takes
away.

------
ScottWhigham
You're likely to find that this group is 90% against ASP.NET - at least, in
the past, most .NET-related posts don't end well or contain too much positive
info. Not to mention you're question seeks out a pretty specific person/group:
those who have tried both in difficult situations.

There are other things to consider than just the language. I live in Dallas,
Texas and Dallas has wonderful colleges but none of them are really tech-
focused. As such, we tend to have no MSFT-trained developers coming out of the
tech schools. So, what that means is that Dallas has a very good group of open
source developers vs. a smaller group of .NET developers (at least that's been
my experience in trying to hire). So, does your area have more of one type of
developer? That might influence you as well. If your startup succeeds, you'll
need more folks to help and it's easier to hire locally than for a startup to
afford a relocation package.

~~~
goofygrin
Wow, I live in Dallas and the .NET community is very large here (have you
attended any of the .NET user group meetings?)

Honestly I find the OSS community to be very weak here since most developers
are corporate type and they know either Java or C# or VB.NET. Every OSS
(Python) meeting I've ever been to has been populated by back room tinkerers
and people that "haven't done it" (tm) so they aren't any help to me with my
real world questions and problems.

Now if you expect _any_ college to put out good developers you have the wrong
expectations for what college does. They are not Devry (which you should never
hire a developer from Devry). Colleges teach theory not practice (which has
been beaten like a dead horse on the net).

------
jawngee
Been a .NET developer since Beta 1. Spent the last 2.5 years in open source
land.

ASP.NET has some good ideas, but the paradigm is completely incorrect. As
another poster stated, it attempts to mimic WinForms development on the web,
which is a layer of complexity that simply needn't exist.

ASP.NET MVC is a step in the right direction, but requires a crapload of
plumbing and, honestly, is too little too late.

RoR ... I've only used it doing research. ActiveRecord seems like a bloated
ORM with a lot of unnecessary overhead. Ruby is a kick ass language though.

Django is cool if you can look past the unfortunate choice of terminology.

You couldn't pay me enough to work on ASP.NET site at this point, on the other
hand Rails has a tax that you'll have to pay some time in the future.

My only recommendation is to go the open source route. A lot of your problems
have already been solved, and some of those solutions are MIA on windows. I
laugh at Jeff Atwood running PHP on IIS and being steamed that there isn't
anything approaching mod_rewrite for IIS 7. Vendor lock-in must really suck.

~~~
ratsbane
I strongly second the thought here (and in a few other comments above) that
.NET fails because it tries to make web programming work like desktop
programming. It doesn't.

------
subwindow
I would go with Rails because there are several options out there to give you
a good starting point for a social network.

Try out Insoshi (<http://portal.insoshi.com/>) and Lovd By Less
(<http://lovdbyless.com/>). Work with each for about a week and see if you
like the way the code works and their extensibility.

Also, I'd concentrate on only one factor, at this point- what platform gets
you to launch the fastest? Unless you have significant ASP.net experience,
Rails will probably get you there faster. Add in the massive amounts of Rails
open source code that you can build off of, and I think the choice is clear.

Don't pay attention to people who say "Rails can't scale" but haven't actually
built a large Rails app. I run a Rails app that handles >1,000,000 hits per
day, and I've spent about 3 hours resolving the scaling issues that I've run
into.

------
xenoterracide
Feel free to tell me if I'm wrong, but you have to run a windows server to run
asp.net and that comes with a whole plethora of maintainance and security
issues. There's also the cost factor, you know IIS, MS SQL, etc... If you want
the whole M$ package. It gets expensive just to break into it, and even worse
on maintainance, as you have to watch out for all those viruses and broken
service packs. This is why people say Microsoft Sucks. So there is some
technical merit to it.

I believe asp.net can be run on *nix via mono, and an apache mod. However, my
experience with mono is that it sucks (I've never developped in it just use
apps developped in it).

Other than advising against the M$ path on an administrative perspective, I
can't really give you a fair comparison.

~~~
ComputerGuru
Sorry, but IIS is free (assuming you have Windows) and I'm coding .NET and
MySQL as I write this. Oh, and I've never seen a server run by a proper IT
admin get a virus - only people who use the server as a workstation get
infected.

~~~
swombat
Windows isn't free, though, and usually adds additional costs onto your
hosting.

~~~
dbrush
These days not much. Additionally, Visual Studio Express is free.

Splashup.com is .NET, IIS, Windows Server 2003 and MySQL. It's never crashed
unless I've borked something and it's been through a Techcrunch, Lifehacker,
and Digg on the same day.

~~~
ericb
While this is true for shared hosts, if you want to install on your own
machine, run test and dev servers (virtualized or no) or cloud-host your app,
there is still a very real cost to windows licenses.

~~~
jshen
and sql server licenses and visual studio licenses, etc

~~~
grantc
Read up for the part where we discussed Visual Studio Express being free.

The amusing part about the free tools argument is that the cost of tools is
such a non-concern in the professional world. I work for large customers on
large projects and tools, whether they be Microsoft, Oracle or IBM, no one's
worried about that.

Then again, you might be talking about little side projects, my frame of
reference is mostly multi-million dollar systems.

~~~
ericb
Many people on HN are working for or on startups and bootstrapped projects.
Implying any project concerned with the licensing cost is a _little side
project_ is disingenuous.

Even at large companies, all things being equal, having no licensing costs is
a competitive advantage.

------
pragmatic
I'm a an asp.net/C# programmer by day. I developed a RoR app for a client on
the side. The problem was you couldn't keep the darn thing running. RoR was
unstable as heck for me and was missing some features that were dead simple in
asp.net. (At the time I couldn't find a good zip library, the one I found had
documentation in Japanese).

If I were comparing asp.net to something I would consider django or just PHP.
PHP has a heck of a deployment story. I run MANY wordpress blogs on the side
and centos/mysql/apache/php is rock solid AND fast.

My 2 cents.

~~~
jshen
I've done 4 professional rails apps and many personal ones. I've never had a
problem keeping them running. Did you spend any time trying to figure out why
they were crashing?

~~~
grantc
My guess would be that if you've never had trouble keeping things running
either they're not real complicated or you don't have a lot of users. And that
statement applies to _any_ technology/platform. If you build things long and
big enough, you'll fight the technology at points.

That said, even if you have a ton more professional experience than your
response suggests, I don't trust people who say never glibly, nor does your
question seem genuine.

You're implying the guy's a newb and it's him not the technology--just say as
much.

------
pcrawfor
I moved from an msdn shop into a rails-based startup. I totally agree
regarding the comments on winforms...I wrote an internal app with it and it is
just not a great option.

Rails has been great so far and I have three production projects and a couple
more on the way running under it. Rails is continually moving but is not
perfect for all situations by any means.

I personally don't think I'd build an app using another language although I am
interested in trying out some variations on rails like Merb (a more light
weight web framework written in ruby) and also some of the other platform
alternatives based on ruby such as jruby and ironruby (the .net implementation
of ruby).

As another option I've heard it said that ironpython the .net implementation
of python is a pretty good language option for .net web apps as well.

The thing that always held me back for web apps and MS is the server
software...I am not a huge fan of paying licensing fees for server software
when sooooo many great options are available open source.

------
meddah
Hi,

Ruby very nice language. But I think, Rails not flexy. I dont like Rails.
ASP.NET nice, easy and extendable architect but windows sucks and very
expensive server cost for new start-up.

Maybe, you must use Linux + PHP + MySQL ;-)

~~~
dbrush
Down-modded for English that isn't impeccable?

~~~
dbrush
That was a question. Specifically in the interests of pondering why the
commenter was down-modded even with the reasonable comment...

------
drawkbox
It doesn't matter, if you are a competent programmer you can use .NET, RoR,
Python, Java, PHP or anything to make it work efficiently. Tools do not make
the system better, the people working on it do. There is 'magic' in both the
systems that you mention but you should be aware of the underlying 'magic' and
architect a solution that works best. Rarely today are programmers limited by
platform. The only concern with .NET is platform lock-in but if you go with
mono there is no concern.

You will find languages and platforms are like religions or brands, everyone
has their favorite because it worked for them but it doesn't make them the
best. Just the best for them and their conditions/constraints/knowledge.

------
senthil_rajasek
Other than the cost and the admin factors building, deploying and
debugging/troubleshooting web applications in ASP.NET environment simply
rocks! Not to mention the IIS sweetness and scalability models.

I have a facebook application
(<http://www.facebook.com/apps/application.php?id=5595659604>) that I built
using the LAMP stack, something quick and dirty . I like the LAMP stack and
have nothing against RoR but be prepared to spend a lot of engineering
resources in scaling these.

Case in point try debugging a web server crash in your favorite RoR web server
vs ASP.NET/IIS environment.

------
tortilla
Check out these guys, nice blog with good info:

<http://www.softiesonrails.com/> (Ruby on Rails for .NET Developers)

------
pragmatic
Don't forget Linq. Linq to XML is awesome. No more xpath. One of my colleagues
left the RoR camp after he couldn't get xml parsing to work.

~~~
tptacek
Details? In my experience, XML parsing is one of the easiest things to do in
Ruby.

------
mtw
re: considering social network project i've used community engine, which is an
out-of-the box RoR social network plugin

[http://missingmethod.brunobornsztein.com/projects/community_...](http://missingmethod.brunobornsztein.com/projects/community_engine/)

mature and solid (vs insoshi or lovdbyless)

------
danw
The tools available for .Net development are better, in my opinion. Visual
Studio and IE Developer Toolbar (not the IE8 version) make debugging
javascript lovely whilst the Resharper extension enhances VS' features nicely.
Also give VisualSVN a try for Subversion integration.

