Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Event Driven Application

Event Driven Application

Presented by Prasetyo Wicaksono (@praswicaksono)

In this talk I want to present Event Driven Application by using mediator pattern. It would help decouple your code but beware there are some cons by using this pattern such as hard to track if your apps grown bigger.

PHP Conference Asia

September 23, 2015
Tweet

More Decks by PHP Conference Asia

Other Decks in Programming

Transcript

  1. BIO @phpconfasia Prasetyo Wicaksono  Head of IT Dept. at

    PT Zion Internasional Niaga  @malangphp organizer  Twitter : @praswicaksono  Github: https://github.com/Atriedes
  2. Event @phpconfasia  event is an action or occurrence recognized

    by software that may be handled by the software. Computer events can be generated or triggered by the system or by the user. Event can be defined as "a significant change in state“ – wikipedia
  3. Hook @phpconfasia  In computer programming, the term hooking covers

    a range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a "hook". - wikipedia
  4. Prioritize Listener @phpconfasia Client Event Mediator 1 – Make sure

    title is upper case 2 - Uppercase Title 3 - Sanitize Body
  5. Notify Only ‘Hooks’ @phpconfasia  Don't change behavior  Only

    notify activity such as logging, sending email, updating cache