[albatross-users] Renaming application and execution context classes

Dave Cole djc at object-craft.com.au
Thu Jul 3 21:02:32 EST 2003


> I think there is something too this.  Add to what you have below a
> top level albatross function that returns the **kw you need, taking
> one argument and doing a preset of classes.  So you could write:
> 
> app = albatross.App(albatross.AppBase,
> 		albatross.PickleSignMixin,
>             albatross.Application,
>             albatross.CachingTemplateLoaderMixin,
>             albatross.PageModuleMixin,
>             albatross.SessionServerAppMixin)

If you were doing something like this:

class MyApp(albatross.AppBase,
            albatross.PickleSignMixin,
            albatross.Application,
            albatross.CachingTemplateLoaderMixin,
            albatross.PageModuleMixin,
            albatross.SessionServerAppMixin):
    pass

then it would probably make sense to put the code that determined the
required constructor **kw arguments inside a method in AppBase.

Am I confused?

> app = albatross.App(albatross.init_app(albatross.SERVER))
> 
> - and even could do -
> 
> initapp = albatross.init_app(albatross.SERVER)
> initapp.pagemodule = RandomPageModuleMixin
> 
> app = = albatross.App(initapp)
> 
> and yes, this comes from my win32 days =p  long live h_wnd!

Are you suggesting that there be a single application class that
delegates processing to instances of other classes?

If you are I think it might make things more than a little
complicated.  At the moment we are using inheritance hierarchies to
define most of the variant functionality.  If you did not use
inheritance you would have to build some other scheme to explicitly
delegate and distribute functionality.  I cannot think of anything
that would be as effective or clean.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list