An Architect's View

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

An Architect's View

Model-Glue Sample Application

April 2, 2005 · 3 Comments

The sample application which I'm using to illustrate my Fusebox and Mach II framework comparison talk now has a Model-Glue variant! That's seven variants altogether:
  • Traditional Fusebox
  • MVC Fusebox
  • OO Fusebox
  • Simple Mach II
  • Refactored Mach II using design patterns
  • Fusebox + Tartan
  • Model-Glue
I'll be making the code available for download after the CFUNITED conference. I still need to add some readme files and maybe tidy up some of the code. So what was it like building a Model-Glue application? Not bad once I got over a few "Mach II-isms" - mostly XML syntax problems caused by a lack of familiarity with Model-Glue. I did find one big hole in Model-Glue tho': there was no way to declaratively pass arguments to views, such as you typically do with Fusebox (XFAs - eXit FuseActions) and I've started doing with Mach II as well. I mentioned this to Joe and he seemed to think it was a good idea so I modified a couple of core files and sent the edits to him. Expect to see view arguments in a future release of the framework! I do like the clean, consistent approach of controllers listening to messages and event handlers broadcasting messages and all communication done via the event object (which becomes the view state). Where I would notify a listener in Mach II to get me some data (or invoke a component in Fusebox), I broadcast a message instead and name it "needXYZ" to indicate the view needs XYZ data. The relevant controller listens for needXYZ and usually calls getXYZ. It makes the XML read quite nicely. Thoughts?

Tags: coldfusion · modelglue

3 responses so far ↓

  • 1 Joe Rinehart // Apr 3, 2005 at 3:26 PM

    Hey Sean,

    Thanks for the interest in the framework! The big hole is now patched, thanks to the bit of code you sent over. A new version is available at http://www.model-glue.com/downloadmg.cfm .

    It'd be interesting to see how easily you could do a Model-Glue + Tartan variant - I've been working on an M-G app over the past week that uses Tartan, and am liking the combo.

    -Joe
  • 2 Vishnuprasad Ramakrishnan // Feb 14, 2007 at 6:21 AM

    HI Sean,

    Thanks for providing the Sample application on the framework.

    what are the steps that needs to be followed if i want to run the sample application you provided with the latest model-glue core file. when i replace the latest model-glue core file i got an error.
  • 3 Sean Corfield // Feb 14, 2007 at 2:39 PM

    @Vishnu, since you don't provide the error, it's impossible to say :)

    Model-Glue 1.x apps should run just fine with Model-Glue 2.x but you probably need to make some configuration changes (due to Model-Glue settings moving to a separate file).

    You should join the Model-Glue mailing list and ask your question there - and provide exact details of the error.

Leave a Comment

Leave this field empty: