I apologize for the Flame War question but frankly I don't care about that. I know these are both good languages but I would genuinely like to hear everyone's opinion on what the better is for a beginning web developer who wants to learn to build great sites and web applications. Thanks for your help.
Re C# - IMO, the more important choice is between ASP.NET and the more recent ASP.NET MVC, with my preference being the latter. MVC is quite comparable to a number of frameworks like "rails", where-as ASP.NET (regular) is just... unique ;-p If it was me, I'd look at ASP.NET MVC with jQuery.
I think both are good languages with clean, coherent and concise design and both would be a great choice as a first language to learn (unlike some other commonly suggested alternatives).
That being said, I don't feel that either of these make for a great web development language - they both have several drawbacks for that use:
- You will probably use c# inside ASP.net which is a mess that will not allow you to learn neither good general programming skills nor good web programming skills (and I do believe the skill sets do not overlap all that much). C# as a web development platform is also bound tightly to Microsoft technologies and I have my issues with that.
- For Ruby you will probably use Ruby on Rails which is a great MVC framework for web development but it has its own issues and is also very unlike current web development techniques as they are used in "the industry". It is also rather slow.
My suggestion:
- If you want to learn general programming and design some desktop or server application, either would be a great choice though I will recommend C# first.
- If you want to learn web development, then I suggest going with a more industry standard and also not a really bad language - which is Java using JSP.
P.S. - if you only plan on ever using one tool and be done with it, then either are good choices and I would recommend Ruby on Rails. My answer above is relevant if you want to be a good programmer and use this experience as a base for learning other technologies.
Take a little time and play around with both and see what you like. I don't have any experience with .Net and C#, but for Ruby I recommend subscribing to the Rails screencasts at BuildingWebApps after a few basic tutorials on Ruby and Rails. They start with a very simple site and keep adding more functionality to it as the lessons go on. It's also free.
I'm going to say C#.
Ruby on Rails is a complete and basically closed technology stack from Prototype for Javascript to Rails for ORM on the backend. Now this can be good because it means that any Ruby programmer coming onto a project will know what to expect. But it's bad as well because fads change.
Just look at the rise of jQuery over the last 2 years. jQuery is becoming--if it hasn't already--the dominant Javascript framework, Now you can use jQuery with Ruby but the fit is a bit awkward since you're basically throwing away your Prototype integration.
One of the reasons C# and Java have been enduring is that the tchnology stack is basically pluggable so it doesn't really matter what today's fad is because tomorrow's fad will (probably) fit.
So of those two I would pick C#.
I am a long-time C# developer who just jumped into Ruby and Rails about a year ago. I love Ruby, but I am going to say C#.
Why? Because I assume one of your main goals is to learn. Thing is, Rails and Ruby have so much metaprogramming power that the Rails framework does a lot of magic for you. And since it's magic, by definition you don't understand what it's doing.
In C# (and I'd recommend MVC), there's much less magic. If you want something done, you either do it or use the framework components that do it for you (using the same kinds of capabilities that you might have used to do it yourself). So you can understand what's going on.
As you get projects under your belt, you might come to resent the boilerplate or repetitive coding that any statically typed language makes you do. Then, perhaps you'll appreciate some of the magic in Ruby and Rails, because you'll understand what motivated it.
If you are thinking long term, than Ruby is the better choice because it is more platform agnostic.
You are bound to the Windows platform if you choose C#.
But whatever you do, either C# or Ruby are better than any web-only language. A project can have web and non-web parts. With Ruby being great for additional scripting.
Seaside on smalltalk should be the starting point. Both Ruby and C# have too much cruft. In Seaside you're able to structure your code well, and there is nearly no accidental complexity, just the mess created by html, js, css and browser versions.
Yes, Ruby had some issues. But version 1.9.1 already solved most important issues like native Unicode support and performance. The Ruby is now comparable to PHP and Python in terms of performance. And superior to them in other areas IMHO.
Ruby on Rails it is a full framework. Yes, it is much slower than simple PHP pages. But people shouldn't compare 4 wheels and engine with full featured car with air condition and DVD on board. Compare PHP Zend framework to RoR.
You'll stop worrying about RoR performance once you deploy some application and see real CPU utilization on your server. Then you'll start to worry about number of visitors ;-) and how to get things done as efficient as possible.
Currently I am developing serious RoR application and use jQuery. jRails allows to write RJS and this simple patch to test JS code generated by that plug in. But in few months Rails 3 (merge with Merb) will be JS framework agnostic and build in support for jQuery will be on the same level as for Prototype.
BTW I don't know very well C#. However few months ago and I had to write simple Windows application and I chosen C# for that task.
I would see Ruby (or RoR as must people actually points to) rather than C# (asp.NET) because for one simple reason, I type less in ruby and I don't need to pay a lot of money for the software required for C# to run. Please may argue that C# could be run on free software but if you really tried those you would go back to Microsoft's offers. I agree that Ruby's performance may not be as good as C# but the development time required is definitely better than C#. If you really want the best speed coming from any language for huge scaling you should instead go with Erlang and the likes (Scala?), because those are the real scaling monsters.
If you let me choose Java or C# I definitely go with Java for the fact that Java have much more sensible choices and they also could work with each one. I also hated the days when Microsoft released new specs for asp.NET in every new version of the .NET framework.
I am learning C# as well as Ruby/Rails. I would say learning Ruby on Rails is great because you get to learn how to "WORK" project. Learn rubyOnRails while learning to develop in Agile principle. However, learning C#/ASP.NET is also great because you get to learn how to "REALLY" program.
You get to learn how to program while you do C# Versus you get to learn how to deliver while you do RubyOnRails.
My experience is that I've learned C#, but wasn't able to deliver the project as I wanted. That's because as a near novice programmer, it is very easy to get stuck in details, rather than going forward with a result in mind. Learning RubyOnRails with an agile principle made me more productive and now I can apply the same principle while I'm doing C#/ASP.NET.
Moreover, learning RubyOnRails is relatively easier and once you've learn that, understanding ASP.NET MVC is much easier than those who've started from ASP.NET background.
I'd choose Ruby with no hesitation. I worked with both on various companies, and Ruby (+rails) is way more fun to use. A lot of people don't take that into account when choosing a technology but I think this is important. If a developer wants to kill himself everytime he has to to some complicated code, this is not good.
Ruby always lead to look at my code and go "this... is.. AWESOME!" when C# I have the feeling that it's not as pretty and full of magic.
But then again, my opinion is really biased, C# is not that bad. It's just not as fun imho.