Skeletron
Skeletron is library to aid the building of Ruby applications on Clean architecture.
What is Clean architecture?
Robert Martin describes the architecture in his "Architecture: The Lost Years" lecture:
https://www.youtube.com/watch?v=WpkDN78P884
This architecture aims to address some common problems in modern Ruby applications:
- Web-layer coupling with application-layer logic.
- Application-layer coupling with database implementation.
- Complicated and expensive unit testing that results from this coupling.
And to this end, emphasizes a few key points:
- HTTP/Web/Rails is a delivery mechanism
- Database is a detail; not any integral part of the intent of the applicaiton itself.
- A good architecture allows major decisions to be deferred: e.g. choosing a database.
- A good architecture maximizes the number of decisions NOT made.
- So you can decide those later and plug them in to fit business needs or respond to changes in business logic.
Key components
-
Entities
Generic business objects & rules, agnostic to presentation or storage mechanisms (e.g. Order, Customer).
-
Interactors
Application specific business rules; Manipulates the relevant data from the Request Model and interacts with the Entities.
-
Boundaries & Gateways
Protocols or Interfaces for defining .
-
Models
Dumb data structures representing input or output, without methods. e.g. Request Model, Response Model, View Model.
-
Controllers
Convert the stuff submitted by the delivery mechanism into a delivery agnostic Request Model.
-
Presenters
Turns the delivery agnostic Response Model into a prepared “viewified” data structure ready for easy manipulation by the view.
Mission statement
Skeletron aims to:
- Provide modules to aid implemention of Clean architecture: They are optional and composable, so you can implement only what you want or need.
- Favor simplicity over convention: In order to promote extensibility and modularity, to give the author maximum freedom and control over their application.
It is NOT:
- An application framework e.g. like Rails. It does not provide an end-to-end application design solution. Your design decisions are yours to own.
- "Opinionated": it's here to aid your architecture choices, not constrain.
- A systems design solution: focus is on application design, not systems.
Quickstart
TODO
Available features
TODO
Contributing
TODO