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
- First off, you must be running ColdFusion MX 6.1 to use Mach II!
- Download the Mach II core files and the example applications (four ZIP files altogether)
- In your CFMX web root, unzip each ZIP file - you should have the following
directory structure:
- {CFMX web root}
- MachII
- ContactManager
- Roulette
- ShoppingCart
- {CFMX web root}
- Yes, they really do need to be all in the top-level of the web root! (but see below)
- You should now be able to try out each example application:
http://localhost/ContactManager/http://localhost/Roulette/http://localhost/ShoppingCart/
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:
- 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.
- On-demand (0 - "dynamic"): the XML configuration file is read whenever it changes (and the framework is re-created on each change).
- 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).
Read more about...
- Official Mach II resources:
- The Mach II FAQ, Documentation and Articles.
- Configuring Mach II (PDF).
- Mach II DTD for the XML configuration file.
- The Mach II forum (on the Fusebox website) - also available as an RSS feed.
- The Mach II ColdFusion mailing list (on the Topica website).
- Resources on macromedia.com:
- Resources on this website:
- Why Mach II?
- Getting started with Mach II.
- The concepts behind Mach II.
- The anatomy of the "ContactManager" sample application.
- Stuff you can download for free!
- Bug fixes & enhancements for Mach II core files (updated 11/5/2004).
- Other Mach II resources:
- Mach-II.info - community FAQ and a more comprehensive sample application.
- Robby L's Mach II page - includes filters and plugins.