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>&nbsp;</div><div><div>
<span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Richard Eng</b> &lt;<a href="mailto:richard.eng@rogers.com">richard.eng@rogers.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;ll also offer up how I do it, a slight variation on Michael&#39;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 &quot;template&quot; 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&#39;t want a menu or sidebar for a<br>particular page. I&#39;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: &lt;webpage class&gt; calls that replace the entire page, rather than<br>just the content subcomponent!)<br><br>I also make use of &quot;announcements&quot; 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&#39;ve outlined<br>above. (I&#39;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>&gt; My Seaside application have 3 components<br>&gt; 1.) main component with two instance variables for menu and content<br>&gt; and a children method (array with: menu with: content)<br>&gt; 2.) menu subcomponent
<br>&gt; 3.) content subcomponent<br><br>Here&#39;s how I do it, but your mileage may vary:<br><br>I have an &quot;Interface&quot; component for each of my main sections.&nbsp;&nbsp;My<br>Welcome page, which handles logins and new user creation is called
<br>&quot;GHWelcomeInterface&quot;.&nbsp;&nbsp;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.&nbsp;&nbsp;Since the menu is actually part of the GHUserInterface
<br>instance rather than a subcomponent, it just swaps out &#39;main&#39; (or<br>&#39;content&#39; in your case) with the appropriate content instance.<br><br>So, just to be clear, I don&#39;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>