# Getting started with Hanami
My mission here is to contribute with the community to help new people who wants to learn about this amazing framework - Hanami.
But how it is going to work ?
Short and easygoing tutorials showing with examples about Hanami and following the next tutorials we will see how to test our application and build a simple REST API.
# About Hanami
Besides Hanami be a lightweight and fast framework one of the points that most call attention is the Clean Architecture concept where shows to us that the framework is not our application as Robert Martin said before.
Hanami arquitecture design offer to us the use of Container, in each Container we have our application independently of the framework. This means that we can grab our code and put it into a Rails framework for example.
Hanami is a MVC Framework ?
The MVC's frameworks idea is to build one structure following the Model -> Controller -> View. Hanami follows the Model | Controller -> View -> Template. The result is an application more uncopled, following SOLID principles, and much cleaner.
- Important links.
Robert Martin - Clean Arquitecture https://www.youtube.com/watch?v=WpkDN78P884
Clean Arquitecture https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html
SOLID Principles http://practicingruby.com/articles/solid-design-principles
# How to install Hanami?
- Step 1: Installing the Hanami gem.
$ gem install hanami
$ hanami new "myapp" --test=rspec
Obs. By default Hanami sets Minitest as testing framework.
This will create a hanami application called myapp in a myapp directory and install the gem dependencies that are already mentioned in Gemfile using bundle install.
To switch to this directory, use the cd command, which stands for change directory.
$ cd my_app $ bundle install
The myapp directory has a number of auto-generated files and folders that make up the structure of a Hanami application. Following is a list of files and folders that are created by default:
**lib** contains our business logic and domain model, including entities and repositories.
- Important links.
Hanami gem https://github.com/hanami/hanami
Hanami official Getting Started http://hanamirb.org/guides/getting-started/
# How to start the server?
$ bundle exec hanami server