About
The official blog of Team Mach-II and is the best place to stay up to date on all things Mach-II.
Blog Search
What's New in Mach-II 1.6 and 2.0?
Peter gave an extremely well-received presentation at cf.Objective() covering what's new in Mach-II 1.6 and even a bit about what we have in mind for version 2.0, and if you've been curious, be sure to download his presentation! We'll have an official beta for 1.6 available in mid-June, and development on 2.0 is already underway.
Some of the highlights for 1.6 include:
- Improved Application.cfc bootstrapper
- Publish/subscribe listener method invocation
- Caching package
- Logging package
- ColdSpringProperty.cfc (replaces the ColdSpring plugin)
- Miscellaneous fixes and improvements
The caching and logging packages in particular are extremely flexible, powerful new features in 1.6. Mach-II 1.6 ships with two caching strategies and three loggers, but we've made it very easy to extend and implement your own. For example, if you want to use MemCache, Mach-II 1.6 does not ship with that functionality, but it's very simple to add this--or any other caching strategy--yourself.
There's much more information and details in Peter's presentation, so grab it now and learn all about the fantastic new features in 1.6, as well as what we have planned for Mach-II 2.0!
Mach-II Roadmap Redux
Today was I going through some old Google documents that contained some plans/discussions by Team Mach-II on features to be released in future releases of Mach-II. This specific document was last editted on January 7th, 2007 which is over 16 months ago as of the date of this blog post. I'm happy to say that 95% of the ideas in the document have been implemented in either Mach-II 1.5 or Mach-II 1.6.
Here's a brief list of ideas that were in the document that we've already implement in recent version of Mach-II:
- "Per event caching"
That was the whole note in the document. It was voted on and passed. I'm glad to say that this feature turned into the new caching package that is in Mach-II 1.6. Based on my memories of our discussions, the caching package that was designed is much more robust and feature complete than the one we originally discussed. - "Dynamically build URLs in a framework aware format (including SES)"
The document included some crude syntax on how it would work. This statement ultimately made it into Mach-II 1.5 which was released as a stable in the Fall of 2007. I'm glad to see that Model-Glue is following suite with similar functionality [LinkTo()] in the up and coming version 3 of the framework. - " Ability to split XML config file and/or include XML chunks in main config file"
This turned into the <include> and <module> features that we added in Mach-II 1.5. Personally, <include> is a sleeper hit of Mach-II 1.5. It's a powerful feature that is easy to miss and <module> has become the life-saver of my current applications. - " Persist complex args across redirects"
Before Mach-II 1.5, you could not use the <redirect> command to persist complex datatypes across a redirect. So if you needed a CFC, struct or array on the other side of the <cflocation> you were just out of luck. With 1.5 and beyond, you don't have to worry about that since you can use the persist="true" attribute of the redirect command and your complex arguments will be on the other side of the redirect. - "Allow for complex datatypes defined within Mach-II XML"
I was against this idea when Matt Woodward orginially introduced this idea. I'm glad Matt was right and my fears about this was wrong about adding top-level support for arrays, structs and CFCs. The introduction of MachII.framework.Property.cfc allowed us to create both a simple and high-level configuration for both the caching and logging packages we added to Mach-II 1.6. I'm very happy in the way you can add either caching or logging packages to your Mach-II application. - " Inline execution of events"
This one idea turned into the subroutines feature that was added in Mach-II 1.5. The Google doc shows a bunch of syntax ideas including on that called subroutines <block name="something"> which you indicate in your event-handler by using the a "do" command <do block="something"/>. I'm glad we didn't go with this syntax, but the concepts behind "blocks" is essentially the same as subroutines.
All in all, we stayed very true to the ideas listed in this particular Google doc and what was ultimately implemented in Mach-II 1.5 and 1.6.
Ohloh codebae history and well documented code factoid
Ohloh is a project aggregator that provides more visibility to a project by watching rss (like Trac) and SVN/CVS. They have some factoids on the Mach-II framework profile.
They do not have CF as a language category. Since we close out our tags (<cfset something = 1 />) in the Mach-II, they categorize us as an xml project. The source has been rated as "extremely well documented code" with 12.6% of the source of Mach-II 1.6 being comments.
Our codebase history page shows that since the project was added to Ohloh, we've added over 100,000 lines of code to the Mach-II 1.6 codebase since November 2007!
Mach-II 1.6 Progress with Beta Coming Soon
It's been a while since Team Mach-II briefed users on the progress of Mach-II 1.6 -- probably too long. Before I get into the details, I want to personally mention that I'm extremely excited about this release for many reasons. I'd like to thank Kurt Wiersma (our resident geek) for all his hard work on 1.6 and playing devil's advocate with me when it came to features, architecture and final implementation. Coding with constant input creates better code than solo coding. I look forward to working on Mach-II 2.0 (we've got great things in store).
We've added many major features:
- Mach-II caching appears to be the flashy new feature. We're offering a very flexible implementation that allows you to either use basic caching strategies (time span or LRU) or the ability to write your own caching strategy. The possibilities for developer extended caching is pretty much limitless as the architecture allows you to go as far as hooking into open-source Java project EhCache or a distributed memory caching system like MemCache (which is used at sites like Slashdot and LiveJournal). The caching feature offers controller-level caching which was hard accomplish before 1.6, however it does not replace the need to add caching at other layers of your application such as in the model layer or at the database.
- Mach-II logging is a feature that has been requested for a long time as it allows developers new ways of debugging a Mach-II application by using the one of the bundled loggers or creating their own. We wanted to get this feature into the Mach-II 1.5 release, but due to time limitations it was pushed into the 1.6 release. However, it is probably a good thing as 1.5 introduced new property datatypes (structs, arrays, Property.cfc). The new Property.cfc was so new at the time that we never envisioned using a Property.cfc as a way for setup and configuration a Mach-II specific feature. The logging feature is configured by declaring the MachII.logging.LoggingProperty as a property in your xml configuration file. This approach allows us to offer greater flexibility to develoeprs for configuring and extending the logging system. We also went in the same direction for caching and use the MachII.caching.CachingProperty for setup and configuration of the caching features.
- The publish-subscriber listener invoking (broadcasting messages) is a new feature that has gotten some people very excited. Broadcast style listeners decouple listeners from the event handlers whereas using the <notify> command couples listeners to event handlers. The "broadcast" layer of abstraction would allow you to register an audit / logging layer by merely adding it as a subscriber to the broadcasted message instead of adding a notify to every event handler. Also, message broadcasting lets you easily swap listeners by changing the messages it subscribes to and saves you from editing event handlers (and possibly introducing new errors). As a few people have pointed out in past discussions, these two reasons are a bigger maintenance issue than most developer realize.
Some of these major features have resulted in few neat byproducts or smaller features:
- Mach-II 1.6 ships with a threading adapter that allow us to pass arbitrary bits of code (basically a CFC, method name and arguments) to be executed in a thread (cfthread). One of problems is that the threading implementations between CFML engines varies somewhat. The variation causes problems as we would like to support all CFML engines that offer threading capabilities. The thread adapter allow us to abstract the different threading implementations and create a common API for calling code to use. Currently, threading is only available on Adobe ColdFusion 8 as the BlueDragon 7 currently has some limitations in the context of Mach-II's implementation (these limitations are supposed to be changed in a future release). Support for cfthread in Railo is coming in a future version of Railo as well. As the CFML engines evolve, we'll be able to support threading with the Mach-II core with the threading adapter (both the caching and publish/subscribe features utilize the threading if available on the deployed CFML engine and atuomatically downgrade to serial processing if not available on that specific engine).
- Simplify your Application.cfc. We have added support for onSessionStart and onSessionEnd as new plugin points in Mach-II plugins. Of course, this is only available when using Application.cf (via mach-ii.cfc). This addition allows you to move onSessionStart/End logic into the Mach-II arena and resuse logic that exists in your model layer. This leaves your Application.cfc devoid of complicated logic within your Application.cfc and allows for easier module intergration (no need to copy onSessionStart code from a third-party module like MachBlog into you application). We have also added basic onApplicationStart and onRequestStart methods in the mach-ii.cfc which allows you to ommit these methods in your Application.cfc unless you need to add special functionality in your Application.cfc that is not offered by the basic methods.
At the moment, all the features described above have been implemented and comitted to the repository. Check out a nightly and download a zip the lastest nightly build of 1.6. All in all this is a very exciting release and we have plenty of new things in the queue for Mach-II 2.0. Look for a Beta of Mach-II 1.6 in early April.
Posted 3/30/08 @ 11:00 AM by Peter J. Farrell
