sub-objects don’t always map to tables
buncho mixins (authlogic)
composition doesn’t cover all bases
ordered actions as objects
composed object dependencies
Alternate, accurate title
Middleware, as envisioned by pep 333, for general purpose class de-bloating
list of things done when creating a vm for the first time
hard to read/understand method dependencies
hard to test (too much stubing)
we recognized this as a general issue before the project
initial solution: object compostion with a common interface
iterate over actions call execute
originally defined dependencies as actions composed in actions
prepare all, execute! all, cleanup all
actions do not participate in the composition ordering
sample :up stack (create the vm)
composed through a common interface
more general solution (call is invoked by “parent” middleware)
type: ‘POST’,
url: “/foo”,
success: fireTheMissles,
error: fireTheMissles
});
ignore machinary due to time constraint
env can turn into dumping ground
in Rack meant to be request info
see warden/devise object reference
no guarantees on middleware dependencies
middleware X must run before Z, but Z must come after Y
We’re ruby devs, we just fly by the seat of our pants anyway right!!??!
not too difficult to solve, could be applied to Rack