-
Notifications
You must be signed in to change notification settings - Fork 24
Documentation
- Configuration File XML Quick Reference
- Mach-II Expression Language (M2EL) Syntax Quick Reference
- Answers to Frequently Asked Questions
- An Introduction to Implicit Invocation Architectures
- CFCs - A Primer for CFML Developers
- Introduction to Beans (or Beans, Beans, the Musical Fruit)
- Mach-II Development Guide
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?
- M2SFP Application.cfc Bootstrapper Enhancements
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.
- 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 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.
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.
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.
- Using Bindable Property Placeholders
- ColdSpringProperty.cfc - Integrating 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 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.
- [What are event filters and what do they do in Mach-II?](What are Filters?)
- 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
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.
- 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?
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.
- Leveraging logging within ColdSpring or other bean factories
- Building a Custom Logger - Part One
- Building a Custom Logger - Part Two
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.
- Using the Caching API
- Using the caching package outside of the Mach-II MVC framework
- Building a Custom Cache Strategy
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
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.
- Introduction to REST Endpoints
- Introduction to File Endpoints
- Introduction to Scheduled Task Endpoints
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.
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.
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.
Mach-II comes bundled with utilities that can help you do perform complex pattern matching on strings, paths and files.
- 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.
- Introduction to Message / Subscriber Listener Notification
- Using the Threading Adapter
- Using the Utility Connector
- 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?
- List of Officially Deprecated Elements
- Mach-II Project Philosophy
- Mach-II Specification and Feedback Process (M2SFP)
- Mach-II Bling - Logos for Use on Websites
- 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
- Anatomy of Mach-II - Part One - Application Startup Process
- Anatomy of Mach-II - Part Two - The Request Process
- Beginner's Guide To Mach-II
- 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?
- 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?