[Seaside] Getting more started
Brian Brown
brian at teuton.org
Tue Mar 4 23:26:00 CET 2003
Quoting Julian Fitzell <julian at beta4.com>:
> Brian Brown wrote:
> > Thanks for your response before, Avi....
> >
> > Ok, I have created my own class for playing with and successfully
> > registered it. I've started playing with the various messages in the
> > Generator (lists, tables, etc.) and now understand how these work
> > together... very slick! =)
> >
Then I forgot to save my image and lost all that :) I wonder if that happens a
lot to newbies like myself, or if I am just especially talented ;)
> > Now, let's pretend I want to build an app with 3 "pages" from the user
> > perspective, with a menu that is context sensitive (indicating which
> > page you are on). How would I go about architecting this? One component
> > per page and another one for the menu, rendering the menu component from
> > each page component? And assuming I wanted each page to have the same
> > layout, would I create a Class message that has the layout code in it,
> > or would that be another component? (Or am I missing the boat entirely?)
>
> You are right that each "page" should (probably) be its own component.
> And, yes, the menu should be in another. My inclination would be to
> have a frame component that rendered the menu and then (based on the
> current choice) displayed one of your other "pages" as a subcomponent
> (at the appropriate place in the frame's render method, just tell one of
> the other components to render itself).
This is exactly the kind of info I am looking for. Thanks!
>
> When you say you want each page to have the same layout, I'm not sure
> what you mean. If they have exactly the same layout with different
> data, they should be the same component. Otherwise, you might want to
> look at sharing the common parts. You could do (at least) this two
> ways. First, by breaking out the unique part into a seperate method so
> you can subclass several times and change that method in each subclass.
> Or, second, build a component for each unique part and embed it into a
> component (maybe even the main frame) that holds the common surrounding
> part.
Well, typically many sites have headers, sidebars, menus, content areas, etc...
a lot of which is common with context dependent data. Like the stuff at the top
of the Squeak Swiki pages.
>
> I'm off to bed or I would actually provide examples. But if you give
> more detail on what you're looking for we can provide more suggestions.
> Take a look at the MultiCounter example to see how embedded components
> work.
>
> Cheers,
>
> Julian
>
>
Thanks a lot!
Brian
>
> --
> julian at beta4.com
> Beta4 Productions (http://www.beta4.com)
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
--
More information about the Seaside
mailing list