[albatross-users] Re: Renaming application and execution context classes
Cameron Blackwood
korg at darkqueen.org
Mon Jun 30 17:02:31 EST 2003
Dave Cole writes In message <m3brwhxjck.fsf at ferret.object-craft.com.au>:
| A long time ago Cameron Blackwood posted to this list complaining
| (quite rightly) that the application and execution context classes
| were badly named. He made some suggestions here.
Im still on the list ;) Im just quiet because I havnt had much
albatross hacking time :).
|
| I agree that the current class names could be improved but I cannot
| seem to come up with anything really good. Below is a table of the
| current packaged classes and a new name suggestion.
Yeah, its hard. :-/
|
| Can anyone think of a better naming scheme?
|
| What are peoples' feelings about a rename?
I (obviously) think it is a great idea :)
|
| - Dave
|
| Current Class New Class
| =============================== =========================
| SimpleContext TemplateCtx
| AppContext
|
| SimpleAppContext ClientSessCtx
| SessionAppContext ServerSessCtx
| SessionFileAppContext FileSessCtx
I like these :) Very obvious and clear
|
| Application
|
| SimpleApp ClientSessPageObjApp
| SimpleSessionApp ServerSessPageObjApp
| SimpleSessionFileApp FileSessPageObjApp
|
| ModularApp ClientSessPageModApp
| ModularSessionApp ServerSessPageModApp
| ModularSessionFileApp FileSessPageModApp
I still find these a little confusing, (but then I never did use the
Modular versions at all :-). So if youre looking for suggestions, then:
ClassApp <-- I guess simple is ok, but you need to use classes so
isnt that a little clearer?
|
| RandomModularApp ClientSessByURLPageModApp
| RandomModularSessionApp ServerSessByURLPageModApp
| RandomModularSessionFileApp FileSessByURLPageModApp
I really havnt looked too far under the hood for Albatross, so
this is probably a dumb question... but..
Should the app really care how the context is stored?? Isnt that the
context's job?
I guess it's because the App needs to know where/how to load the context
(or what type of context to load).
But wouldnt you be better to make the programmer hard code enough
information into the code so that the context type can be created and then
you would have 3 app classes rather than 9.
Yeah, I guess Im still not clear on why the App needs to care how the
session is stored.
Oh and I still think that accepting, but ignoring, any
Albatross_Application.__init__ arguments from other session/context
storage types to allow you to switch between App methods is a good idea ;)
Oh and Im working on using albatross as a UI for some graphics work
that Im doing. It uses ismap images to move the view around etc
and albatross makes it nice and easy.
This post has made me look through the albatross documentation again
and I have a couple of comments on that:
1) I cant find (easily) a section that lists exactly what is called
with any request
http://www.object-craft.com.au/projects/albatross/albatross/fig-presimpexec.html
seems to come close.
But it says:
"It is instructive to look at the exact code from Albatross
that implements the processing sequence."
but then it doesnt mention page_process, page_display functions
the example at the end of the page use.
2) Some more description on what a SessionAppContext/ServerSessCtx
is might also be cool. Eg, for my graphics viewer, i have to load
the world state in each cgi request, does the server save me from
doing this? (Im just going to go and code up an example to answer this
myself, but it does seem a little ugly to have to do that to work out
how it works :)
cheers,
cam
PS: Dont take comments in this post as -ive, I think albatross
totally _ROCKS_!!
--
/ `Rev Dr' cam at darkqueen.org Roleplaying, virtual goth \
< http://darkqueen.org Poly, *nix, Python, C/C++, genetics, ATM >
\ [+61 3] 9809 1523[h] skeptic, Evil GM(tm). Sysadmin for hire /
---------- Random Quote ----------
One thought driven home is better than three left on base.
More information about the Albatross-users
mailing list