RE: [coldbox:8500] Re: avoid mappings in modules

Without thinking this through too much, is it possible for ColdBox to dynamically create mappings in application.cfc based on the registered modules and some sort of module-specific “require mapping” setting?

Thanks!

~Brad

Ok, now you are getting funky!! I like it!!

Let’s think about it, brainstorms?

For this to work, maybe you can configure this in the main app configuration or modules, that is easy right.

The tough thing is actually having everything loaded first so we can ask coldbox (once loaded) to modify the Application.cfc this scope. It would have to maybe be done twice: 1) onApplicationStart(), 2) processColdBoxRequest()

We could take it a step further and maybe allow for ANYTHING to be modified in the Application.cfc this scope. So maybe we can create something like this in the App Config and also in the Module Config:

coldfusion = {
mappings["/myApp"] = XXX,
ormEnabled = true,
datasource = “myDSN”
};

Then we could potentially register all our application.cfc specific settings in our app itself? Ideas, thoughts?

You won’t be able to modify everything, some things in the this scope can’t be changed once you have entered the onApplicationStart method. This is mainly the ORM stuff of course.

But that sort of follows on from my ORM CFCLocation concept too.

Regards,

Andrew Scott

http://www.andyscott.id.au/

So as of right now this would be the installation instructions for my module, doesn’t seem hard right?

Seems pretty standard to me. I think the tricky thing is that you cannot configure eitehr mappings or the ORM from a module.