<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://devaniljr.github.io//feed.xml" rel="self" type="application/atom+xml" /><link href="https://devaniljr.github.io//" rel="alternate" type="text/html" /><updated>2026-07-16T15:38:45+00:00</updated><id>https://devaniljr.github.io//feed.xml</id><title type="html">Devanil Júnior</title><subtitle>learning and building in public</subtitle><entry><title type="html">I fell in love with Hanami</title><link href="https://devaniljr.github.io//fell-in-love-with-hanami/" rel="alternate" type="text/html" title="I fell in love with Hanami" /><published>2026-06-14T00:00:00+00:00</published><updated>2026-06-14T00:00:00+00:00</updated><id>https://devaniljr.github.io//fell-in-love-with-hanami</id><content type="html" xml:base="https://devaniljr.github.io//fell-in-love-with-hanami/"><![CDATA[<p>Hanami is a Japanese tradition of watching cherry blossoms drifting from the trees. It is an appropriate name to capture how I felt when I first encountered the Ruby web full-stack framework of the same name.</p>

<p>This is not a technical post. You can check <a href="https://hanakai.org/hanami">their website</a> to see the technical details. What I want here is to share some of the vibes of Hanami and how I felt working with it.</p>

<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmra42a55qp4pejesxaf.gif" alt="Hanami: contemplating the flowers" /></p>

<h2 id="make-your-own-batteries">Make your own batteries</h2>

<p>My first feeling while working with Hanami was about not having everything at my fingertips. Knowing it has far fewer batteries included made me hesitate at the beginning, I confess. But I started wondering: did I really need all of those batteries?</p>

<p>I started to think about all those features that were not really needed in any of my personal projects, but I installed them because I liked the idea of having everything set up from early on.</p>

<p>Hanami doesn’t offer that out of the box. It seems to encourage some independence in this regard, and setting up Sidekiq or making custom mailers turned out to be simpler than I expected (but mailers are coming in the next version anyway).</p>

<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i5tmvguq8hkdnols1cwl.gif" alt="You make your own batteries!" /></p>

<p>Hanami caught my attention because it tackles another problem.</p>

<h2 id="moving-to-a-city-with-good-infrastructure">Moving to a city with good infrastructure</h2>

<p>Keeping a codebase organized has always been a huge challenge for me. Even with a solid mental model, my projects tend to bend into more heterodox paths, and suddenly the underlying structure is gone.</p>

<p>That’s especially concerning in MVC frameworks. It’s like they give a very good infrastructure in the downtown area, but anything far away from this idealized matrix becomes an ‘every man for himself’ situation.</p>

<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2tv9lfljpsba7yvkb79.png" alt="MVC and life outside MVC" /></p>

<p>Hanami brought a different dynamic to my workflow by establishing the structure beforehand. Need queries? I learned to reach for Relation. Registering a third-party lib? Providers are there. Business logic? Operations. And there are many other built-in solutions guiding the way.</p>

<p>It’s like all the roads have already been made, and now we can build our city in peace, knowing that anywhere we go with our code, we will have a Hanami solution to guide us.</p>

<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4iqjax9d274dmvhknscj.png" alt="Hanami is like playing Sim City." /></p>

<h2 id="its-so-light">It’s so light</h2>

<p>This is the part that empowered me the most. Hanami relies on a component system where pieces can be called anywhere as a dependency. I found myself putting everything together like a Lego set. Check out this example below:</p>

<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">module</span> <span class="nn">Bookshelf</span>
  <span class="k">module</span> <span class="nn">Operations</span>
    <span class="k">class</span> <span class="nc">SendWelcomeEmail</span>
      <span class="kp">include</span> <span class="no">Deps</span><span class="p">[</span>
        <span class="s2">"email_client"</span><span class="p">,</span>
        <span class="ss">email_renderer: </span><span class="s2">"renderers.welcome_email"</span>
      <span class="p">]</span>

      <span class="k">def</span> <span class="nf">call</span><span class="p">(</span><span class="nb">name</span><span class="p">:,</span> <span class="n">email_address</span><span class="p">:)</span>
        <span class="n">email_client</span><span class="p">.</span><span class="nf">deliver</span><span class="p">(</span>
          <span class="ss">to: </span><span class="n">email_address</span><span class="p">,</span>
          <span class="ss">subject: </span><span class="s2">"Welcome!"</span><span class="p">,</span>
          <span class="ss">text_body: </span><span class="n">email_renderer</span><span class="p">.</span><span class="nf">render_text</span><span class="p">(</span><span class="ss">name: </span><span class="nb">name</span><span class="p">),</span>
          <span class="ss">html_body: </span><span class="n">email_renderer</span><span class="p">.</span><span class="nf">render_html</span><span class="p">(</span><span class="ss">name: </span><span class="nb">name</span><span class="p">)</span>
        <span class="p">)</span>
      <span class="k">end</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>

<p>This setup gave me a comforting sense of control. Instead of a black box that I had to tiptoe around, the whole system was right there in my hands, allowing me to experiment without fear of breaking hidden magic.</p>

<p>It reminds me a lot of the feeling when I started to like Linux more than Windows.</p>

<h2 id="hanami-deserves-a-chance">Hanami deserves a chance</h2>

<p>Disorganization has always been my biggest enemy in programming. Facing a messy codebase drains my motivation easily. Over time, I learned to accept that pressure inevitably compromises my initial intention of keeping things tidy.</p>

<p>Discovering Hanami felt like getting a tool designed to help get things right this time around. It faces a tough crowd because short-term gains are tempting, and other frameworks excel at that.</p>

<p>But I feel like Hanami is here for the long game. It carries the energy of passionate development, currently maintained by someone who dances “Viva la vida loca” <a href="https://www.youtube.com/watch?v=L35MPfmtJZM">in a talk about Hanami</a>.</p>

<p>Not only that, it is the only framework I know that places right on its homepage, with great prominence, that its goal is to build a diverse and inclusive community. And many people miss that in the Ruby environment.</p>

<p>I will do my part by sharing the cool things I find. I’m not someone with deep technical knowledge, but I have good taste. And Hanami is for those who appreciate fabulous code 💅</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Hanami is a Japanese tradition of watching cherry blossoms drifting from the trees. It is an appropriate name to capture how I felt when I first encountered the Ruby web full-stack framework of the same name.]]></summary></entry></feed>