Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • we could have an explicit interface, e.g. Lister, to statically type the implementations but because of duck-typing this is optional
  • we could use a chain tree instead of a list, e.g. if (animal.hasBackbone()) delegate to VertebrateHandler else delegate to InvertebrateHandler
  • we could always pass down the chain even if we processed a request
  • we could decide at some point to not respond and not pass down the chain
  • we could use Groovy's meta-programming capabilities to pass unknown methods down the chain