Event-Driven Model Framework?

By: Sean Corfield | 2007-10-31

As folks start adopting more AJAX and Flex for their applications, I see a lot of questions about "how to use <insert favorite HTML framework> to handle AJAX/Flex calls?"

Taking the Web into our own hands, one computer at a time

This is based on two things (in my opinion - putting on my flame-retardant suit)...

    * A fairly fundamental misunderstanding about how AJAX/Flex work

    * An unnatural attachment to one and only one tool of choice
I'm not going to address the first issue beyond referring people to this excellent blog post by Brian Kotek about data requests vs content requests (again - I blogged Brian's post back in July).

The second issue is an interesting one for me.

The reason why folks want to continue to use XYZ framework for AJAX/Flex that they already use for HTML applications is that they've gotten used to the whole MVC pattern and the organizational benefits it brings to their applications.

They've also gotten used to the event model (in Mach-II, Model-Glue and ColdBox at least) and they like wiring together their control logic in this way.

Of course, the bottom line is that those frameworks are really designed for creating HTML applications and, at a stretch, XML data - but what AJAX/Flex really need is to talk to CFCs, passing data in and getting data back.

This brings me to a question: would people be interested in a framework intended to support AJAX/Flex data requests that implements an event-based model like Mach-II, Model-Glue and ColdBox?

If so, what would you want to see in such a framework?

This framework could sit between those HTML MVC frameworks and your business model (and allow for a much simplified controller layer) as well as exposing a remote API for AJAX/Flex.


About the Author: Sean is currently Chief Technology Officer for Railo Technologies US. He has worked in IT for over twenty five years, starting out writing database systems and compilers then moving into mobile telecoms and finally into web development in 1997. Along the way, he worked on the ISO and ANSI C++ Standards committees for eight years and is a staunch advocate of software standards and best practice. Sean has championed and contributed to a number of CFML frameworks and was lead developer on Fusebox for two years.