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!

TweetBacks
Comments
Hi Bob,

Some intersting stuff on t he horizon. Good work!

One question regarding CFWheels. When you say CFWheels "objects (which don't have getters)", are you saying that CFWheels doesn't implement accessors/mutators in the traditional get/set paradigm? Surely, one needs to retrieve the value of properties from a CFWheels object. I haven't looked at the framework yet, but I'm guessing methods names reflect property names and are implemented such that if no argument is passed to it, the method returns the property value. As in myObj.foo()?
# Posted By Paul Marcotte | 12/18/09 11:12 AM
@Bob,

cfwheels uses the this scope to access the properties of an object.
# Posted By tony petruzzi | 12/18/09 11:22 AM
@Paul, what Tony said. ;-)

Because CFWheels places the property data into the "this" scope, you just grab it using structure notation. So for a User object, with a FirstName property, you'd just do:

User.FirstName

as opposed to the more common:

User.getFirstName()
# Posted By Bob Silverberg | 12/18/09 11:29 AM