Mach II : Getting Started

Some folks seem to have had a lot of problems getting Mach II up and running on their systems so, in addition to the evolving documentation on the official website, here's some pointers to get you started.

Installation

Another 'zero editing' option for installing the framework is to unzip the Mach II ZIP file into one of your custom tag paths (and unzip the example apps into your web root). Any other installation layout will require changes to one or more files in the sample applications! Read the Mach II Development Guide for more information about alternative directory structures.

Performance

The framework has three 'performance' modes, controlled by MACHII_CONFIG_MODE in mach-ii.cfm for each application:

  1. Production (-1 - "never"): the XML configuration file is read once when the framework is created in application scope and is never re-read until you restart the server.
  2. On-demand (0 - "dynamic"): the XML configuration file is read whenever it changes (and the framework is re-created on each change).
  3. Every Time (1 - "always"): the XML configuration file is read on every single request and the framework recreated each time.

The latter is clearly the slowest setting and you'll find that any instance data stored in your model CFCs is recreated each time (you can read more about this on the concepts page). The middle option is what I use during development - my model remains persistent (in application scope) unless I change the XML configuration file and I can force a reload of everything by 'touching' the XML file.

Your index.cfm file should setting the desired value of MACHII_CONFIG_MODE and then <cfinclude template="/MachII/mach-ii.cfm" /> (mach-ii.cfm uses cfparam so it will not overwrite your settings).

More Information...

Read more about...