ADR In Action

Ian Littman (@iansltx)

 

http://ian.im/adr

Who?

  • Developer at Access Empowerment
    • parkingmobility.com
    • Mostly back-end
  • Minor contributor to Aura 2 libs
  • iansltx everywhere

Why?

People keep asking for non-trivial real-world examples of the Action Domain Responder pattern being used.

Because.

I'm using ADR in a handful of apps, with both JSON and HTML (and CSV!) response types.

Warnings

  • In-progress code (some places are optimized for development speed rather than correctness)
  • Procedural bootstrap
  • Ugly templates
  • Source is not public on GitHub

Fun Ops Stuff

  • PHP on HHVM
  • CentOS / Amazon Linux
  • Namespace/autoload most of the things

Implementation Patterns

  • Dependency Injection
  • Compose via Traits (vs. Constructor of Doom)
  • Extract via Traits (vs. controller-level methods)
<?= $code ?>

Questions?

Slides: http://ian.im/adr

Unrelated: https://github.com/iansltx/phpnews

@iansltx

ADR In Action

By Ian Littman

ADR In Action

  • 1,595