|
Event-Driven Model Framework?
By Sean Corfield
Expert Author
Article Date: 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?"
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.
Comments
About the Author: Sean is currently Senior Computer Scientist and Team Lead in the
Hosted Services group at Adobe Systems Incorporated. He has worked in
the IT industry for nearly twenty-five years, first in database
systems and compilers (serving eight years on the ANSI C++ Standards
Committee), then in mobile telecoms, and finally in web development.
Sean is a staunch advocate of software standards and best practices,
and is a well-known and respected speaker on these subjects. Sean has
championed and contributed to a number of ColdFusion frameworks, and
is a frequent publisher on his blog, http://corfield.org/
|
|