Depending on what you are building, you may find that a general-purpose language like Rails is a great choice.
However, Hanami’s unique attributes can help you build for specific use cases, such as when you need the following:
- Speed – Today, it’s more of a rule than an exception that your app needs to be fast, and languages and frameworks that can deliver on this tend to have an upper hand. Hanami’s low memory footprint and very defined app structure make it a worthwhile choice for your next app that needs to be as fast as possible, such as an API.
- Simplicity and maintainability – When you use a framework like Rails, you know how fast your codebase can grow depending on what you are building. Even with testing, such large code structures tend to hide bugs and other inefficiencies. As a solo developer or small team, you may not have the resources to properly maintain such an application. Hanami tends to favor breaking functionality down into its smallest possible parts, which means that adding features, refactoring, and bug tracking tends to be easier.
- Security – By default, Hanami apps come with various web security features baked in, including content security policy, X-frame headers, and automatic escaping.
Now that we have a good idea of what the framework is about, let’s get into the fun-stuff and build a simple Hanami 2.0 app.
Leave a Reply