RE: [coldbox:17178] Why don't modules support "external locations"?

Ahh, I see what you mean. You were asking if modules themselves had external locations they could have. That’s an interesting idea, but modules are supposed to be self-contained so I’m not sure it makes sense. As others have said, the parent app that the module has been loaded into sort of is the “external” for it.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:


Yes and no. The module views / layouts as they are have the process of discovery which attempts to leverage the parent applications conventions. However, this discovery process only checks the base convention paths. So, if the parent application has external paths defined (i.e. a template or skin), then those paths are not used for modules. If the module is going to leverage the parent application views, why not the parent application external views?

Handlers, plugins, etc. are a different thing as they have no discovery process right now … it is either in the module itself or it does not exist. Even this though seems counter to the comments that a module is simply a self contained ColdBox app since a ColdBox app would have external locations that could be used for handlers, layouts, plugins, and views. This goes back to the original question … if a module is simply a self contained ColdBox app that could stand on its own or be integrated into a parent application, why does it not have the external location capability that a parent application does?

– Jeff