Slide 1

Slide 1 text

Event Driven Application @phpconfasia

Slide 2

Slide 2 text

BIO @phpconfasia Prasetyo Wicaksono  Head of IT Dept. at PT Zion Internasional Niaga  @malangphp organizer  Twitter : @praswicaksono  Github: https://github.com/Atriedes

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Mediator Pattern @phpconfasia ATC Tower

Slide 5

Slide 5 text

Architecture @phpconfasia Client

Slide 6

Slide 6 text

Architecture @phpconfasia Client Event

Slide 7

Slide 7 text

Architecture @phpconfasia Client Event Mediator

Slide 8

Slide 8 text

Architecture @phpconfasia Client Event Mediator Listener Listener Listener

Slide 9

Slide 9 text

Mediator Interface @phpconfasia

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Example @phpconfasia

Slide 12

Slide 12 text

Prioritize Listener @phpconfasia Client Event Mediator 1 – Make sure title is upper case 2 - Uppercase Title 3 - Sanitize Body

Slide 13

Slide 13 text

I can’t handle this @phpconfasia

Slide 14

Slide 14 text

Notify Only ‘Hooks’ @phpconfasia  Don't change behavior  Only notify activity such as logging, sending email, updating cache

Slide 15

Slide 15 text

Example @phpconfasia

Slide 16

Slide 16 text

Notify Only ‘Hook’ + Background Process = @phpconfasia

Slide 17

Slide 17 text

@phpconfasia “Most of all, experiment. Make mistakes. Talk about them.” Igor Wiedler

Slide 18

Slide 18 text

Thanks @phpconfasia https://joind.in/15385 @praswicaksono