24
Event Chain Reaction: Combining Promoted Events and Commuter Modules

Event Chain Reaction: Combining Promoted Events and Commuter Modules

Embed Size (px)

Citation preview

Page 1: Event Chain Reaction: Combining Promoted Events and Commuter Modules

Event Chain Reaction:

Combining Promoted Events and Commuter

Modules

Page 2: Event Chain Reaction: Combining Promoted Events and Commuter Modules

One of the Greatest Debates in Philosophy…• In 1970 a corporation launched a massive

campaign to find the answer to one of life’s greatest philosophical mysteries.

• Their efforts were extended worldwide and extended into many academic and media institutions.

• Even to this day this conundrum has perplexed the greatest scientific, philosophical, and religious minds…

Page 3: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

Page 4: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

Page 5: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

364 / 252

Page 6: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

411

Page 7: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

144

Page 8: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Licks Does it Take to Get to the Center of a Tootsie Roll Pop?

The World May Never Know!

Page 9: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How Many Clicks Does it Take to Get to the Center of the Script Event Editor?

Let’s do a quick case study…

The World May Never Know!

Page 10: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

Let’s first look at some Script and QuickEvents…

Page 11: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

• Assumptions:– You already have a working understanding of

promoted events.– You already have a working understanding of

commuter modules.– If one or both of the above are true, you are

willing to learn new things after this presentation.

Page 12: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

• Resources:– The X Events by Andrew McAuley -

http://www.sprezzatura.com/senl/senl17.htm– Creating a Custom Event by Don Bakke -

http://www.srpcs.com/dr_knowledgebase.aspx– Programmer’s Reference Manual – Chapter 10 –

Promoted Events– Promoted Events by Kevin Fournier –

http://www.srpcs.com/dr_knowledgebase.aspx

Page 13: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

• Deficiences in Script Events– Requires you to always close the running

window if you need to change the logic.– Creates an entity and repository record for

every event.– Have to be managed in the Script Event Editor

(unless it calls a standard routine to handle the main logic).

Page 14: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

• Deficiences in QuickEvents– Requires you to always close the running

window if you need to change the logic.– Can only work on a post-system event handler

basis.– Cannot handle complex logic (unless it calls a

standard routine to handle the main logic.)

Page 15: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

Now let’s look at a Commuter Module…

Page 16: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

Next we’ll look at Promoted Events…

Page 17: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

Finally, let’s see what can be doneby combining Promoted Events

andCommuter Modules…

Page 18: Event Chain Reaction: Combining Promoted Events and Commuter Modules

The Benefits of Promoted Events and Commuter Modules

• Virtually all events can be trapped automatically.

• Inheritance flow which gives us the ability to custom manage the entire event chain.

• Events can be created on-the-fly without having to use the EventDesigner.

• Everything managed through the System Editor.

Page 19: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How It All Works – Promoted Events Revisited• Standard Event Handler Chain:

Event SCRIPT EVENT HANDLER

SYSTEM EVENT HANDLER

QUICK EVENT HANDLER Done

Return 1

Return 1

Return 0

Page 20: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How It All Works – Promoted Events Revisited• Fully Detailed Event Handler Chain:

GEN

ER

ICEVEN

TCO

NTR

OL-

TYPE

Event CONTROL SPECIFIC EVENT HANDLERScript Event Handler

Done

Return 0

APPLICATION EVENT HANDLERPromoted Event Handler

INHERITED APPLICATION EVENT HANDLERPromoted Event Handler

SYSPROG EVENT HANDLERSystem Event Handler

APPLICATION EVENT HANDLERPromoted Event Handler

INHERITED APPLICATION EVENT HANDLERPromoted Event Handler

SYSPROG EVENT HANDLERSystem Event Handler

APPLICATION EVENT HANDLERPromoted Event Handler

INHERITED APPLICATION EVENT HANDLERPromoted Event Handler

SYSPROG EVENT HANDLERSystem Event Handler

QUICK EVENT HANDLER

Page 21: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How It All Works – Promoted Events Revisited• Points of Interest

– Script events are always first in the chain.

– QuickEvents are always last in the chain.

– System Event Handlers are technically Promoted Events written in SYSPROG. (Or…Promoted Events are technically System Event Handlers written at the local application level).

Page 22: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How It All Works – Promoted Events Revisited• Conclusions

– Promoted Events give us a way to process events prior to the System Event Handler.

– By creating a generic Promoted Event in the local application we can effectively create a promoted post-System Event Handler for all events (even custom ones).

– The only promoted pre-System Event Handlers we need are for events that truly need pre and post handling: e.g. READ, WRITE, DELETE, CLOSE, and CLEAR.

Page 23: Event Chain Reaction: Combining Promoted Events and Commuter Modules

How It All Works – Putting it All Together• Set up Promoted Event shells that call a special “commuter

module”. Here are some examples…

• Design your Promoted Event commuter module to call your window commuter modules first, your individual Promoted Event commuters next, and then the System Event Handler. Here is a model that we use…

• Here is what a typical window commuter module looks like…

• Here is what a typical promoted event commuter module looks like…

• Notice how the event flow is controlled at every step.

Page 24: Event Chain Reaction: Combining Promoted Events and Commuter Modules

Thank You

Any Questions?