Simulate MG generated view folder functionality

I was wondering if there is anything in place to have functionality similar to Model-Glue’s view folder having a “generated” sub folder where as the view folder is checked for the view and if not MG checks the view/generated folder. This allows you to use a temporary generated file and a final copy of the same name in the views folder supersedes the one in the generated folder. MG uses a little different terminology, but the concept is the same.

An interceptor might be an ideal place for this to happen.

Thanks,

Dan

Can you explain in detail what you are trying to do?

What do you mean by generated? Are you referring to MG’s scaffolding?

We purposely do not do scaffolding as we see it as a waste of time, although cool, but not really a good way to code.

First off, agree with you entirely, not a good way to code and that is not what I am trying to do.

Similar to scaffolding, gives you the views to test you handler, service & gateway as well as transfer and the decorators.

Useful for team development where back end can be tested, model the business domain and potential hand off to front end developer to integrate.

Can you further describe the feature Dan, I am still not getting it, sorry! I have not been a big MG user.

But I am definitely interested.

No problem.

event.setView(“client/clientDetails”)

I am thinking an interceptor would be the place to handle this - grab the view from the event, check the specified folder “/views/client” for clientDetails.cfm, and if it does not exist, update the view in the event to be “client/generated/clientDetails.cfm”.

That is what I am toying with anyways.

Dan,

I would recommend using the RequestContextDecorator for that. It would be very similar to what I have done with my “mapped views” methodology.

http://www.quackfuzed.com/index.cfm/2008/4/14/Using-Mapped-Views-in-ColdBox

HTH

Ok,

now what is in generated??

Luis

Thanks, I will take a look at that.

Dan