a.k.a. Uncle Bob
"Don't call us, we'll call you"
High-level modules should not depend on low-level modules. Both should depend on abstractions.
Abstractions should not depend on details. Details should depend on abstractions.
"Converts data from the format most convenient for the use cases and entities, to the format most convenient for some external agency"
➜ tree -L 1
.
├── assets
├── channels
├── controllers
├── helpers
├── jobs
├── mailers
├── models
└── views
8 directories, 0 files➜ tree -L 2
.
├── assets
│ ├── config
│ ├── images
│ ├── javascripts
│ └── stylesheets
├── channels
│ └── application_cable
├── controllers
│ ├── application_controller.rb
│ ├── concerns
│ ├── todo_items_controller.rb
│ └── todo_lists_controller.rb
├── helpers
│ ├── application_helper.rb
│ ├── todo_items_helper.rb
│ └── todo_lists_helper.rb
├── jobs
│ └── application_job.rb
├── mailers
│ └── application_mailer.rb
├── models
│ ├── application_record.rb
│ ├── concerns
│ ├── todo_item.rb
│ └── todo_list.rb
└── views
├── layouts
├── todo_items
└── todo_lists
18 directories, 11 files➜ tree -L 3
.
├── assets
│ ├── config
│ │ └── manifest.js
│ ├── images
│ ├── javascripts
│ │ ├── application.js
│ │ ├── cable.js
│ │ ├── channels
│ │ ├── todo_items.coffee
│ │ └── todo_lists.coffee
│ └── stylesheets
│ ├── application.scss
│ ├── scaffolds.scss
│ ├── todo_items.scss
│ └── todo_lists.scss
├── channels
│ └── application_cable
│ ├── channel.rb
│ └── connection.rb
├── controllers
│ ├── application_controller.rb
│ ├── concerns
│ ├── todo_items_controller.rb
│ └── todo_lists_controller.rb
├── helpers
│ ├── application_helper.rb
│ ├── todo_items_helper.rb
│ └── todo_lists_helper.rb├── jobs
│ └── application_job.rb
├── mailers
│ └── application_mailer.rb
├── models
│ ├── application_record.rb
│ ├── concerns
│ ├── todo_item.rb
│ └── todo_list.rb
└── views
├── layouts
│ ├── application.html.erb
│ ├── mailer.html.erb
│ └── mailer.text.erb
├── todo_items
│ ├── _form.html.erb
│ └── _todo_item.html.erb
└── todo_lists
├── _form.html.erb
├── _todo_list.json.jbuilder
├── edit.html.erb
├── index.html.erb
├── index.json.jbuilder
├── new.html.erb
├── show.html.erb
└── show.json.jbuilder
19 directories, 35 files