[Seaside] Re: How to add GLORP to a Seaside application?

Yanni Chiu yanni at rogers.com
Tue Feb 1 15:23:37 CET 2005


"Martin J.Laubach" wrote:
> 
>    I need the commitUnitOfWork/beginUnitOfWork pair so the component will
> continue to work as expected after one has set one password.
> 
>    Does this sound reasonable or am completly off base?

YMMV, but for this case of username and password,
I ended up adding username, password, repeatedPassword
instance variables to a Seaside component. These values
were then used to set the actual User object values, and
the result committed.

Notice that there's an extra field (repeatedPassword)
which is needed from the UI point of view, but it makes
no sense to save the password twice in your User object.

Notice also that you very likely will want to encode
the passwords before saving them out, so that plain
text passwords do not appear in your database.

The natural place to put the encode/decode and verify
password logic seems to be in the Seaside component that
handles the login. Going down this line of thinking leads
to all of the so called "model" objects becoming "dumb
data holders", and the Seaside components are where the
"smarts" are coded. I don't know what is the "right" way
to build things, so any further ideas are welcome.

--yanni



More information about the Seaside mailing list