Cf.Objective() Session Review: Head First Mach-II

 
Mar 20, 2006
By Clark Valberg

Matt Woodward and Peter Farrell blessed the cf.Objective() audience with a fun and informative introduction to the MACH II framework.

The two encouraged audience members to ask questions as they went along -- rewarding them for their bravery with bouncy balls, chocolate coins, and perhaps the most coveted token, a daffy duck PEZ dispenser.

Like most framework presentations, the discussion quickly moved into a general overview of Object Oriented Programming (OOP) and Model-View-Controller (MVC). Some real-world examples of why frameworks matter got the attendees heads moving in the "oh-yeah" direction.

In an effort to uncover the (not-so-secret) secret meaning of the "II" in MACH-II (Implicit Invocation), Matt and Peter explained how, although painfully cool sounding, implicit invocation is really nothing new. Nearly all major OO systems employ the use of II as a design strategy. Implicit invocation occurs when, instead of having a component directly call a method inside another component, the calling component simply "announces an event" (such as "click" or "load"). Those methods that have "registered" for that event are then called. Thus, the event "implicitly" causes the invocation of the method. In MACH-II, this cross-referencing between events and methods is configured using a straightforward XML file that's as easy to use as the day is cold (in Minnesota, anyway).

They stressed how the proper use of MACH-II relied on following the rules of OO and respecting two of its most important tenets, "high cohesion" and "loose coupling." High cohesion is about building components that "do one thing and do it well." The cohesion of a component is determined by how conceptually well-related its methods are. Loose coupling ensures that each component doesn't overly rely on the rest of the system. This practice makes it possible for us forward-thinking developers to reuse that component in a completely unrelated project, thereby leveraging our hard work toward future billable hours. Were our component not loosely coupled, we would likely be forced to go through it line by line and rewrite all the code that related to the system it was originally built for.

The two went on to discuss how the event-driven nature of MACH-II provides an easily maintainable layer for accessing the application's functionality. Overall, the talk was informative, well-paced, and the two didn't slow things down by digging too deeply into the framework's 32 core files. Some practical examples brought the whole thing together and made it all make sense.

Entertaining slides and a friendly tag-team approach were the hallmarks of this presentation that offered a valuable introduction for those either unfamiliar or just getting started with MACH-II.

Resources:

Matt Woodward: http://www.mattwoodward.com/blog/

Peter Farrell: blog.maestropublishing.com/

Mach-II: http://www.mach-ii.com
Clark Valberg is a web systems architect specializing in software architecture and client needs analysis. He runs Epicenter Consulting in Albany, NY. Epicenter Consulting delivers value to clients by developing creative solutions that cater to what businesses really need.
Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting