0

I see some old questions here and here

It is now 2014, and I also have a more specific question.

Another company has built a REST API. Now I want to build a web application that only needs controller and view. I was originally planning to build this with just PHP without the bloat of an MVC framework. Then I was thinking maybe doing it with ASP.NET with just simple code behind and .aspx approach (the non-MVC way). I was even considering using only JQuery and HTML. The reason I haven't really considered a full MVC framework is because I'm simply just sending data, getting data and printing data. I don't have to really implement business logic.

Right now I'm considering doing this in just the ruby language because it seems like such a clean and minimalist language. But is there any advantage to including the entire rails framework? If so, what features are worth considering in the rails framework for my purposes?

EDIT It seems I got a close vote for opinion based. But I'm not looking for opinions. I'm looking for the advantages of rails framework for my purposes. In other words, what problems can the rails framework solve significantly faster than just using ruby+curl+print_line().

As example on how to answer the question objectively, you can state things like:

Scenario 1:

  • Rails makes CURL calls and displays in views like so.
  • Pure ruby make calls and outputs views like so.

Result: As can be seen, rails requires X fewer lines of code than pure ruby as it pertains to the OP's original question

Scenario 2:

  • Rails handles page caching like so.

  • Pure ruby page caching will need to be handled like so.

Result: As can be seen, rails require X fewer lines of code than pure ruby as it pertains to the OP's original question

By listing the problems the original rails authors hoped to achieve and solutions they hoped for us to utilize in the situation defined in the OP's original question, we can see quantitatively the advantages Rails has over pure ruby.

Community
  • 1
  • 1
John
  • 32,403
  • 80
  • 251
  • 422
  • The reason you're getting close votes is because StackOverflow is for questions that can be answered with code. If you ask how to do something, and people can give you a concrete code-based answer, it belongs here. It's not that your question is bad, this just isn't the right forum for it. – Jaime Bellmyer Oct 04 '14 at 15:59
  • Thanks for the comment, I updated my question to try to encourage people to supply answers in code. – John Oct 04 '14 at 17:15

1 Answers1

1

Rails is pretty big, and in my opinion you don't need the bloat of Rails for something this simple. Even though it's not an MVC framework, I would recommend something like Sinatra, especially since it doesn't force you to use a database at all. Sinatra is a very simple framework, and it's most useful when you just want a way to easily set up HTTP routing with basic view support. However, note that it is possible to create a model that doesn't use ActiveRecord with Rails.

Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82