Mail archive
acf

Re: [Acf] updates to mvc.lua

From: Nathan Angelacos <nangel_at_nothome.org>
Date: Thu, 01 Mar 2007 15:04:34 -0500

[replying to my own post]
> Not that anybody cares... but the old acf did this:
>
>
> <? require("mvc")
> mvc:dispatch(mvc:new())
> ?>
>
>
> Which was cool, but... what the heck was it doing?!!!
> Turns out, mvc:new was figuring out the application name on its own,
> loading application code, and all kinds of interesting things (that it
> probably should not have been doing)
>
>
> Here's a sample of the new code in acf:
>
> #!/usr/bin/haserl --shell=lua -a
> <?
> require("mvc")
>
> -- create a new container. This container will contain
> -- application level configuration params, but not code
> FRAMEWORK=mvc:new()
>
> -- load the container with the config info, using "acf" as
> -- the applciation name
> FRAMEWORK:read_config("acf")
>
> -- Create an application container (this time, the "acf"
> -- controller/model code will be loaded)
> APP=FRAMEWORK:new("acf")
>
> -- And dispatch it
> APP:dispatch()
> ?>
>
> ----
>
> So, FRAMEWORK has acf .conf, but not .worker and .model
> APP has acf's .worker and .model
>
>
> question: Does anyone care about the extra FRAMEWORK table? It was
> there in the orignal case, but it was hidden from view. This just makes
> it visible.
>
>
> I'm assuming the answer is "no"

To clarify, I'm assuming that nobody has an objection to keeping things
like this, with the FRAMEWORK and APP tables.
Received on Thu Mar 01 2007 - 15:04:34 GMT