Files
exercises-in-programming-style/10-hollywood
Bruce Adams 5749c2c50f Enhance testing: run all executables
Add a #! line at the beginning of each of the existing Python programs
and change these files to be executable. This sets the stage for having
the test script blindly run anything that is executable, adding support
for testing many programming languages.
2013-09-24 22:09:30 -04:00
..
2013-09-22 12:00:28 -07:00
2013-09-24 22:09:30 -04:00

Style #10

Constraints:

  • Larger problem is decomposed into entities using some form of abstraction (objects, modules or similar)

  • The entities are never called on directly for actions

  • The entities provide interfaces for other entities to be able to register callbacks

  • At certain points of the computation, the entities call on the other entities that have registered for callbacks

Possible names:

  • Hollywood agent: "don't call us, we'll call you"
  • Inversion of control
  • Callback heaven/hell