[Seaside] Getting more started

Brian Brown rbb at techgame.net
Fri Mar 28 14:05:13 CET 2003


On Friday 28 March 2003 01:43 pm, Avi Bryant wrote:
> On Fri, 28 Mar 2003, Brian Brown wrote:
> > 	Normally the template would be beginning html, meta tags, a placeholder
> > for Javascript in the head tags, body tags, and a top level table that
> > would have placeholders within specific cells for dynamically generated
> > content, images, menus, etc.
> > 	Being a Smalltalk/Squeak/Comanche/Seaside newbie, I'm not even sure that
> > this model works (or rather that I should try to use this thought
> > process; I'm sure it could work in some fashion).
>
> Well, what you most likely want is one component that draws the header and
> the toplevel table, and has an instance variable for each "placeholder"
> (or if there's a variable number of placeholders, some kind of
> collection).  These instance variables would contain other components that
> created your dynamic content, that you could replace at will.
>
Alright... so conceptually it's a similar methodology, but I would be using 
subclassing and the components render themselves in this context.


> > I think I understand creating the components to be rendered, but am a
> > little fuzzy on where I would put the parts that I used to put in my
> > "PageTemplates" like head, meta, Javascript, etc.
>
> So you have a number of pages that all have the same format but have
> different meta tags, JS, etc?  A few possibilities:
>
> - have more inst vars in your pluggable toplevel component that contain
> these snippets, or
> - use the "template method" approach, ie, have individual methods for
> #renderJavascript, etc, and then a subclass for each page that overrides
> these, or
> - if the JS and so forth are dependent on which bits of dynamic content
> are plugged into the placeholders the table, have methods on those dynamic
> components that specify, eg, what kind of meta tags they need, and have
> the toplevel component query them when it's rendering; or better, remember
> that the HTML doesn't need to be generated in the order it appears, eg,
> those subcomponents can add stuff to the head themselves (see
> HtmlBuilder>>title: for an example).
>
Okay, I'll give this a try... Yes it does makes sense.


> Any of those make sense for what you're doing?
>
> > As a side note, I have officially introduced Squeak into our (small 7
> > person) company, and will be implementing several commercial offerings
> > with it, one of which is slated to be in Seaside.
>
> Hey, that's great!  Welcome to the small but growing club ;).
>
> > I'm completely sold on the platform and
> > the way seaside approaches web development; I just need to get over the
> > hump of coding it and thinking about things more correctly....
>
> <plug>
> Since you're using it commercially, or planning to, I feel obliged to
> point out that a lot of what I do is provide
> training/coaching/development for companies using Seaside (or even
> just Squeak - that's why, eg, DVS exists).  If you think your company
> might find that useful, let me know privately...
> </plug>

I'll definitely do that :)

>
> Of course you can also get a fair amount of free advice on this mailing
> list, as you've hopefully seen ;).
>
> Avi
>


Thanks Avi!



More information about the Seaside mailing list