Suitability of Rails, Padrino, and Sinatra for Building a Prepaid Mobile Service

Suitability of Rails, Padrino, and Sinatra for building a prepaid mobile service

I am one of the creators of Padrino but I have also worked extensively with Rails and Sinatra. Probably not what you want to hear but no matter what you pick, you will be able to get this project finished fairly easily. I can't say picking one will impact you much over picking any other in the grand scheme.

I am obviously a proponent of the modular and lightweight nature of Rack and Sinatra. Between Rack, Rack Middlewares, Sinatra and extensions, you can get anything done just as easily as in Rails if you are willing to understand the tools.

I would argue that Sinatra and Padrino have a lower learning curve to Ruby newcomers. This is because they promote "take what you need" and "gradual complexity" far better than the more "take it all at once" Rails approach but on the other hand Rails has much more documentation, blogs, support, etc. So the trade offs are clear. Sinatra and Padrino are also much "faster" and "lighter" in terms of memory footprint, requests per second, cpu usage, etc but Rails is fast enough for most situations and the application server is rarely the bottleneck anyways.

All that said, I will try to give you a more direct opinion. If you are doing nothing but a service API (which it sounds like here), I would recommend using Sinatra, Padrino or even another project of ours Renee over Rails. Rails is overkill for a lightweight service API by most measures.

Narrowing it down further, Padrino is Sinatra so you don't have to choose between them. You can start with Sinatra and include standalone modules from Padrino, or use a full-stack Padrino application which is still Sinatra under the hood with a very minimal performance penalty for access to a lot of powerful features (i18n, logger, admin panel, caching, generators, form helpers, mailer, etc). Keep in mind these are all "take them only if you need them" modular extensions.

I would recommend checking out our Padrino Getting Started guide for a place to start exploring Sinatra and Padrino. Our Padrino guides and documentation strive to be thorough. That said, the "safe" bet is Rails since it has a lot more usage, it is more mature, has more contributors and a lot more documentation / googleability. Good luck, hope this was helpful.

Sinatra suitability for building a helpdesk system

it's a personal decision. You could do it in either one, it just depends if you prefer Sinatra (which is more lightweight and concise) or Rails (more monolithic and comprehensive). If you're a beginner, I recommend trying Sinatra first because it will be simpler to understand. Also, nearly every skill you learn with Sinatra will be directly applicable to Rails. Sinatra is like rails lite. By the way, unless you're building this in order to learn a web framework, it might be worth searching for a open-source project you can use instead of having to make your own app.

Rails or Sinatra as a web framework for a NoSQL and DDD project?

It sounds like Sinatra is your best bet.

Some of the concepts you've described are not, traditionally, out-of-the-box so to speak for a Rails application - and configuring multiple NoSQL databases with datamapper will give you some headaches.

With Sinatra, you get the best of both worlds. It's a domain specific language, not a framework - so you can customize it exactly the way you need it. Whilst it will take some work to setup, having complete control over the framework your application uses is very satisfying. Build it from the ground up.

  • Rails or Sinatra?
  • Datamapper for Sinatra (can be easily adapted to use NoSQL)
  • Check out an example MVC I built with Sinatra

Don't get me wrong, I love Rails, but the moment I have to start playing around with it's internals, you're better off just building it yourself with Sinatra.

Where to put Padrino controller files in standalone Sinatra application?

You don't quite need to use the padrino routing to achieve the idea of controllers in Sinatra. In your main .rb file for your Sinatra app you can do:

Dir.glob("controllers/*.rb").each { |r| require_relative r }

Place your "controllers" into a controllers directory and the above will require_relative all of them for you. The code all gets lumped into the main ruby file eventually but you gain the ability to logically separate the code.

Adding an ORM to an existing padrino application

Open /project-name/.components with your editor and add

:orm: activerecord

User management using sinatra

are you able to use Padrino? It's got built-in admin with every app you create. Watch the video.

Which is better? Single-page vs multi-page simple Sinatra service

So, if you want to provide a RESTful API as well along with the web application, it is good idea to have tow different routes.

If you are planning to have just a web UI, it depends on how much control you want to give to the end-user.

Nothing is wrong with either of the approach. It depends on how much ease you can provide.



Related Topics



Leave a reply



Submit