Hi Mary, Luis and I will both be at cf.Obejctive() and I don’t think we’ve met so I’ll be looking forwarding to talking to you there. Please look at coming in a day early to catch our Into The Box conference http://www.intothebox.org/ We’ll be having sessions on all the Box products and legacy conversions is one of our focuses this year.
Now, on to your question-- I think I’m with Luis in that it doesn’t seem like the job of a DI engine to be exposing remote proxies-- that should be up to the MVC framework. The remote proxy feature of ColdSpring is interesting though I can’t say I’ve ever heard about it, nor has anyone asked for it before.
After reading about it, I’m not sure if I see the benifit, but again I’m a little turned off by gratuitous XML and I prefer to build my applications with CFML, not configuration. They have an example that takes 25 lines of XML, but I can accomplish the same thing with WireBox using old fashioned CFML in 14 lines of code (including whitespace). What’s more, this remote proxy is also using dependency injection AND AOP. (In my test, I used the “secure” annotation to automatically bind an aspect) Did I mention there was no XML for any of that? I also prefer the code approach since I often times need to massage, default, or validate incoming parameters from the remote call before calling the service. Likewise, sometimes I like to present the output of the service differently.
Of course, if you’re using ColdBox, remote proxies can also execute regular ColdBox events as well.
RemoteLanguageService.cfc
component {
property name=‘languageService’ inject=‘languageService’;
application.wirebox.autowire( target=this );
remote function reverseString() secure {
return languageService.reverseString( argumentCollection = arguments );
}
remote function duplicateString() secure {
return languageService.duplicateString( argumentCollection = arguments );
}
}
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com