
Hanami – web framework for Ruby - r0muald
http://hanamirb.org/
======
lukeholder
For those unaware, this project was previously called Lotus. I think this is
being upvoted because it was mentioned in the recently popular solnic[0] blog
post.

[0] [http://solnic.eu/2016/05/22/my-time-with-rails-is-
up.html](http://solnic.eu/2016/05/22/my-time-with-rails-is-up.html)

~~~
percept
It was a good name, too.

~~~
Smudge
They got a friendly warning from IBM telling them that they were infringing on
the "Lotus" trademark.

[https://github.com/hanami/hanami/issues/445](https://github.com/hanami/hanami/issues/445)

~~~
aroman
That's not what the link shows. It seems from that thread that IBM never
contacted them, they just changed the name preemptively and out of an
abundance of caution.

~~~
Smudge
The warning may not have been official but it did come from IBM -- the linked
issue's creator is an IBM employee.

------
vinceguidry
I would love to see an intermediate framework between Sinatra and not quite as
huge as Rails. Hanami could fit that bill. But it appears as if it's trying to
compete with Rails, in which case I'll never bother trying to learn it,
because I already have Rails. From what I've seen of the code it looks like
that's the case.

What would be really awesome is a way to 'promote' projects. Currently, if I
start a Sinatra project and I realize later that I needed Rails, I've no
choice but to either re-engineer the entire project, or tough it out with
Sinatra.

If I had an upgrade path, then I could start every project off in Sinatra,
then when I start finding myself wanting more functionality, fluidly migrate
to Hanami or Rails.

~~~
jaequery
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/](http://padrinorb.com/)

~~~
vinceguidry
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.

~~~
cyberferret
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)

~~~
vinceguidry
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.

------
hardwaresofton

        % hanami new bookshelf
        18 files successfully created
    

Description is a little misleading, I was expecting to see something sinatra-
like but found something rails-like. It might be more apt to call it "The
lightest full-featured ruby web MVC framework".

Obviously that doesn't make for a good tagline, maybe: "A full-featured yet
light-weight web framework, for Ruby."

------
cageface
I'm happy to see some new ideas in Ruby frameworks but at this point if I'm
going to go to all the trouble of learning a new framework I'll learn a new
language too. A lot of the problems of Rails (slow, poor concurrency story,
dynamic typing) are Ruby problems not Rails problems.

A few years ago there weren't a lot of great options but now we have Go,
Scala, Clojure, C# on Linux, Elixir, Swift (maybe eventually) etc.

------
andrei_says_
Has anyone been using this? What's your experience? What kind of project?

I am wondering if there are components for common scenarios like
authentication etc?

~~~
gmanley
From my experience it is still pretty alpha quality. I ran into a weird issue
with the inflector library they rolled themselves and had to dig through the
code to figure out what was going on. This was about a month ago, so things
could have changed, but I wouldn't recommend this for production app just yet.
At least one that you have a timeline on.

~~~
jxxcarlson
I've been using hanami for [http://www.scripta.io](http://www.scripta.io),
which is a re-engineering of
[http://www.noteshare.io](http://www.noteshare.io) . I've been very happy with
the transition from rails to hanami, so much so that I now have a second
hanami app facing the world: [http://www.shoobox.io](http://www.shoobox.io).

~~~
andrei_says_
Love your projects and discovered
[http://asciidoctor.org](http://asciidoctor.org) by reading on shoobox --
exactly what I needed!

What came to mind looking at scripta is that you might find it useful to look
at [https://edwardtufte.github.io/tufte-
css/](https://edwardtufte.github.io/tufte-css/)

What do you use for persistency? Sequel?

~~~
jxxcarlson
Thank you very much for your kind words -- and for the link to the Tufte-CSS
site. Very good material there, as you would expect from Tufte. You may also
enjoy this: [http://practicaltypography.com/why-theres-no-e-book-or-
pdf.h...](http://practicaltypography.com/why-theres-no-e-book-or-pdf.html).

I use postgres for persistency -- mostly throgh Hanami's model component,
though I do some parts directly in sequel.

------
snitko
It's not obvious from the website, so I'm curious what problem does it solve?

~~~
lazarus101
>what problem does it solve?

it's not rails.

~~~
jxxcarlson
My (limited)experience is that when a rails app gets too big, it becomes hard
to manage. That was my case, anyway. The architecture of hanami promotes
longterm developer sanity. The fact that views are objects and the existence
of interactors is a real plus. See this old Uncle Bob video re interactors:
[https://www.youtube.com/watch?v=WpkDN78P884](https://www.youtube.com/watch?v=WpkDN78P884)

------
eulji
I'd like to see some high performance ruby implementation for backend stuff
(even if limited to some extent ...) sort of like what RubyMotion is for
iOS/OS X.

I can imagine a lot of stuff that could benefit from this on the other hand I
can see why it has not been done (costs, complexity etc).

Anyway I am sad that RubyMotion is not just as popular as Rails is. That
is...very surprising...

------
unusximmortalis
"The web, with simplicity." Isn't this what every web framework ad is saying
with more or less same words?

