[Seaside] Newbie: GOODS with Seaside

Ruben Bakker ruben_bakker at mac.com
Mon Apr 26 22:06:17 CEST 2004


thanks Julian... I'm glad I wasn't totally wrong.
Does seaside 2.5 alpha run on a 3.7a squeak?

Ruben
 
On Monday, April 26, 2004, at 06:03PM, Julian Fitzell <julian at beta4.com> wrote:

>Ruben Bakker wrote:
>> I've played with the examples and have created my first very simple seaside application. I've added GOODS to make my domain model persistent.
>> 
>> I'm unsure if I'm on the right track:
>> I have extended WAControllerSession to hold the KKDatabase instance. I'd like to logout the KKDatabase when the WAControllerSession expires. How do I get notified when the session expires? I tried pageExpired and expire, but they didn't get called. Or should I manage the KKDatabase instantiation and logout for each request? Does there exist a pooling functionality so the overhead creating/destroying KKDatabases could be minimized?
>
>I haven't used GOODS in smalltalk yet, but you seem to have the right 
>idea.  The #expire method is only used if you want to manually expire a 
>session, though.  And #pageExpired gets called when you visit a page 
>that is no longer in the cache.
>
>You don't say what version of Seaside you're using but I'm guessing it's 
>2.3.  I've merged into the current 2.5 alpha release a hook that we 
>added at work that gets called when a session gets expired.  If you want 
>to add this yourself in 2.3, take a look at 
>WARegistry>>collectExpiredHandlers.  If you're playing with 2.5a, you 
>can implement #unregistered on your session class.
>
>That said, you can have a lot of sessions hanging around for quite a 
>while in a large application.  I don't know if GOODS comes with a 
>connection pool but it's probably very easy to write one.  I wrote one 
>for OmniBase using a SharedQueue and maybe a half-dozen methods.  It 
>really does make things so much simpler and way more efficient in terms 
>of the number of database connections around at any point.
>
>Julian
>_______________________________________________
>Seaside mailing list
>Seaside at lists.squeakfoundation.org
>http://lists.squeakfoundation.org/listinfo/seaside
>
>


More information about the Seaside mailing list