[albatross-users] login integration challenges again

Eric S. Johansson esj at harvee.org
Thu Sep 25 04:08:45 EST 2003


I started trying to integrate the login code into one of my applications and I 
discovered a few things that show me it is time to learn more about albatross.

The working model for albatross use was the single file for all methods and 
functions plus the glue code for activating albatross.  The working model broke 
out the code in the following fashion:

Includes
independent functions
classes
albatross glue class with methods
       page_enter
       page_process
       page_display
and last, glue code
instance of SimpleApp
register page (binding glue class to albatross)
then run (request())

Granted, many of the features around the glue code still escape me and I take 
the simpleminded view that page_enter is used to create initial values, 
page_process is used to perform work based on a button push and set up data for 
use during page_display.  Page_display is used for any calculations necessary 
for page display independent of whether or not page page_display has run.

Adding login semantics to this style of coding doesn't work well.  For example, 
page_enter would use some form of login object instantiation and then storing 
that object as part of context.locals.  Next during page_process the first thing 
one must do is validate that someone is logged in and a token is valid.  If not 
control passes to a login page, potentially preserving the current state of the 
submit.  Same thing is true for page_display because someone may just access the 
page for data display.  Unfortunately, I do not remember if page_process 
executes every time you access the page or not.

Conceptually, the big problem is the redirecting control to a login page and 
then picking up again from where you left off.

So, is there any way to embed my login capabilities into albatross so that I can 
minimize the amount of work a user needs to remember to do in order to get 
authentication working with their application?  Ideally, the most they should 
have to do would be to define a login authentication instance in the page_enter 
section and everything else should happen automatically and invisibly.

I don't think I'm too far off base on usability model, I just need to know how 
to integrate with albatross better (I think)

Suggestions?  Ideas?

---eric





More information about the Albatross-users mailing list