You could easily modify the configure method to call a specific method
based on the server name.
This is an area we are going to examine and improve upon in Mach-II 1.8
-- with environment type properties. I've never come across a situation
where you want environment specific event-handlers or listeners -- it's
always properties being used to programmatically change the way other
elements in your application behave. We're not sure if we are going to
solve it by offering an environment or platform property.cfc that comes
bundled with Mach-II or actually add to to the core of the framework or
it might be a combination of both. I've been toying of the idea of
adding hooks into Mach-II that can set the deployment mode (development,
staging, production, etc.) and having a bundled property.cfc to help
set the correct properties etc. depending on the mode. This is
definitely an area that other frameworks (both CFML and non-CFML like
Spring / Struts / CakePHP) have struggled with finding an elegant
solution for both simple situations and the more complex deployment
enterprise level situations.
Lastly, you can use bindable property placeholders to drive the
configuration of listeners, filters and plugins:
http://greatbiztoolsllc-trac.cvsdude.com/mach-ii/wiki/BindablePropertyPlaceholders
Best,
.Peter
You could however passed parsed XML for properties to the loadXML() to
the PropertyManager. The 'configXML' attribute is expecting an
XmlParse()'ed variable.
This is what suggest, please file a detailed enhancement request by
filing new tickets at trac.mach-ii.com. Please file one each for
programmatic loading of includes and one regarding environment
configuration.
Best,
.Peter
Hi Peter, Thanks for the response. Where would I get the parsed xml from? Is that available as an argument somewhere?
You could however passed parsed XML for properties to the loadXML() to the PropertyManager. The 'configXML' attribute is expecting an XmlParse()'ed variable.I would file a ticket there if I was requesting a new feature, however in this case I was merely asking if there was a way to do something of that sort right now. Programatic includes was just one thought of the top of my head, not necessarily that I wanted it, more I was just thinking of one possible way to solve that as a problem.
I dare say that you guys working on the core will be able to come up with the most balanced solution when you get around to tackling it, I am just looking for the best way to solve the problem as of right now :) The suggestion regarding injecting parsed XML sounds pretty good, I'm just not sure where abouts to get it from ^.^
----- Original Message -----From: Peter J. FarrellSent: Monday, November 17, 2008 4:51 PMSubject: [Mach-II] Re: Load mach-ii include programatically
----- Original Message -----From: Peter J. FarrellSent: Monday, November 17, 2008 4:51 PMSubject: [Mach-II] Re: Load mach-ii include programatically