Workshop: Hands on Hanami
Sean Collins • November 14, 2024 • Chicago, IL • Workshop
Have you had a chance to walk through every layer of a Hanami 2 web application? Here’s your chance. With the release of 2.2 this summer, all the basic building blocks are in place: with a zero-config database layer (built on ROM), and an optional but first-class operations layer that provides a flexible and consistent API for your domain operations.
We’ll write a simple blog application across the entire suite of Hanami libraries. You’ll route a request to an action, which is responsible for parameters and delegating to the rest of your app. They are the gateway from the web into your app. From there we’ll create a record in the database and surface it back up to the action. The action’s final job is to render a view. That view is a ruby class that is responsible for preparing data to render in its simple logicless ERB template.
We’ll end the workshop by dividing into small groups based on interest: extracting core business operations into their own classes, refactoring the view into different parts, or diving into the database by building more complicated queries.
RubyConf 2024