Topic: Rails vs. ASP.NET MVC 4
I am coming from a .NET world where I've developed applications for years. Right now I am in the middle of starting a new web-based venture and I am trying to find the right technology for the job. Of course, my first and obvious choice was ASP.NET 4 with MVC. However, I had also heard about Rails and I decided to play around with it. I can see how powerful and easy-to-use rails is, but right now I can't imagine developing a data-heavy app with complex business logic using it. Since this is a Rails forum I would like you guys to convince me to use Rails over ASP.NET.
Right now, the only advantages of using Rails for me are:
- Cheaper hosting
- Not in any way related to Microsoft ;)
- I can use my Mac for development instead of a slow Windows Virtual Machine.
Right now, my main problem in Rails is the business logic. In .NET I would structure my app as follows:
ASP.NET MVC -> Service Layer -> Business Layer -> Data Layer. Thus, the Model in MVC already works with business object (which, for the Model is the pure data). The Data Layer is completely decoupled from the rest of the application, and I can add Web Services on top of the Business Layer later on. This is necessary because my Data and Business Logic are very complex and will be extended constantly. It's a very scalable design allowing for a lot of flexibiity.
However, it seems like Rails forces me the work within the MVC triangle. The Model NEEDS to be connected to the database in order for Rails to make sense of my application. I don't see how I could structure complex business logic with a design like this. And even if I could, if I scale my application I would need to mess around in database and models, which will be ugly. Any thoughts on this?
For me, another disadvantage of Rails is that I need to search for gems in order to implement simple features. User authentication, authorization, caching, security, etc, etc. I might be lucky to find a gem that has it, but it's very unlikely that it will fit my business needs completely. ASP.NET and the .NET framework has everything you could every wish for integrated and ready to use.
The third big point is performance. We all know about the performance difference in compiled and interpreted languages. Sure, data design and caching will be more critical to perfomance than the actual lange. But since I'm operating on large amounts of data, it might actually make a difference once my app grows.
Any thoughts on these points or on Rails vs. ASP.NET in general? What are the big advantages of using Rails?