Recently I received a coupon invitation in the mail for Kohls, a department store in the area. The invitation talk about how I was an MVC and because of that I was eligible for special sale prices. Immediately I started thinking "how am I the Model-View-Controller design pattern?" but then it dawned on me that what they were getting at was that I am a "Most Valued Customer."
Have I been programming too much lately? No, I don't think so.. but I've been absorbed in a project at work using the MVC architecture, and I just happened to be thinking about it at the time.
Typically when implementing MVC with CFMX the model is created as a CFC. This gives us the wonderful benefit of being able to use the same model for both HTML pages AND Flash RIA's. This is especially handy because I can develop an HTML interface to test out the model, and when I'm pleased everything is working correctly I can switch right over to Flash and develop a killer UI without having to worry about any of the data access - it's already been taken care of.
An additional benefit is using the "roles" attribute of cffunction. As log as the browser playing the .swf file is authenticated, the Flash app has the same authorized credentials. This protects the .cfc from being called directly from the outside world (via get/post), and gives me added security that I almost don't even need to think about. Because "access=remote" needs to be specified to use a .cfc with Flash Remoting, you open up a security vulnerability depending on what the cfc does. The .cfc acts like a webservice and can be invoked directly in the URL string. However, by using roles, we can guarantee that only authorized people can access the methods. Sweet!
Perhaps in the future I'll try and write up a tutorial of using MVC with CFMX, HTML, and Flash, but for now it's just another bullet of my giant list of things I want to accomplish in my spare time. If I get enough interest (i.e. comments) perhaps I'll escalate the tutorial to a higher priority. You decide!

2 Comments
sounds like a useful tute.
Posted by: malk | May 4, 2004 8:22 AM
Yep, I too would love to see more on CFMX MVC. The benorama tute is great but its the only thing out there that I can find. I would love to see a little community develop around this.
Posted by: velum | August 30, 2004 11:16 AM