Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IronRuby On Rails VS. Ruby On Rails (Getting Started)

The Scenario

I am a C#/ASP.NET/MVC/Silverlight developer with a few years experience. I'm trying to kickstart my Ruby On Rails learning. I'm currently trying to get a real feel for ROR.

I Want To Know Standards

As a .Net developer, you tend to use a standard IDE (Visual Studio), a few standard databases (SQL Server, Oracle etc.), and a particular way in which to style your web 2.0 application (XHTML/CSS, Silverlight etc.)

'So what are the standard equivalents to these in RUBY ON RAILS!? (IDE, DB's, Presentation Layer Markups)'

Also

What route do I take? I've heard about IronRuby and from what i've read thats nearly complete in terms of converting it for use with Rails (IronRuby on Rails). OR Do I just go straight into using Ruby On Rails!?

What Benefits?

How will I be benefited from using IronRuby on Rails over using Ruby On Rails?

Help greatly appreciated thanks.

like image 420
Goober Avatar asked Oct 21 '09 11:10

Goober


4 Answers

IDE

Most RoR developers use a simple text editor (Textmate on MacOS, Scite on Windows) - mostly because most features (Refactoring, Code Completion) of IDEs designed for languages like Java/C# can't be applied that easily on a dynmic language like Ruby. However Netbeans does well so far (on the other hand there is Aptana Studio - based on Eclipse).

Databases

Since RoR does a lot of abstraction it doesn't really matter what RDBMS you use. MySQL and Postgres might be the best choices since they are the most used ones (so you can hope for continuous support). I wouldn't start to chose based on the flamewar about performance, rather on the services/support that come with them.

Markup

The standard would be ERB (similar to ASP inline scripts) combined with (X)HTML. However there are other markups like HAML which might be enough for some projects.

Benefits

Using IronRuby you get access to the .NET framework and interop with other .NET libraries. You might also write some parts of your application in static C#. According to some benchmarks it might be "faster" than native Ruby, not a real advantage though IMHO.

At the moment I would recommend you to get started with regular RubyOnRails - you might be able to switch later on (once IronRoR is stable enough) - if you should still desire to switch.

like image 134
Marcel Jackwerth Avatar answered Sep 21 '22 18:09

Marcel Jackwerth


IDEs:

On Macs the standard IDE is Textmate.

On Windows, there isn't a standard in quite the same way, but I like Netbeans.

Databases:

MySQL is probably the RDBMS most used with Rails, and hence the most supported, but I use Postgres, which is also very well supported, and have had no issues with using it.

Markup

The built in erb works perfectly well, and as it is built in I guess that makes it a standard. You can always use others if you want to.

IronRuby vs Ruby

IronRuby may be almost feature-complete, but I bet there is a good chance that some functionality will go awry, and you may have difficulty tracking down whether it is your code, or IronRuby. I'd be tempted to develop in vanilla ruby, and then port to IronRuby later, if that is an appropriate way to deploy your apps.

See also this question for information about commonly used plugins: Rails Plugins

like image 21
DanSingerman Avatar answered Sep 23 '22 18:09

DanSingerman


I would strongly recommend using regular Ruby On Rails - you don't want to have to worry about whether your errors are caused by problems in your code or incompatibilities in the platform you're working with.

The rest of my advice may be hopelessly out of date- it's a couple of years since I did much with RoR, but I'm sure others will mention it if I'm entirely incorrect.

There probably are IDEs with plug-ins for Ruby now ( I'd be looking for some Eclipse plug-ins maybe ) but it's not as regimented as the Microsoft ecosystem. You're working with open-source tools which means that different developers who like different things find solutions that work for them, so there may not be a "standard" as such. I got very accustomed to using Emacs with the ruby-mode plugin which is pretty awesome but there is a learning curve. I took the Pragmatic Programmer's advice to get good at using a text editor pretty seriously on that front and I'm glad that I did.

In terms of databases you may as well use MySQL as that seems pretty standard but I believe you can find an ActiveRecord back-end for a lot of different DB solutions. If you know how to use basic SQL and you get on alright with SQL Server and Oracle you'll be able to get on fine with MySQL though, no question.

With regard to the presentation layer, that's really created through Rails views. The aim is usually to build standards-compliant html and use CSS to style it. I learned a lot from the Agile Web Development With Rails book as a guide to how the platform works as a whole. I know everyone wants to learn everything from the web for free these days, but that book fitted things together in a way I found very practical and represented excellent value for money.

like image 33
glenatron Avatar answered Sep 20 '22 18:09

glenatron


If you like the Visual Studio ecosystem, check out Ruby In Steel from SapphireSteel. It's payware, although there is a free personal edition

like image 37
Ben Avatar answered Sep 20 '22 18:09

Ben