0

Mach-II concepts

ColdFusion
If you are learning how to build an application using the Mach-II framework, Sean Corfield has a really great collection of info. (It isn't new, but it is new to me) See Corfield's stuff here http://www.corfield.org/index.cfm/event/machii.concepts A couple concepts that I found enlightening were:
Passing Data excerpt:
"The next thing to understand is how to use resultKey and contentKey to pass data out of the model (resultKey) and out of the views (contentKey) so that it is available for the controller to pass to other parts of the model or other views. When Mach II invokes a listener, or more precisely a method on a listener component, in response to an event, it can store the result of the method call in a resultKey variable. This is typically a request scope variable that is then available to views (or subsequent listener invocations for this request using the command to move the request variable into the event object)."
Lifecycle excerpt:
"The important thing to bear in mind here is that Listener CFC instances are created at this point and cached in application scope. That means that if your listeners are stateful, i.e., they store instance data in variables or this scope, then that data will be shared across all sessions and requests because it will be stored in application scope."


More good sources of info on Mach-II:
Anatomy of a Mach-II application Mach-II Development Guide
tags:
ColdFusion

Search