Viewing By Entry / Main
August 27, 2007
If you've been following my blog over the years, you'll know that I pretty much stopped using Mach-II a few years ago, switching to Model-Glue instead (and, of course, continuing to use Fusebox for a variety of projects as well). At the time, I felt Model-Glue had leapfrogged Mach-II - as each new framework might be expected to do to existing frameworks - and I liked it's built-in bean factory and cleaner implicit invocation mechanism.

Model-Glue has come on in leaps and bounds - the rearchitecture based on ColdSpring, the scaffolding infrastructure, the integrated support for Reactor and Transfer for "generic database messages". It's very impressive. And now we're got the beginnings of a Flex version, which is very promising.

Now that I'm consulting and have a number of clients, I'm encountering Mach-II quite a bit and looking at the 1.5 release. I've mentioned in the past that I think 1.5 looked quite impressive (when Peter Farrell gave the "what's new?" talk at cf.Objective(), for example). Recently, I've been making recommendations for frameworks for clients and finding myself recommending Mach-II for some clients, mostly due to the new features in 1.5. For some of the sites my clients are trying to build, the modules, includes and subroutines really do allow you to build much larger, much more modular sites than earlier versions of Mach-II.

The extended property semantics in Mach-II 1.5 are also very nice, allowing you to specify structured configuration data - including full-on CFCs - as well as allowing property values to be dynamically substituted into parameter values throughout the configuration.

I still don't really like the direct invocation model (with <notify>) compared to Model-Glue's broadcast / listener mechanism, but the other features are pretty compelling.

One thing I have seen mentioned, but cannot find, is Peter Farrell's new ColdSpringProperty CFC, to replace the old ColdSpringPlugin. Anyone know where to get a copy?

Comments

I ironically just committed the new ColdspringProperty.cfc (with a lowercase 's' to match the older plugin version naming) to the ColdSpring CVS server just before you posted this. I guess you barely missed the message I sent to the Mach-II list. The property includes some more functionality that will be revealed in the Dashboard module that we're building (to be released with 1.6 this fall).


Thanx Peter. I notice that the comments aren't quite correct:

The parameter configFilePropertyName no longer exists and instead the parameter configFile is required (and contains the value that was originally in the property named by the configFilePropertyName property).

That's a nice change, in my opinion.

Could you explain what the placeInApplicationScope and placeInServerScope parameters are for?


Yeah, the documentation is a work in progress ;-) I'll update that soon.

I agree that indicating a property name that holds the path to the config file was a bit cumbersome. However, I believe it was done so you could programmatically substitute a difference config file via by having another plugin set the value of that property. With parameter value binding (via the ${} syntax) that we introduced in 1.5 -- it's really a moot point thus the change.

If you want to do parent bean factories, then you need to place it in a location that another ColdspringProperty can find. So in your parent factory parameters you need to flip placeInApplicationScope to true (the key is based off the value of the beanFactoryPropertyName parameter). In your child bean factories (usually a module in Mach-II), you need to use the parentBeanFactoryScope and parentBeanFactoryKey parameters to reference the parent bean factory to inherit from. It needs some refinement at the moment, but it's what I inherited from the ColdspringPlugin and I didn't think to change them yet since it works...


Ah, I get it now... I hadn't thought of parent/child bean factories between Mach-II modules... sweet!


FYI, the file header comments in the ColdspringProperty.cfc now have an example on how to configure parent/child bean factories for modules in case anybody is wondering how to do that.


Post Your Comments
Name:
Email Address:
Comments
*** Please note that all comments require moderation so it may be some time before your comment posts to this blog! ***
Remember My Information:
 



Hosting provided by