Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mono or RoR for new application run on linux?

I have little experience with ruby itself. I am going to hire somebody to write a web based application and I wanted it to be written in RoR but I was recommend mono. I guess because they like mono and because they think the RoR is slow.

The whole application would be some kind of social media meta management tool. There will be front end web based part and then back end doing the 'real stuff'.

I have no experience with mono at all and I am not experienced enough to comfortably say that RoR is the best choice.

I understood that if RoR is configured properly it could be pretty fast. I read that RoR has some troubles with scalability. I will start the application small and if it's successful I need to scale it up.

What would you recommend?

in the light of

  • performance
  • scalability
  • easiness to test
  • easiness to maintain, develop code/project

( I like ruby but I am not going to be the developer myself. I prefer to choose the 'better' option if there is such answer to that question)

please feel free to suggest anything else ...

like image 868
Radek Avatar asked Sep 05 '10 00:09

Radek


2 Answers

If you are not going to write it yourself, you may want to go with what the person who will write it is most comfortable with.

Full disclosure: I have developed several sites now using Mono and I love it. I have used Ruby-on-Rails but not for anything nearly as big as what I have done in Mono. Keep that in mind.

Quick answer: In the greater scheme of things, Ruby-on-Rails and ASP.NET MVC have more in common than not. My choice would be ASP.NET MVC on Mono but I doubt you would regret choosing either.

Architecture: If you want one way of doing it out of the box, choose Ruby-on-Rails. If you want to be able to choose what you feel are the best-of-the-best technologies from a range of choices, choose .NET (Mono).

Ruby-on-Rails is more of a turn-key solution in that it provides a standard way of doing pretty much everything you need out of the box. .NET (Mono) offers a lot more power (my opinion let's say) but there are a lot of different pieces to choose from and you have to choose a technology stack yourself. As an example, RoR has a standard way of accessing databases while .NET Mono let/force you to choose from a dozen different ways to do that.

Mono and .NET generally have a little better separation of concerns so the purist in you might like that. If not, you actually find the roll-up-your sleeves and get it done attitude of Ruby more to your liking.

Performance and Scalability: This should clearly go to .NET and Mono. In fact, I believe the fastest way to run Ruby-on-Rails is to use IronRuby to run it on .NET. StackOverflow is written in ASP.NET MVC and, given the amount of traffic, it obviously performs great. Proof is in the pudding. That said, the performance bottleneck will probably not be your choice of framework.

Testing: Old style ASP.NET (now called WebForms) is considered pretty hard to test. The newer ASP.NET MVC was designed to be easy to test and is similar to RoR. One major factor is that in Mono you will probably be using a statically typed language (like C#) while Ruby is of course a dynamically typed language. You have to write more tests in a dynamic language (because the compiler/interpreter will not catch type problems) but it can also be easier to write tests if you are not fighting the compiler. I think it is a matter of taste and style (I like static) but this is a major factor in answering this question.

Of course, since .NET/Mono is a multi-language platform, you could always write your ASP.NET MVC tests in a dynamic language. You could even do it in Ruby (IronRuby). Perhaps that would be the best of both worlds (static checking on your real code and flexible dynamism in your tests). I have considered doing this myself using IronPython for tests.

Maintenance and development: This is a tough one. It depends what you are writing, what third-party libraries you might need, and what tools you are going to use. I would say that RoR is probably the more advanced MVC framework. My own thoughts are that Ruby-on-Rails is probably a shade easier to write but a little bit harder to maintain.

Community: I like the Ruby community more than the .NET one but I think I like the Mono one the best. That makes it a little confusing. The core Mono guys (like Michael Hutchinson that answered here) are simply awesome. I really like MonoDevelop as a tool (IDE) as well. It just keeps getting better and better. Michael, thank you for Git support if you had anything to do with that. :-)

Tools: If you are writing for Mono you can use the whole universe of .NET tools (VisualStudio, ReSharper, Reflector, etc) so that is pretty hard to beat. That is assuming you develop on Windows of course. On Linux or Mac the tool of choice for Mono would be MonoDevelop. It supports version control, a software debugger, and NUnit tests right in the IDE and is completely cross-platform.

It seems like a lot of Ruby folks just use a simple text editor. This may just be because an IDE just does not have as much to offer a dynamic language as it does a static one. Here is a SO question on what people like for Ruby:

What Ruby IDE do you prefer?

EDIT: Just to make things confusing...there is another MVC framework for .NET/Mono that is even more like Ruby-on-Rails; MonoRail even has an implementation of ActiveRecord. MonoRail has actually been around longer than ASP.NET MVC but I would stick with ASP.NET MVC these days as that is where the future lies. ASP.NET MVC is open source by the way and ships with Mono out of the box (the actual Microsoft code).

like image 173
Justin Avatar answered Oct 19 '22 00:10

Justin


I can speak more to Rails than Mono. RoR is pretty scalable these days with all of the cloud hosting services available. Web applications query data and render web pages using that data, which really isn't that big of a deal. Most performance issues are caused by database and schema design issues, not the web framework. Typically, database response times dwarf other portions of server processing. RoR is also very easy to test. Testing is a more natural part of development than in other languages that I use. When I started RoR programming I was used to the much more structured world of Java, and the more dynamic Rails won me over for web development.

like image 39
Peter DeWeese Avatar answered Oct 19 '22 02:10

Peter DeWeese