[Seaside] Design (was Re: [Seaside] Web Calendar for Seaside)

Adrian Lienhard seaside@lists.squeakfoundation.org
Sun, 24 Nov 2002 16:30:31 +0100


Hi Avi and all other Seasiders!

More tutorials: This would be really good: Helping beginners to have a
smooth start and providing the advanced developers with helpful experience
(e.g.  "patterns" for common problems).

At the moment I'm facing some of the following questions which I'd like to
have some advice or discussion on:

Domainmodel:
How do you best access the domainmodel. Important seems to me to have the
model separated from presentation as much as possible. To access the model I
use the Session as following: It has a Classvar DomainModel and implements:
MySession>>domainmodel which returns the unique instance. So in the Seaside
code I use: "session domainmodel ...".
Now there is the question of let each Component access the model like that
or just let the root Component wich passes parts of the model to the child
Components. For example:

MyCompoundViewComponent>>initlialize
tasklistview := MyTaskListView new
      tasks: session domainmodel tasks.

and then
MyCompoundViewComponent>>renderOn: html
...
tasklistview renderOn: html.
...

This leads to the second issue:
In the "CompoundView"-Component - a Component wich puts several others (like
Menu, Main-View etc.) together - I use instance vars to store the sub
components. This makes them having state (e.g. for storing if a toolbar is
open or closed etc.).
But now, I'd like to call other Compponents from the sub components but just
substituting the calling and not all. This means for example that "self
call: CreateNewTask new" should show a page *with* the menu... How could
this be done without much trouble?

I hope it's more or less clear what I mean. Else, please ask!
Avi (or other interested), if you have some minutes left to look at the code
(it's not much yet), it would really be cool.

Thanks a lot
Adrian

_____________________
Adrian Lienhard
www.adrian-lienhard.ch
www.netstyle.ch

----- Original Message -----
From: "Avi Bryant" <avi@beta4.com>
To: <seaside@lists.squeakfoundation.org>
Sent: Saturday, November 23, 2002 11:28 AM
Subject: Re: [Seaside] Web Calendar for Seaside


>
> On Sat, 23 Nov 2002 tblanchard@mac.com wrote:
>
> > I tried the app on your laptop - it looks very cool.  I'm just getting
> > started with seaside and confess its a bit daunting.  So I was hoping
> > to look at your app to try to understand some stuff.
>
> No offense meant to Derek, who did a great job with the calendar, but it
> shouldn't be taken as a style guide for using Seaside - Derek is new to
> Seaside himself, and (due to my lack of good documentation) not everything
> that his app does is using the framework in the way in which it was meant
> to be used.  Hopefully, I'll be able to help him polish it up.  Even more
> hopefully, some documentation will come out of the experience...
>
> If you're looking for non-trivial example code, take a good look at the
> SqueakMap Browser example included in the release (Seaside/Examples-SM).
> It's a pretty good representation of typical (for me) Seaside usage.
>
> I'd love to help make Seaside less daunting; could you ask some specific
> questions ("how do I do X? What is feature Y for?  What does method #foo
> do?") to help bring down the barrier a bit?
>
> Cheers,
> Avi
>
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside