News for hackers. Stuff that matters.
Re:Hanami – web framework for Ruby by jaequery on Monday May 23, 2016 @06:20PM (#11757503)
Have you tried Padrino? Of all the frameworks I've tried in the past 10 years, this is as good as it comes. Love the Sinatra + Sequel + erb setup as it is simple and straightforward. Fast and elegant without the Rails lockdown architecture. http://padrinorb.com/
Re:Hanami – web framework for Ruby by vinceguidry on Monday May 23, 2016 @09:03PM (#11758240)
Hmm, that's a good suggestion, and to be honest, I knew something like that already existed. It's fine to migrate from Sinatra to Padrino, Padrino is built on top of Sinatra, but what I really want is a path to migrate to Rails.

I suppose what I could do is build according to a convention in Padrino that I know would work well in Rails, then when the time comes, write some scripts to transform the codebase. Probably a job for Rake.

Really though, I can't see much of a benefit over just starting with Rails. I might try it once just to confirm.

Re:Hanami – web framework for Ruby by cyberferret on Monday May 23, 2016 @10:43PM (#11758652)
No reason why you can't just stick with Padrino for full scale development. I have an app with over 22,000 lines of Ruby and HAML with about 80 database objects all written in Padrino and it runs beautifully with around 150 users at the moment... (www.hrpartner.io)
Re:Hanami – web framework for Ruby by vinceguidry on Monday May 23, 2016 @10:54PM (#11758686)
I have no doubt that you can build and maintain large websites with Padrino. But I already know Rails.

A new framework would have to do something for me that both Rails and Sinatra won't.

Ah well, I don't think there actually is such a use case. I thought maybe because I once started a project with Sinatra that I later wished I'd built with Rails.

Really it seems to boil down to what the application is supposed to be doing. If it's primarily something else that just maybe speaks HTTP, like a microservice, then Sinatra is the more flexible choice, you can encapsulate the web logic and build your own abstractions as you see fit.

If it's primarily a website, then you'll want a full-fledged batteries-included framework.

Projects don't start as a microservice and evolve into a website. The one project I started with Sinatra should have been Rails from the beginning, as it was really a website. I just used Sinatra because at the time I knew it better.