Photo from Chile

New Stuff for MXUnit, Model-Glue and ValidateThis on the Horizon

I've been extremely busy over the past couple of months on a number of projects, both for clients and open source, which has lowered my blog post output to approximately zilch.

I thought I would write a quick note about some items that I've been working on, and that should hopefully see the light of day in the ColdFusion open source world in the near future.

MXUnit Mocking Integration

Bill Shelton, of MXUnit fame, has written a mocking framework called MightyMock that has been close to being released for quite some time. I've used it and I liked it a lot. Bill and I discussed integrating it with MXUnit itself, to make mocking super easy for developers using MXUnit, and during the discussions we realized that it would be nice if MXUnit could support generating mocks via any framework, not just MightyMock. I set out to build a plugin architecture that would allow for any ColdFusion based mocking framework to be used with MXUnit. Thus far I have it working with MightyMock, ColdMock and MockBox. We're still working on the final bits and pieces, but if anyone is interested in giving it a try let me know and I can point you in the right direction.

Model-Glue ColdFusion 9 ORM Support

If you're a user of the Model-Glue MVC Framework you're probably aware of the fact that a couple of ColdFusion ORMs (namely Transfer and Reactor) can be used quite seamlessly with the framework via what's referred to as an ORM Adapter. This allows Model-Glue developers to take advantage of Generic Database Messages (GDMs), which provide for automatic CRUD (creating, reading, updating and deleting records in database tables) as well as basic listings. These GDMs also form a part of a feature called Scaffolds, which takes the automation even further by generating view and controller code for maintaining database tables. Using Scaffolds you can get a complete CRUD solution up and running in a matter of minutes.

With the release of ColdFusion 9 there's a new ORM player in the game, namely ColdFusion itself, with its new Hibernate integration. Dennis Clark and I have been developing a Model-Glue ORM adapter for ColdFusion 9's built-in ORM and it is nearly ready to be released. If you are interested in taking a look at it, or willing to help with testing it, please let me know.

The Model-Glue Documentation has more information available on both Generic Database Messages and Scaffolds.

ValidateThis CF9/ColdBox Sample Application

John Whish has been kind enough to contribute some bug fixes and enhancements to the ValidateThis core, as well as the ColdBox plugin. He's also been working on a ValidateThis/ColdBox 3/CF9 ORM sample application, which I plan to contribute to as well and should be made available in the near future.

ValidateThis CFWheels Integration

Mike Henke and I have been working on getting ValidateThis to work with the ColdFusion on Wheels framework, which just celebrated its 1.0 release. Although ValidateThis is designed to be totally framework agnostic (meaning it can be used with any framework without modification), because it is designed to validate ColdFusion objects, it relied on the fact that those objects would expose getters for each of their properties. That is standard practice throughout most of the CF world, but Wheels is a bit different. Its objects do not have getters for their properties, so the server-side validations were unable to determine the values of any properties, which rendered them useless.

Thanks to the encapsulation afforded by a decent object oriented design, I was able to enable ValidateThis to work with these new types of objects (which don't have getters) with a couple of minor code changes to the framework. Mike and I now have a version of ValidateThis that works with traditional objects as well as with "Wheels style" objects. Mike is also working on a new ValidateThis sample application, using CFWheels. Once we're done testing and have a decent sample application this new version of ValidateThis will be released, along with the new sample.

ColdFusion 9 ORM Training

Finally, I'd just like to mention that Mark Mandel and I will be delivering a comprehensive two-day, hands-on course covering Developing Applications with ColdFusion 9's new ORM features as a pre-Conference workshop at cf.Objective() this year. The course will run from April 20th to April 21st, 2010. Much more info will be available soon.

Happy Holidays everyone!

ValidateThis! Coldbox Plugin Demo Now Online

I mentioned in my last post that I created a demo which uses the new ValidateThis! Coldbox plugin to integrate VT with CB. That demo is now available online at www.validatethis.org.

Note that only the Edit User page has been updated to make use of VT.

Also, if you're looking for a copy of the Coldbox Plugin it is available in the /extras folder of the framework download, which can be found at the Riaforge site. I'm also attaching just the plugin file to this blog post.

A Coldbox Plugin for ValidateThis! is Now Available

A developer named Jaime Muniz asked me about whether anyone that I knew had configured ValidateThis!, my validation framework for ColdFusion objects, to work with Coldbox. He also suggested that a Coldbox Plugin for VT might be a good idea. Now I've never actually worked with Coldbox, but I've sure heard a lot of good things about it, so I figured I'd mosey on over the the Coldbox Documentation and see if I could determine what would be required to create a plugin for VT.

Much as I expected, the documentation was extensive and easy to follow, and I was able to grok how to create a plugin in a matter of minutes, so I figured I'd give it a whirl. I'm happy to say that a few hours later I know have a working Coldbox Plugin for VT, as well as a very simple sample application demonstrating its usage. I took the existing Coldbox TransferSample application and made a few changes to it to transform it into a VT sample application. You can find the sample application attached to this post in a zip file. If you're a Coldbox user and have any interest in trying out VT, I'd be eager to hear how it goes and what you think of it.

I'm going to attempt to keep this post uncharacteristically short, so I won't get into the details of using VT here. I have written about that extensively on my blog in the ValidateThis! category. What I will do is briefly describe the API of the Coldbox Plugin, so you'll know what you can do with it, and also walk through the few changes I made to the existing TransferSample application to integrate VT.

[More]