Re: seaside Digest, Vol 105, Issue 11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: seaside Digest, Vol 105, Issue 11

Ted Wrinch
Message: 5
Date: Fri, 9 Sep 2011 07:02:16 +0100
From: Nick Ager <[hidden email]>
Subject: [Seaside] canvas translator & new version of Seafox
To: Seaside - general discussion <[hidden email]>
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I've been working on an html -> canvas translator….


This is great Nick! I was thinking that I needed the very same app and was considering using Soup at some point to knock one up. Thanks very much for providing a useful piece of the web dev kit needed for Seaside.

T. 

Ted Wrinch 

On 9 Sep 2011, at 10:28, [hidden email] wrote:

Message: 5
Date: Fri, 9 Sep 2011 07:02:16 +0100
From: Nick Ager <[hidden email]>
Subject: [Seaside] canvas translator & new version of Seafox
To: Seaside - general discussion <[hidden email]>
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I've been working on an html -> canvas translator. Have a look at:
http://seafox.seasidehosting.st and click on "Canvas translator". Then in
another browser tab bring up your favourite web page (e.g.
http://www.seaside.st/) highlight a section and copy. Then return to the
"Canvas Translator" and paste into the text box below the default "Rendered
html" tab. Be amazed as the html is automatically translated into Seaside
canvas rendering methods. All the tabbed views are editable and you can
switch between them, allowing you to edit in one and see the translation in
another. For example try editing some raw html and flip to the canvas view
to see the translation to canvas methods.

The translator is based on the parser I created for the Seafox Firefox
plug-in. You can download a new version of the plug-in. Improvements
include:

* Code formatting better conforms to Seaside's coding conventions.
* The plug-in now creates an editable syntax highlighted translation (if the
translation isn't highlighted by again - there's an occasional weird
first-time only bug)
* There's a small test-suite for the parser

You can load the code into your Seaside image with:

Gofer it
squeaksource: 'Seafox';
 package: 'ConfigurationOfSeafox';
 load.
(ConfigurationOfSeafox project version: '0.2-baseline') load.

Note: I've tested mainly on the Mac in Safari. I'd be interested to hear
different platform browser combinations work.

Nick


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside Digest, Vol 105, Issue 11

Nick
Hi Ted,

This is great Nick!

Thanks
 
I was thinking that I needed the very same app and was considering using Soup at some point to knock one up.

What is Soup?
 
Nick


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside Digest, Vol 105, Issue 11

Boris Popov, DeepCove Labs (SNN)
1. A liquid dish, typically made by boiling meat, fish, or vegetables, etc., in stock or water
2. A substance or mixture perceived to resemble soup in appearance or consistency

/sorry

Sent from my iPhone

On 2011-09-09, at 8:16, "Nick Ager" <[hidden email]> wrote:

Hi Ted,

This is great Nick!

Thanks
 
I was thinking that I needed the very same app and was considering using Soup at some point to knock one up.

What is Soup?
 
Nick

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Fwd: seaside Digest, Vol 105, Issue 11

Ted Wrinch
In reply to this post by Ted Wrinch
Further thoughts occur. This could help ease the acceptance of Seaside in some commercial environments as it should make it easier to add html from designers' files into Seaside html code. In the absence of a tool like this it might appear that template file technologies, like ASP.Net and RoR, provide a much more natural way to do this. 

T.

Ted Wrinch




Begin forwarded message:

From: Ted Wrinch <[hidden email]>
Subject: Re: seaside Digest, Vol 105, Issue 11
Date: 9 September 2011 13:12:46 GMT+01:00

Message: 5
Date: Fri, 9 Sep 2011 07:02:16 +0100
From: Nick Ager <[hidden email]>
Subject: [Seaside] canvas translator & new version of Seafox
To: Seaside - general discussion <[hidden email]>
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I've been working on an html -> canvas translator….


This is great Nick! I was thinking that I needed the very same app and was considering using Soup at some point to knock one up. Thanks very much for providing a useful piece of the web dev kit needed for Seaside.

T. 

Ted Wrinch 

On 9 Sep 2011, at 10:28, [hidden email] wrote:

Message: 5
Date: Fri, 9 Sep 2011 07:02:16 +0100
From: Nick Ager <[hidden email]>
Subject: [Seaside] canvas translator & new version of Seafox
To: Seaside - general discussion <[hidden email]>
Message-ID:
<[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I've been working on an html -> canvas translator. Have a look at:
http://seafox.seasidehosting.st and click on "Canvas translator". Then in
another browser tab bring up your favourite web page (e.g.
http://www.seaside.st/) highlight a section and copy. Then return to the
"Canvas Translator" and paste into the text box below the default "Rendered
html" tab. Be amazed as the html is automatically translated into Seaside
canvas rendering methods. All the tabbed views are editable and you can
switch between them, allowing you to edit in one and see the translation in
another. For example try editing some raw html and flip to the canvas view
to see the translation to canvas methods.

The translator is based on the parser I created for the Seafox Firefox
plug-in. You can download a new version of the plug-in. Improvements
include:

* Code formatting better conforms to Seaside's coding conventions.
* The plug-in now creates an editable syntax highlighted translation (if the
translation isn't highlighted by again - there's an occasional weird
first-time only bug)
* There's a small test-suite for the parser

You can load the code into your Seaside image with:

Gofer it
squeaksource: 'Seafox';
 package: 'ConfigurationOfSeafox';
 load.
(ConfigurationOfSeafox project version: '0.2-baseline') load.

Note: I've tested mainly on the Mac in Safari. I'd be interested to hear
different platform browser combinations work.

Nick



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside Digest, Vol 105, Issue 11

Paul DeBruicker
In reply to this post by Nick
On 09/09/2011 08:17 AM, Nick Ager wrote:
>
> What is Soup?

Beautiful Soup is a python HTML parser for malformed HTML:
http://www.crummy.com/software/BeautifulSoup/

The Smalltalk port is here:
http://www.squeaksource.com/Soup.html


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: seaside Digest, Vol 105, Issue 11

Nick
In reply to this post by Ted Wrinch
This could help ease the acceptance of Seaside in some commercial environments as it should make it easier to add html from designers' files into Seaside html code. In the absence of a tool like this it might appear that template file technologies, like ASP.Net and RoR, provide a much more natural way to do this. 

Exactly my motivation for building it was:
1) Make the canvas API more approachable for developers who know html - "what's the Seaside equivalent for <xxxx> </xxxx>"
2) Ease the designer -> developer workflow.
3) Eliminate one of the arguments against using Seaside from developers who are used to template based frameworks.

There's a presentation I gave in Barcelona, at last year's ESUG - http://www.slideshare.net/nickager/seafox - it's a little out of date and focuses on the firefox plug-in rather than the online translator, but provides some background.

Nick





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside Digest, Vol 105, Issue 11

Nick
In reply to this post by Paul DeBruicker

Beautiful Soup is a python HTML parser for malformed HTML:
http://www.crummy.com/software/BeautifulSoup/

The Smalltalk port is here:
http://www.squeaksource.com/Soup.html

I didn't know about that. I took the approach of using the browser's html parser and walking the DOM in javascript to provide the translation. That way the browser handles any malformed html, but the down-side is the parser is written in javascript not Smalltalk...

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside