ASP.NET vs Ruby on Rails

S

Stephen Kellett

HI Folks,

Anyone here done both ASP.NET and Rails? Care to compare and contrast?
I'm not interested in MS bashing, just the pros and cons of both
environments.

The reason I ask is that I've just read on joelonsoftware that he thinks
ASP.NET is excellent and is the best solution for server based work
presented on a website. I wonder if anyone thinks thats a valid
statement or not and can provide arguments for/against that point of
view.

If ASP.NET does offer superior things to Rails, what can be done to
Rails and/or Ruby to change things?

Stephen
 
P

Paul Mitchell

Hello,
I've just installed ruby-1.8.2 on OS X 10.3.9 in order to try and run
instiki-0.10.1. I'm gettig an error, right off the bat with instiki:

../instiki
../script/server:4:in `require': No such file to load -- optparse
(LoadError)
from ./script/server:4
from ./instiki:6:in `load'
from ./instiki:6
bp01:/tmp/instiki-0.10.1 root# cd ..

which, of course, means that the script/server ruby file cannot resolve
the few require statements at the top:

require 'webrick'
require 'optparse'
require 'fileutils'

(note: I downloaded a separate webrick before I realized that the *rb
files were located in /usr/local/lib/ruby/1.8/, which is why we squeak
past this one).

I've changed my PATH to include this directory:

echo $PATH
/usr/local/lib/ruby/1.8:/usr/local/sge/bin/darwin:/bin:/sbin:/usr/bin:/usr/sbin

but it doesn't find it. Every illustration I've found so far seems to
notuse fully qualified pathnames i nthe require statement - how then do I
direct ruby to these modules?

Thank for any help,

Paul Mitchell

==============================================================================
Paul Mitchell
email: (e-mail address removed)
phone: (919) 962-9778
office: I have an office, room 14, Phillips Hall
==============================================================================
 
A

Adam P. Jenkins

Stephen said:
HI Folks,

Anyone here done both ASP.NET and Rails? Care to compare and contrast?
I'm not interested in MS bashing, just the pros and cons of both
environments.

The reason I ask is that I've just read on joelonsoftware that he thinks
ASP.NET is excellent and is the best solution for server based work
presented on a website. I wonder if anyone thinks thats a valid
statement or not and can provide arguments for/against that point of view.

If ASP.NET does offer superior things to Rails, what can be done to
Rails and/or Ruby to change things?

Unless "Joel" has tried every other available web app framework,
including Rails, then I wouldn't give too much weight to his claim. It
just means ASP.NET is his favorite framework of the ones he's tried.

I haven't seriously used ASP.NET, but I have taken a look at it. I
think it's more well designed than Rails in some ways, but the bottom
line for me is that it's so MS-centric, from the SDK all the way to the
servers it runs under. If that's not a problem for you then there are
some definite advantages to .NET, but for all projects I've worked on,
being tied to a MS platform wasn't an option.

Adam
 
B

Bill Guindon

HI Folks,
=20
Anyone here done both ASP.NET and Rails? Care to compare and contrast?
I'm not interested in MS bashing, just the pros and cons of both
environments.

Some comparisons here:
http://dema.ruby.com.br/articles/2005/04/29/rails-vs-asp-net-comparison
http://dema.ruby.com.br/
=20
The reason I ask is that I've just read on joelonsoftware that he thinks
ASP.NET is excellent and is the best solution for server based work
presented on a website. I wonder if anyone thinks thats a valid
statement or not and can provide arguments for/against that point of
view.
=20
If ASP.NET does offer superior things to Rails, what can be done to
Rails and/or Ruby to change things?
=20
Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
=20
=20


--=20
Bill Guindon (aka aGorilla)
 
C

Corey

the bottom line for me is that it's so MS-centric, from the SDK all the way
to the servers it runs under. If that's not a problem for you then there
are some definite advantages to .NET, but for all projects I've worked on,
being tied to a MS platform wasn't an option.

http://www.mono-project.com/Main_Page

http://www.mono-project.com/ASP.NET


I'm not saying I like ASP.NET ( or any of the .NET framework ), because I
don't - but I had to point out that due to mono, it's not as MS-centric as
you suggest.


Cheers,

Corey
 
S

Stephen Kellett

Bill Guindon said:

Well that page says he is going to write some articles. I can't find how
to read the articles he has written (there are no links to his
articles). There is a syndication link but I have no idea how to read
anything provided by that. Clicking on it just brings up loads of XML.

So how do I read the syndicated stuff? This has all passed me by - too
busy writing software to keep up with web trends.

Stephen
 
M

Mando Escamilla

------=_Part_18624_8677424.1119649429711
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I believe you need to set your LOAD_PATH to include /usr/local/lib/ruby/1.8=
,=20
rather than your PATH. Give it a try and see if that helps.

--
Mando

=20
Hello,
I've just installed ruby-1.8.2 on OS X 10.3.9 in order to try and run
instiki-0.10.1. I'm gettig an error, right off the bat with instiki:
=20
../instiki
../script/server:4:in `require': No such file to load -- optparse
(LoadError)
from ./script/server:4
from ./instiki:6:in `load'
from ./instiki:6
bp01:/tmp/instiki-0.10.1 root# cd ..
=20
which, of course, means that the script/server ruby file cannot resolve
the few require statements at the top:
=20
require 'webrick'
require 'optparse'
require 'fileutils'
=20
(note: I downloaded a separate webrick before I realized that the *rb
files were located in /usr/local/lib/ruby/1.8/, which is why we squeak
past this one).
=20
I've changed my PATH to include this directory:
=20
echo $PATH
=20
/usr/local/lib/ruby/1.8:/usr/local/sge/bin/darwin:/bin:/sbin:/usr/bin:/us= r/sbin
=20
but it doesn't find it. Every illustration I've found so far seems to
notuse fully qualified pathnames i nthe require statement - how then do I
direct ruby to these modules?
=20
Thank for any help,
=20
Paul Mitchell
=20
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Paul Mitchell
email: (e-mail address removed)
phone: (919) 962-9778
office: I have an office, room 14, Phillips Hall
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
=20
=20

------=_Part_18624_8677424.1119649429711--
 
B

Bill Guindon

=20
Well that page says he is going to write some articles. I can't find how
to read the articles he has written (there are no links to his
articles). There is a syndication link but I have no idea how to read
anything provided by that. Clicking on it just brings up loads of XML.
=20
So how do I read the syndicated stuff? This has all passed me by - too
busy writing software to keep up with web trends.

That was his initial post, the followups are all on the main page:
http://dema.ruby.com.br/

start at the bottom, and work your way to the top, you'll see a mix of
Ruby/Ajax/ASP/Rails in there.


Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
=20
=20


--=20
Bill Guindon (aka aGorilla)
 
A

Adam P. Jenkins

Corey said:
http://www.mono-project.com/Main_Page

http://www.mono-project.com/ASP.NET


I'm not saying I like ASP.NET ( or any of the .NET framework ), because I
don't - but I had to point out that due to mono, it's not as MS-centric as
you suggest.

I'm aware of Mono, but I've been told that while Mono does allow you to
use the base ASP.NET functionality, enough of the useful .NET
functionality is proprietary and Windows-specific that in practice you
won't usually be able to take an existing .NET app and run it using
Mono. Since I've not actually seriously used .NET I don't know if this
is FUD or for real.

Adam
 
T

Tobin Harris

I've used both for commercial projects, although I'm not an guru in either.

In ASP.NET, I've been using NHibernate for data access, and Wilsons Master
Pages for page templating. Both these tools are fantastic - and provide a
*lot* of power. ASP.NET is a dream in that you can do everything you want to
do - sky == limit. On the flip-side, getting things done in .NET isn't
always so easy, I think it lacks the high level of abstraction that Rails
has. If it's abstraction you want, you can always invest in one of the RAD
tools for .NET such as Deklarit, IronSpeed etc, which will make some of
these decisions for you.

Otherwise you can spend a lot of time figuring out exactly how to carry out
a particular task. You have to dig into the framework class libriaries quite
heavily, learn how it's classes collaborate to get the job done, and select
the best method for your situation. For example, in .NET there are various
ways of getting at your data, also there's many ways to send an email, to
create a custom GUI control, to handle authentication etc... Then, if you
want ORM, there's a *lot* of tools to pick from - NHibernate, Gentle.NET,
ORM.NET, EntityBroker, LLBLGen and many many more.. quite an overwhelming
collection.

Ruby on Rails is fantastic. It seems to be focused on making web application
development a breeze. I think one of the main reasons I like Rails is that
the framework makes a lot of decisions for me. I'm a *very* enthusiastic
developer who likes to play with ideas and tools, but this doesn't always
help when it comes to getting the job done. Rails is quite convention based
and provides a default way of doing most things, so it narrows down the
decision making process - which personally is a good thing.

If you have the luxury then I'd try both. Rails will probably get you
started quicker, and your solutions may entail less lines of code. ASP.NET
is a fantastic framework, but there's a lot of ground to cover to get up and
running.

Hope this helps.

Tobes
 
D

Dema

Hi Stephen,

I've seen that aGorilla has pointed you to my blog
(http://dema.ruby.com.br) on this subject.

As I am still working on both platforms, let me give you a summed up
comparison.

I think both ASP.NET and Ruby on Rails approach different ways for
building web apps, but both manage to do it in a very high quality
manner.

In the end, it's much more about developer's taste and less about
technical issues.

For instance, if you're more towards statically-typed languages and are
used to have a compiler and a top-notch IDE (VS.NET) to help you out,
then by all means go with ASP.NET.

On the other hand, if you prefer simpler tools (more text-based),
dynamic languages, and running your app in a interpreted, more agile
environment, RoR might be a good fit.

On the technical side, ASP.NET as we all know has some portability
issues, so, inspite of Mono, your best bet on a production environment
would be on a Windows web server and a SQL Server database. Remeber the
high costs of that.

RoR is based on a completely free, open-source stack (Ruby, Apache,
Lighttpd, MySQL, Postgre, etc) and runs well on pretty much any OS
platform out there, be it Linux, FreeBSD, Windows, MacOS, Solaris, etc.

If your going with RoR, remember to allocate some quality time for
studying the language and the framework and getting used to new tools
and environments and learning how things are done in a open-source
community. It takes some time to get up to full speed, but at the same
time, can be a revealing and rewarding experience.

Of course, these days, I'd recommend RoR, but remember that what best
fits me, and it might be different for you. Anyway, you will be in good
hands if you go with ASP.NET as well.

best regards,
Demetrius
http://dema.ruby.com.br/
 
S

Stephen Kellett

Michael Campbell said:
Thanks, that's the funniest thing I've read all week.

I agree. Visual Studio 6.0 is *SO* much better than any of the VS.net
versions. I'm still using VS6 to write C++ on Windows and will only use
VS 7.0 or above when I have to (i.e. the customer has a bug and has
supplied a project to demo it and it comes in VS7.0 format).

There really isn't any comparison. VS6 is very productive, the ones that
come afterwards fight you every step of the way.

Stephen
 
X

xmlblog

Having written tens of thousands of lines of code in ASP.NET for
commercial sites (www.deltavacations.com, www.covacations.com among
them) and being in the middle of writing a new site using RoR, I
believe I can add some hard-earned comments to this discussion:

ASP.NET is very powerful. The library is enormous and it has many
enterprise-ready technologies built into it. The most important of
these is transaction support. .NET 2.0 transaction support is even
better with the lightweight transaction scope. This is perhaps the
biggest gap in RoR's offering. That said, I disagree that ASP.NET is
more productive than RoR. I have been FAR more productive with RoR
after just a few months of learning Ruby and a few weeks of using RoR
than I am with .NET even though I've been coding on the MS platform for
10 years, with half of that time spent almost exclusively working on
web applications.

It is true that ASP.NET provides some great controls (grids, etc) for
web applications and 2.0 has even more (login view, for one). But what
is doesn't provide out of the box is a true ORM layer (from Microsoft
anyway). ActiveRecord is responsible for the great majority of the
productivity on the Rails platform. If I never have to create another
SqlConnection, SqlCommand, or SqlParameter object again, it will be too
soon. Yes, I have rolled my own Data Access layer, but for goodness
sakes, how many DALs have I built in the Windows world in the last 10
years?! Nhibernate is not fun either. Powerful as it may be, it moves
the burden from C# code to xml configuration. If I were to consider an
ORM tool for .NET, it would be LLBLGen.

My second-favorite Rails feature is the architectual guidance that is
built right into the framework. MVC clear as MVC can be, with
directories built right there for you. Yes, ASP.NET is MVC also, but
the PageConroller style generated in ASP.NET using Visual Studio is too
weak for my taste. RoR encourages validation of business rules in the
model, where it can be re-used effectively (read: where it belongs),
whereas ASP.NET's validation controls seem to encourage developers to
validate the rules in the UI. Surely, a case can be made for UI
validation to avoid server roundtrips and workload, but I don't buy
into it. My servers are running at 5% CPU utilization, and my
developers are running at 105% utilization. Of course, I can build my
own Enterprise Templates (a$$uming you have an Enterpri$e Ver$ion of
Vi$ual $tudio) but Rails' approach of sensible defauls (and everything
overridable) clearly wins out here.

The net result is that I *don't need* an ultra-powerful IDE like VS to
develop RoR apps. I do just fine with VIM, thank you. I may not have
IntelliSense or Refactoring, but the time saved on DALs alone more than
makes up for it, and, honestly, I refactor a lot less in Rails because
everything is already in place. If someone told me I had to build a
commercial ASP.NET application with VIM I'd tell them to go fly a kite.
Furthermore, VS does a bunch of weird crap to make interoperability
with Linux/Mono impossible (maybe a non-issue if you're a 'Microsoft
shop'). VS.NET code-behind pages use different attributes which make
building Visual Studio ASP.NET solutions on Linux with mono impossible.
You could argue this is a Mono limitation, I suppose, but the point is
you are pretty much locked in to the MS platform meaning Windows XP on
the development desktop, Windows 2003 on the Server, Visual Studio, and
MS SQl server. Add up the cost of that.

Lastly, I'll mention the default ASP.NET push for people to use data
structures such as DataReaders and DataSets. I don't care for them. I
prefer a real domain model, for several reasons. First, it encourages
*real* oo-style programming. Second, and most important, I am in
control of my data structure's internals, not Microsoft. Ask any
VB6/Windows DNA/ASP 3.0 developer how much fun he's having Interop'ing
the old ADO Recordset object with his shiny, new ASP.NET code and he'll
tell you he's ready to blow his brains out. I won't make that same
mistake. I prefer a Hotel object to a HotelDS and an IDictionary to an
SqlDataReader. That way when MS abandons the SqlDataReader I won't
care.

Having said all that, I do think the .NET platform is solid and
enterprise-ready. C# is an enjoyable language to program in compared to
C++, VB, and Java (all of which I have written production code with).
Still, the dynamic power of Ruby and it's cavity-causing syntactic
sugar like Enumerable#collect and Enumerable#partition is hard to
overcome. Don't rule MS out, however. They're busy at work on a Python
version for .NET (IronPython) and Don Box loves him some Ruby. I also
believe MS has made great strides with .NET 2.0, especially wrt
ASP.NET, but I think they have a long way to go to provide the kind of
out-of-the-box, architecturally sound, and simple productiviy found in
Rails. In contrast, most of the architectural guidance coming out of
Redmond these days is constipated -- Enterprise Library, anyone? Again,
nothing in ASP.NET prevents you from writing aesthetically beautiful
and simple web application code, but the feeling I get from the default
Visual Studio web project setup falls short or 'rails myapp'.

In short, if you need transactional capabilities or need to integrate
with some of the other enterprise features (message queueing), build
with .NET and get yourself a good code-generation/ORM tool. If you're
building your standard 3-tier web app, or have a tiny budget, I
recommend giving Rails a serious look.

Cheers,
Christian Romney
 
J

John Wilger

Having written tens of thousands of lines of code in ASP.NET for
commercial sites (www.deltavacations.com, www.covacations.com among
them) and being in the middle of writing a new site using RoR, I
believe I can add some hard-earned comments to this discussion:

Thanks for writing this up. Very insightful.

--=20
Regards,
John Wilger

-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
 
X

xmlblog

wrt VS.NET, haven't written C++ code with it but all the managed C++
stuff looks ugly as hell to me, so I wouldn't be surprised if the C++
experience sucked. However, for C# code, VS.NET is very nice,
especially version 2005 with its refactoring support, code snippets and
IntelliSense. There isn't an open-source/linux IDE that can hold a
candle to Visual Studio (6.0 - 2005) and that's a fact.
 
M

Michael Campbell

wrt VS.NET, haven't written C++ code with it but all the managed C++
stuff looks ugly as hell to me, so I wouldn't be surprised if the C++
experience sucked. However, for C# code, VS.NET is very nice,
especially version 2005 with its refactoring support, code snippets and
IntelliSense. There isn't an open-source/linux IDE that can hold a
candle to Visual Studio (6.0 - 2005) and that's a fact.

IntelliJ's IDEA and even Eclipse (for Java, anyway) both have more
refactoring tools, better code templating support, and a much bigger
"after market" plugin library than VS 6.0 had.

Granted, I've only seen beta-2, and time will grow the VS plugin
market for sure, but it's still got some room to catch up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top