[Seaside] RFC: generalized persistence framework for Seaside

Adrian Lienhard seaside@lists.squeakfoundation.org
Mon, 9 Dec 2002 23:47:25 +0100


Hi Derek

> Goals:
> - abstract away the database implementation
> - simple, easy to implement in a short amount of time

yes, this would be nice.
(This would also be accomplished by the work of Stephen (his mail some hours
ago) as far as I understand).

> Goals that would be nice (but don't know how without lots of trouble):
> - domain objects know when to save themselves.

wouldn't it be the easiest solution to let the setters of the domain object
fire the saving? Ah, the drawback would be that every time you change an
instvar the object saves to the database. The other solution is to do this
explicitly (but then one may forget it?!): E.g. after commiting changes of a
form to a model object you send "model save".

[...]
>
> Then, I have a set of DomainObjectEditor classes, for rendering editors
> for the domain objects (similar to the one's in the web calendar).  When
> submit is pressed, it calls 'save' on the domain object it was editing
> (must be called after all members are updated).

Btw. I'm working on form support (as you have probably seen). You may be
interested to use this as well.

>
> Comments, feedback? Are there easier ways of doing these things?  Can an
> object automatically call 'delete' on itself when it's being GC'd?

To know how the domain objects are modelled and how they are represented in
the database you will have to have more information about them. How do you
plan to do this?
I had some discussion with Avi about a general Metamodel for Seaside
components (see subject "Form support" from last week). This would also fit
in here. I started doing some experimental metamodel implementation where
you can add "attributes" for each domain object. These attributes describe
for example which relationships of instvars exist to other (domain) objects
or how they are labelled in forms...

Adrian

> Thank you,
> Derek
>
>
> Nerd on a Wire: Web and Information Solutions
> Website Design - Database Systems - Site Hosting
> 604.874.6463
> mailto:info@nerdonawire.com
> For more information, visit http://nerdonawire.com
>
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside