[Seaside] Seafox HTML -> Seaside render methods translator

Frank Shearar frank.shearar at angband.za.org
Sun Aug 1 20:02:35 UTC 2010

On 2010/08/01 21:16, Nick Ager wrote:
> Hi
> I've attached an initial release of a small side project I've been
> working on. It's called Seafox and it's a Firefox extension which
> translates HTML into Seaside render methods. It's far from perfect but
> hopefully useful in this initial version. To install, File->Open from
> within Firefox. A Seaside star-fish icon should appear at the bottom
> right of the browser. Open a page of html which contains some html you
> want to embed in a component. Press the "Seafox" button and a new tab
> will appear with a Seaside translation of the html.
> Why? The background to the project is that often when I try advocating
> Seaside to my non-Seaside developer friends, they protest that Seaside
> won't fit into their workflow. Their excuse is that they receive html
> from their designers then use that as their template. I know that
> templates vs Seaside render methods + CSS is a well trodden path (and
> don't want to reopen that discussion), instead I thought if I could make
> something that would give non-Seaside developers a start by taking a
> page design and translating into Seaside render methods that
> might alleviate one perceived obstacle.
> I've uploaded the code to http://www.squeaksource.com/Seafox. There's a
> ConfigurationOfSeafox in the metacello repository [1]. To install the
> code download ConfigurationOfSeafox and execute:
> (ConfigurationOfSeafox project version: '0.1') load
> The code registers a Seaside app at http://localhost:8080/seafox  which
> shows the html->seaside element mapping and the attribute mapping as
> well as giving a link to download the extension, The extension is
> dynamically created, and if you run it in Firefox, installed.
> I've also uploaded the application to:
> http://seafox.seasidehosting.st/ You can install the extension directly
> from there.
> Warning: I installed the code in the Seaside30rc to test it. The image
> froze when I tried browsing to the app. I haven't noticed this problem
> in non-one click installations, but wouldn't load it into you main
> working image.
> I should reiterate that it's not a perfect mapping, but hopefully it
> might be useful to a few people.

I'd been thinking of, just to get to grips properly with Seaside, 
rewriting a PHP application. And this might be just the guy to help ease 
the way. I just installed it into one of Andreas' Seaside 3.0 one-click 
images, and it works great: firefox has the plugin installed, and I can 
see the output!

Also, thanks for writing something that says when something bad happens:

<div id="pageTitleR">&Uuml;ber <b>Frank Shearar</b></div>


html div id: 'pageTitleR'; with: [
   html text:'Über '.
   "Unrecognised element 'b'"
   (html tag: 'b') with:'Frank Shearar'


<img src="/images/16/Report.png" title="" width="16" height="16" 
border="0" align="absmiddle" ></img>


html image width: 16; height: 16; "unmapped attribute->" attributeAt: 
'border' put: '0'; "unmapped attribute->" attributeAt: 'align' put: 
'absmiddle'; title: ''; url: '/images/16/Report.png'.

(Yes, I know img tags don't have align or border attributes anymore. 
It's inherited legacy stuff.)

So again, thanks Nick!


More information about the seaside mailing list