From: Matt Feifarek <mattf@pa...> - 2001-10-05 18:50:25
One feature that we used often in our old days of ASP/IIS was the
For those of you not familiar, it's basically a session-type storage object
that persists through the life of the running application, and is available
to all scripts... as if all scripts had a shared session() that never
Is there some way to do this in webkit? I see that the Page.application()
doesn't have any value-oriented methods.
At 02:52 PM 10/5/2001 -0400, Matt Feifarek wrote:
>Is there some way to do this in webkit? I see that the Page.application()
>doesn't have any value-oriented methods.
We certainly intended to make it easy to subclass Application, but haven't
quite achieved that yet.
One easy option would be to make a mix-in:
from MiscUtils.MixIn import MixIn
from WebKit.Application import Application
To get this going, I guess you could import this module from your Context's
Now you have just added foo() and bar() to the existing Application class.
The single application instance persists for the lifetime of your app
server's lifetime. However, there is only one application total, not one
Previously, I was Application oriented as well, coming from an environment
that was. However, I have found that I can just as well put my "application
level" data/functions/methods/classes in modules and use those. The benefit
is that each such module stands on its own.
With the application approach you often end up with one class that does 5
separate things, which points you to something monolithic (which makes
reused, debugging, etc. more difficult). On the other hand, you could use
multiple mix-ins like the above and still retain some modularity.
I can certainly see the advantage of having a well known place to grab
commonly used data and services.
Hope that helps.
From: Ian Bicking <ianb@co...> - 2001-10-05 19:25:45
Chuck Esterbrook <ChuckEsterbrook@...> wrote:
> At 02:52 PM 10/5/2001 -0400, Matt Feifarek wrote:
> >Is there some way to do this in webkit? I see that the Page.application()
> >doesn't have any value-oriented methods.
> We certainly intended to make it easy to subclass Application, but haven't
> quite achieved that yet.
I also agree that this can be more easily done with module globals.
But I also think it would be nice to have a global Session, which used
all of Session's features (mostly just moving data to disk when the
application stops), but wasn't tied to a user/browser. A poor-man's