[Seaside] Template support in Seaside 2.5

Alain Fischer alain.fischer at bluewin.ch
Mon Jun 20 21:04:55 CEST 2005


Hi Adnan,

A long time ago, I have implemented and used a template system for 
Seaside.
I have implemented this because the page where done by a graphic 
designer
and it was easier to integrate smalltalk in html pages than
to translate html pages in smalltalk.

If there is interest, I could update it for Seside 2.5.

Alain


> De: Alain Fischer <alain.fischer at bluewin.ch>
> Date: 28 janvier 2004 12:43:00 GMT+01:00
> À: Seaside Mailing List <seaside at lists.squeakfoundation.org>
> Objet: [Seaside] [ANN] SeasideTemplate
> Répondre à: "The Squeak Enterprise Aubergines Server - general 
> discussion." <seaside at lists.squeakfoundation.org>
>
> Hi all,
>
> I have done a simple template system for Seaside:
> http://homepage.mac.com/alain_fischer/mc/SeasideTemplate-AFi.1.mcz
> This is probably full of bugs but I am using it and it seem to work 
> well.
>
> Prerequisite:
> - Seaside
> - SmaCC
>
> How to use it:
> Make your components subclass of SSTComponent.
> The template can be embeded or external
> - embeded: create a method templateString in your component
> - external: create a file templates/MyComponent.sst.html
> The format of templates is html text with smalltalk code between 
> "<?sst" and "?>"
> Html text is translated as: html text: 'my html text'.
> Smalltalk code is simply copied.
>
> Known issue:
> - Parsing of template are slow, but since they are cached in an 
> autogenerated method
>   this is not a big problem. I will see how to improve parsing speed 
> with SmaCC rather
>   than writing a custom parser.
>
> Enjoy using this.
> Alain


Le 20 juin 05, à 06:22, Adnan Zaman a écrit :

> Thanks Avi.
>
> Actually I am trying to write the web site Guru.com in
> Seaside (just for learning purposes). I want to
> present an exactly same UI but doing Page -> View
> Source of the home page obviously results in a
> tremendous amount of html.
>
> Since I am new to both Seaside and html, I am sure
> that there must be better ways to do what I am trying
> to do.
>
> Based on my limited understanding of Seaside, I did
> write lot of seaside code along with CSS (actually I
> just used that website's .css file to save time) to
> generate this html programmatically but it took me
> more than 2 days to write up most of that html of the
> home page and so I wonder if I am doing it the right
> way?.
>
> -
> Adnan
>
>
>> ------------------------------
>>
>> Message: 3
>> Date: Sun, 19 Jun 2005 15:17:35 +0200
>> From: Avi Bryant <avi.bryant at gmail.com>
>> Subject: Re: [Seaside] Re: Seaside Digest, Vol 30,
>> Issue 23
>> To: "The Squeak Enterprise Aubergines Server -
>> general discussion."
>> 	<seaside at lists.squeakfoundation.org>
>> Message-ID:
>> <ad69ab6905061906175c4c49b0 at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> On 6/18/05, Adnan Zaman <adnanzaman at yahoo.com>
>> wrote:
>>> Hello all,
>>>
>>> I am a newbie to SeaSide 2.5 and was wondering if
>>> there was some support for integrating html
>> templates
>>> in it.
>>>
>>> After doing some search, I did find such a package
>>> called NORI but somehow I can't find it on
>> squeakmap.
>>>
>>> Any ideas on how to get this package or some other
>>> package with similar functionality?
>>
>> Nori hasn't been an active project for a while
>> (Colin moved jobs not
>> long after starting it and so it was never completed
>> or maintained).
>> One of the main goals of Nori was to make Seaside
>> apps more testable,
>> a need which is now well met by the SeasideTesting
>> package.  However,
>> the templating part of things dropped by the
>> wayside.
>>
>> It's worth asking what it is you want a templating
>> system for - most
>> of us have, I think, found workflows that work as
>> well or better than
>> templates using Seaside's combination of CSS and
>> programmatic HTML
>> generation, and it might be something you want to
>> try as well.
>>
>> I've also been doing some thinking about
>> non-traditional ways of
>> integrating templates into Seaside: somewhere I have
>> the beginnings of
>> a package called MicroTemplates, which is an attempt
>> to integrate very
>> small, simple (no conditionals or loops etc)
>> snippets of
>> designer-controlled HTML into the overall
>> programmer-controller HTML
>>
> === message truncated ===
>
>
>
> 		
> ____________________________________________________
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
> http://football.fantasysports.yahoo.com
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>



More information about the Seaside mailing list