Skip to content
maestrofjp edited this page Jul 7, 2012 · 2 revisions

Installation

  • How do I install Mach-II?
  • Accessing our Subversion repository

Quick Reference

  • Configuration File XML Quick Reference
  • Mach-II Expression Language (M2EL) Syntax Quick Reference
  • Answers to Frequently Asked Questions

Mach-II Concepts and Introductions

  • An Introduction to Implicit Invocation Architectures
  • Introduction to Beans (or Beans, Beans, the Musical Fruit)
  • Mach-II Development Guide

Bootstrappers

The bootstrapper is what connects a Mach-II application to CFML engine usually via Application.cfc.

Using the Application.cfc Bootstrapper

  • I cannot use server-wide mappings or place Mach-II in my webroot, how can I extend MachII.mach-ii in my Application.cfc?
  • How can I integrate Mach-II into an existing application?
  • M2SFP Application.cfc Bootstrapper Enhancements

Event

Mach-II is event-driven. The event object is at the heart of the Mach-II request lifecycle. Mach-II automatically puts all the form and URL variables from the current request into the event object, and your application can also programmatically put data into and pull data from the event object. The ability to access everything from a single event object is an extremely convenient way to deal with the event's data.

  • How do I secure event-handlers using SSL/HTTPS?
  • What is the Event object and what does it do?
  • What does the access modifier do in an event-handler?
  • What conventions do most Mach-II developers use naming event-handlers?

Listeners and Call-Method

Listeners are the "connecting tissue" between Mach-II and your model by acting as a "proxy" or "gateway". They capture events that are defined in your configuration file, interact with your model and pass data back to the framework.

Introduction to Listeners

  • What are listeners and what do they do in Mach-II?
  • Can I clear the event queue inside my listener?

Often when writing Mach II applications the developer is required to create a method in a listener that simply calls a method in the application's service layer with out any additional logic. This requires the developer to write extra listener methods that don't really serve any purpose. Mach II makes this easier by providing the call-method command which allow the framework to call a method in the service layer and optionally put the result in a event argument.

Using the Call-Method Command

Properties

Properties in Mach-II applications are a convenient way to make variables available throughout an entire Mach-II application. Properties are declared in mach-ii.xml and after the application initializes, properties may be accessed via a simple getProperty() method call from anywhere within the application, including within all Mach-II object types (Listeners, Filters, Plugins) as well as in views. In addition to declaring properties in mach-ii.xml, they may also be added to Mach-II's property manager programmatically.

Introduction to Properties

  • Using Bindable Property Placeholders
  • ColdSpringProperty.cfc - Integration ColdSpring with Mach-II
  • EnvironmentProperty.cfc - Setting Environment Specific Properties
  • HTMLHelperProperty.cfc - Convenience property to ease the handling of HTML, CSS, and JavaScript related tasks

Filters

Filters enable per-event flow control in Mach-II applications. A simple example would be the addition of security or logging to a specific Mach-II event, or conditionally redirecting to a different event based on some value. 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 logic involved.

Introduction to Event-Filters

  • What are event filters and what do they do in Mach-II?
  • What is the difference between event-filters and plugins?
  • How do I execute a subroutine from an event filter?
  • How do I dynamically display a view from an event-filter?
  • From within my filter, can I redirect to another event and make sure its Pre-Process plugin points are triggered?
  • Breadcrumbs with a Filter
  • Basic Permissions with a Filter

Plugins

A plugin is a developer-defined CFC that extends the Mach-II framework. The plugin architecture provides robust extensibility for plugin point for cross-cutting event actions. This means each defined plugin point fires on every request and matching point area. Plugins are useful for executing application wide business login such as loading locale resource bundles before views, checking that the request is secured through SSL or loading specific args into the eventobject on each request.

Introduction to Plugins

  • What are plugins and what do they do in Mach-II?
  • What is the difference between event-filters and plugins?
  • In what order are plugins called by the framework?
  • How do I get an event object in the preProcess() method of my plugins?

Logging

The logging package gives developers a full blown logging package with several bundled loggers and the extensibility to meet all needs through customized loggers. The logging package allows you to logs exactly what happens for each request lifecycle and the ability output and use the logging data in a multitude of ways.

Introduction to Logging

  • Leveraging logging within ColdSpring or other bean factories
  • Building a Custom Logger - Part One
  • Building a Custom Logger - Part Two

Caching

Mach-II comes bundled with an advanced, powerful and flexible caching package that is easy to configure and use. The caching system allows you to cache partial HTML snippets and data through simple XML tags in your configuration file to allowing you complete control and access to when and how to cache your data.

Introduction to Caching

  • Using the Caching API
  • Using the caching package outside of the Mach-II MVC framework
  • Building a Custom Cache Strategy

The View Layer

The view is a layer where Mach-II offers developers a lot of assistance from bindable form library, using resources like images/Javascript/CSS and managing view specific metadata.

  • How should I access the Event object in my views?
  • Can I create custom views that can do process logic before rendering the view?
  • Does Mach-II have any reserved variable names when I create my views?
  • Creating View Layouts / Templating
  • Using copyToScope Helper Method in Views
  • Simplified XML Page-View Sections with Convention Based View-Loaders
  • Form Tag Library
  • View Tag Library

Managing URLs

URL Management Features

  • M2SFP Enhanced Redirect Functionality
  • M2SFP Search Engine Safe and buildURL Improvements

Endpoints

In all simplicity, endpoints are simple and lightweight "servlet" like handlers that accept requests and respond to them as required. Most endpoints will be used for non-human interactions, they are purposedly designed to be lightweight, and singular in purpose by performing without the need of plugins, filters, subroutines or other Mach-II constructs that the full Mach-II request lifecycle provides.

Endpoint Overview

  • Introduction to REST Endpoints
  • Introduction to File Endpoints
  • Introduction to Scheduled Task Endpoints

Modules, Includes and Subroutines

A Mach-II module is an application which runs inside of a parent Mach-II application. A module usually groups together common functionality in to a related package, encapsulates that package nicely within your Mach-II app, and inherits a lot of the base configuration from the parent Mach-II application. Some people build Mach-II modules that are meant to be reused across multiple applications, for multiple sites, while others build open-source modules which are meant to be redistributable and used by anyone, anywhere.

Introduction to Modules

  • An In-Depth Guide to Building Applications with Modules
  • How do I set up MachBlog as a module of my main application?
  • What is the Mach-II Dashboard module?

Includes allow you include other Mach-II configuration files and helps developers break up the configuration into logical chunks but doesn't completely address building applications in a more modular fashion.

Introduction to Includes

  • Using Wildcard in Includes

Subroutines allow you to "reuse" snippets of XML in an effort to reduce redundancy in the configuration file. When a subroutine is executed, it would execute XML commands in the subroutine immediately instead of announcing an event which is queued.

Introduction to Subroutines

Exception Handling

Using Mach-II Exception Handling

Internationalization / Globalization (i18n / g11n)

  • Introduction to Internationalization Support
  • Using Globalization Custom Tags

Utilities and Toolkit

Pattern Matching

Mach-II comes bundled with utilities that can help you do perform complex pattern matching on strings, paths and files.

  • Simple Pattern Matcher
  • ANT Style Pattern Matcher
  • File Matcher

Development Utilities

  • The Mach-II Dashboard - A time-saving tool for reloading components, configuration, and entire Mach-II applications while you work.
  • The MachBuilder Extension for ColdFusion Builder - An extension for ColdFusion Builder 2 or later that helps speed basic Mach-II application development work.
  • Assert Utility - Useful for performing simple data validation. This utility is used within the framework to validate most CFC parameters.

Using Advanced Features and Utilities

  • Introduction to Message / Subscriber Listener Notification
  • Using the Threading Adapter
  • Using the Utility Connector
  • Using the CFC Metadata Introspector

Implementation and Design Questions

  • Where should my listeners, filters, plugins and properties live in my directory structure?
  • How do I announce a new event from my listener, filter or plugin?
  • What is the difference between using init() and configure() methods?

Project Information

  • List of Officially Deprecated Elements
  • Mach-II Project Philosophy
  • Mach-II Specification and Feedback Process (M2SFP)
  • Mach-II Bling - Logos for Use on Websites

What's New…

  • Mach-II 1.5
  • Mach-II 1.6.0
  • Mach-II 1.8.0
  • Mach-II 1.8.1
  • Mach-II 1.9.0

Common Architectural Approaches

  • Using Scopes in Mach-II
  • Using Event Mappings in Mach-II
  • Exit Events (XEs)
  • Integrating Scheduled Tasks
  • Setting Environment/Platform Specific Properties
  • Addressing Application File Organization and Security Concerns
  • Using a Session Facade
  • How To Share Code Between Applications

Behind the Scenes in Mach-II

  • Anatomy of Mach-II - Part One - Application Startup Process
  • Anatomy of Mach-II - Part Two - The Request Process
  • Beginner's Guide To Mach-II

Performance and Debugging

  • Why does Mach-II appear to run really slow where in other Mach-II applications it's normal?
  • How does Mach-II's performance compare to procedural code?
  • What does the MACH_CONFIG_MODE variable in the index.cfm file of the skeleton or my Application.cfc do?
  • How do I configure the ColdFusion 8 Debugger to work with Mach-II?
  • How can I reduce or eliminate whitespace that my CFML engine and Mach-II generates?

Common Errors

  • Why is my property, listener or plugin CFC from one application being picked up in another?
  • Why is my listener, plugin or event-filter not reloading after I make changes to it and restart Mach-II?
  • I get an error "The value returned from the getLog function is not of type MachII.logging.Log."
  • An strange error is thrown when I turn on configuration file validation, how can I fix this?
  • I tried to upload a file via a form and I get an error stating that my form file did not contain a file, how can I fix this?
  • My request timeouts when I load Mach-II, how can I fix this?
  • I cannot use server-wide mappings or place Mach-II in my webroot, how can I extend MachII.mach-ii in my Application.cfc?
  • I'm using Mach-II's SES Urls, how can I get my cfforms working?
  • Why am I getting "Entity has incorrect type for being called as a function"?
  • Why am I getting "java.util.ConcurrentModificationException" exceptions?