Hi, do you have sample code to compliment the description below?<div><br class="webkit-block-placeholder"></div><div>Thanks,</div><div><br class="webkit-block-placeholder"></div><div>-Conrad</div><div><br> </div><div><div>
<span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Richard Eng</b> <<a href="mailto:richard.eng@rogers.com">richard.eng@rogers.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
I'll also offer up how I do it, a slight variation on Michael's approach...<br><br>I start with a regular, static HTML mockup of my website (complete with<br>separate, external CSS files), comprising a number of webpages. For each
<br>webpage, I create a class. Each class renders the HTML of the corresponding<br>static webpage.<br><br>(Actually, I start with a "template" class that renders individually--ie,<br>with individual methods--the logo, the menu, the footer, the sidebar, etc.
<br>Each webpage class subclasses the template. This allows me to customize the<br>look of each webpage, eg, perhaps I don't want a menu or sidebar for a<br>particular page. I'm leveraging HTML reuse here as best I can. And note the
<br>side-effect benefit: the menu method, which renders an unordered list, can<br>make #call: <webpage class> calls that replace the entire page, rather than<br>just the content subcomponent!)<br><br>I also make use of "announcements" in my GSServiceCentre webpage, which, as
<br>I alluded to above, has a customized look--no navigational menu, but rather<br>a menu in the sidebar [implemented with announcements] that swaps out<br>content subcomponents. Really quite nifty, actually.<br><br>It seems to me that announcements are too specialized (swapping out content
<br>subcomponents only) to be used for general page handling as I've outlined<br>above. (I'm sure it can be done, but at what cost to complexity or design<br>obfuscation?)<br><br>Regards,<br>Richard<br><br>------------
<br><br>> My Seaside application have 3 components<br>> 1.) main component with two instance variables for menu and content<br>> and a children method (array with: menu with: content)<br>> 2.) menu subcomponent
<br>> 3.) content subcomponent<br><br>Here's how I do it, but your mileage may vary:<br><br>I have an "Interface" component for each of my main sections. My<br>Welcome page, which handles logins and new user creation is called
<br>"GHWelcomeInterface". Once you get beyond that, you are sent to the<br>meat of the app, the GHUserInterface.<br><br>GHUserInterface handles rendering the menu and has a content<br>subcomponent. Since the menu is actually part of the GHUserInterface
<br>instance rather than a subcomponent, it just swaps out 'main' (or<br>'content' in your case) with the appropriate content instance.<br><br>So, just to be clear, I don't have three components, I just have two:
<br>one that handles the general state of things (including the menu), and<br>the other is the actual content.<br><br>Hope this helps,<br><br>Michael Gorsuch<br><br><br>_______________________________________________<br>Seaside mailing list
<br><a href="mailto:Seaside@lists.squeakfoundation">Seaside@lists.squeakfoundation</a>.org<br><a href="http://lists.squeakfoundation">http://lists.squeakfoundation</a>.org/cgi-bin/mailman/listinfo/seaside<br></blockquote>
</div><br></div>