Download
Latest Stable Version
Latest Development Version
Latest Google Group Topics
- "index.cfm" appearing as event arg
- sessions and application.cfc
- Mach-II 1.6 Memory Footprint
- Assembling view-pages on the fly
Latest Team Mach-II Posts
Quick Facts
- Object-Oriented, MVC Framework for ColdFusion
- Open source – Apache 2.0 license
- Compatible with Adobe ColdFusion 6.1+ and New Atlanta Blue Dragon 7+
- Driving enterprise-level ColdFusion applications since 2003
Mach-II Conceptual Overview
Mach-II is an extremely full-featured framework that is highly extensible through the use of filters, plugins, and modules. Mach-II is based on two main software architecture principles:
Event-Driven
In a Mach-II application, events are announced either programmatically or based on user actions, and event announcements drive the behavior of the application. The details of what occurs in an event is configured in Mach-II's XML configuration file, which allows for easy, flexible development and maintenance.
Implicit Invocation
In a Mach-II application, procedures and methods are not invoked directly, but rather are invoked implicitly as the result of an event announcement and any related notifications to Mach-II listeners. This concept is also referred to as the Hollywood Principle, which is a reference to the cliche Hollywood phrase, "don't call me, I'll call you." This concept leads to application components that are highly cohesive and loosely coupled, which makes applications easier to test, debug, and maintain.
General Framework Features
- XML Configuration Files provide an easy-to-reference roadmap for your entire application. Mach-II allows for the use of multiple XML configuration files for easier maintenance through the use of XML includes.
- Developer Configured Listeners serve as Mach-II's powerful controller layer in your applications. Listeners allow for maximum flexibility in controlling application flow, and help provide a distinct separation between the controller and the model layers in your applications.
- Highly Extensible Architecture through filters, plugins, and modules, which allows developers to easily add, remove, and alter functionality in their Mach-II applications. Read more about these features below.
Filters
Filters enable per-event flow control in Mach-II applications, and are easily added to Mach-II events through a single line in the XML configuration file. A simple example would be the addition of security or logging to a specific Mach-II event. By developing a filter and adding this filter to the event, this additional functionality can be added to or removed from the event without touching the business objects involved with the event.
Plugins
Plugins are similar to filters, but plugins execute on every event in a Mach-II application, and plugins also offer much more granular control through access to numerous plugin points during the course of event execution.
Modules
Modules allow for entire sub-applications, even completely independent or stand-alone applications, to be added to an existing Mach-II application. When a module is added to a Mach-II application this creates a parent-child relationship between the base application and the module, and functionality within the module can be overridden by the base Mach-II application. For example, if a blog application is used as a module in Mach-II, the authentication functionality of the parent application can override the authentication in the blog application.
For example, the blog section of this website is the open source MachBlog project. This was implemented using a module and a a custom skin. This was easily accomplished by not changing any core MachBlog files – including the original MachBlog XML configuration file. Any customizations to MachBlog was done through overriding the default behavior with the base application configuration.
URL Management
Mach-II offers basic URL management.
- Build framework specific urls via BuildUrl() or BuildUrlToModule()
- Quickly implement SES/Friendly urls by changing just a few properties
- Easy management of sub/peer applications with modules
- Persist complex data types (i.e. CFCs, structs, arrays) across redirects
