An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Another reason to attend Hal Helms' training class!

February 19, 2009 ·

Event-Driven Programming! You already knew I was a fan of this approach - that's why I wrote Edmund, after all - now Hal is going to cover this style of programming. From his blog post on event-driven programming:
One of the things we'll be working with in the class next week is event driven programming. ... I find this approach has benefits and drawbacks. The drawbacks are inherent in the approach: it's decentralized. ... The benefits, though, are considerable. Adding functionality into a site is much, much simpler. Maintenance is easier. Testing is easier. ...

Tags: coldfusion · edmund

4 responses

  • 1 Michael Long // Feb 19, 2009 at 12:56 PM

    One thing I've not seen much discussion of regrading event-driven systems is the matter of security and integrity control. When passing events into most systems it seems that it's entirely too easy for a user or malicious program to start passing in parameters like action=delete&id=1234.

    Delete is an extreme example, but any system of passing events between pages seems especially susceptible to random events and possible out-of-order execution.

    Any thoughts?
  • 2 Sean Corfield // Feb 19, 2009 at 1:07 PM

    @Michael, I don't see how it's any different to other methods of navigating between pages.

    Besides, that's not really what this blog post is about. You're asking about frameworks with centralized controllers and Hal's talking about decentralized, distributed control - which is also what my Edmund framework is about.
  • 3 Josh Nathanson // Feb 23, 2009 at 9:52 AM

    @Michael -- I don't see what is different about event driven systems in relation to security. You would still need to control access via a session variable of some sort. If the request is not coming from a logged in user then ignore it or do a redirect to a login page.

    If a malicious program is able to log in to your system somehow, then you have a whole other set of problems not related to whether the application is event-driven or not.
  • 4 Zach // Feb 23, 2009 at 10:14 AM

    What is the best way people have found to model event driven systems?

    We've tried several things but just wondering what others in the CF community are doing.