This is the project where initial ideas behind dry-system, dry-view and dry-transaction have been tested out. Eventually, this repo was moved to dry-rb/dry-web and dry-rb/dry-web-roda was extracted from it to provide Roda support. I've re-pushed this repo for sentimental/historical reasons.
Rodakase is a lightweight web stack on top of Roda which gives you a foundation for building robust web applications while decoupling your application code from the framework.
There are a couple of core concepts in Rodakase which makes it stand out from the crowd:
- Container-based architecture where your application dependencies are accessible through a simple IoC container
- Promotes simple, side-effect-less, functional objects with a built-in auto-injection mechanism making it trivial to compose objects
- Roda routing is decoupled from core application logic and focuses purely on http-related concerns (status codes, session, cookies etc.)
- Rendering is decoupled too, roda routing simply gets response body from your objects
- Request processing and response construction in functional style as a series of simple "function" calls
- Extreme focus on proper code organization and reusability, functionality of your application should be easily accessible using clear APIs
- Uses ROM by default for persistence
Rodakase says NO to the following concepts:
- mutable global state
- hot-code reloading in dev mode leading to additional complexity, nasty gotchas and silly constraints with regards to code organization
- implicit dependency handling through magical const-loading mechanisms
- tight coupling between web application logic and core domain logic
- tight coupling between persistence logic and core domain logic
A sample rodakase-based web app is right here.
Rodakase is based on a bunch of awesome libraries:
- transflow (later replaced by dry-transaction)
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install rodakase
To run the specs make sure the dummy app uses proper db configuration
Also you need to run the migrations, do following:
$ cd spec/dummy $ bundle install $ rake db:migrate
After that you can run the specs from rodakase root:
$ bundle exec rspec
Bug reports and pull requests are welcome on GitHub at https://github.com/solnic/rodakase.