Standalone html builder (a la seaside without seaside?)
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent? I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar? This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc. Tim
Hi Tim,
On 28 Sep 2020, at 19:28, Tim Mackinnon <tim@testit.works> wrote:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
There is a minimal HTML builder to be found in ZnHtmlOutputStream. It is used for a couple of examples and default functionality of ZnServer. There are even unit tests. It is not the same as the Seaside HTML approach though. Sven
> On 28 Sep 2020, at 19:28, Tim Mackinnon <tim@testit.works> wrote: > > > I often find I want to build some HTML, but donât want the full seaside > - and was wondering if anyone has managed to extract it, or have something > similar? > I had a similar thought a few months back when I was looking for libraries to build a lightweight static site generator for personal use (I gave up due to time constraints) > Hi - has anyone ever managed to extract the html builder out of seaside - > or written something equivalent? > You might want to dip into the code for Amber Smalltalk. From what I recall, that system was able to extract the TagBrush and related classes -- Eric
Am 28.09.2020 um 19:28 schrieb Tim Mackinnon:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
Some years ago I was looking for something for the same purpose and looked at this library <http://smalltalkhub.com/PierceNg/WaterMint-HTML/index.html> <http://forum.world.st/Standalone-HTML-Model-td4967128.html> . I don't know if this helps. I also just loaded WaterMint and looked at the code. Other than that I had no experience. Franz Josef
Lots of good tips in this thread to explore - thanks everyone, Iâll report back on what I find works best⦠To Offray - with a template approach, I have often been tempted with that too but I like the idea of autocompletion and easier refactoring capabilities in Pharo⦠but you never know. Tim
On 28 Sep 2020, at 19:35, Franz Josef Konrad <franzl@fjkonrad.de> wrote:
Am 28.09.2020 um 19:28 schrieb Tim Mackinnon:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent? I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar? This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc. Tim
Some years ago I was looking for something for the same purpose and looked at this library <http://smalltalkhub.com/PierceNg/WaterMint-HTML/index.html> <http://forum.world.st/Standalone-HTML-Model-td4967128.html> . I don't know if this helps. I also just loaded WaterMint and looked at the code. Other than that I had no experience.
Franz Josef
On Mon, Sep 28, 2020 at 08:35:43PM +0200, Franz Josef Konrad wrote:
Some years ago I was looking for something for the same purpose and looked at this library <http://smalltalkhub.com/PierceNg/WaterMint-HTML/index.html>
Hi, I stopped working on that and just used what comes with Seaside. Seaside's HTML DSL works fine and has the nice add-on stuff like Torsten's Bootstrap 3 and 4. Only small road bump is form handling, where Seaside uses one or more dynamic variables. To keep it simple, for my non-Seaside apps, when rendering forms I use Zinc's HTML streaming instead. Mix and match. Pierce
if someone migrate it to github please let me know. S
On 28 Sep 2020, at 20:35, Franz Josef Konrad <franzl@fjkonrad.de> wrote:
Am 28.09.2020 um 19:28 schrieb Tim Mackinnon:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent? I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar? This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc. Tim
Some years ago I was looking for something for the same purpose and looked at this library <http://smalltalkhub.com/PierceNg/WaterMint-HTML/index.html> <http://forum.world.st/Standalone-HTML-Model-td4967128.html> . I don't know if this helps. I also just loaded WaterMint and looked at the code. Other than that I had no experience.
Franz Josef
-------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
I've been playing with something like that, but still using Seaside. I was calling it "WAStatelessApplication", which is nothing but a way to route requests to components, and have these components not using callbacks nor continuations. I'm really comfortable with the Seaside canvas way of doing HTML, so I'll eventually end up building it, but currently it is just another abandoned project. For a very few specific things, I used a RESTful handler and a WABuilder to generate the HTML output, using regular components to render it. Regards! Esteban A. Maringolo On Mon, Sep 28, 2020 at 2:28 PM Tim Mackinnon <tim@testit.works> wrote:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
Hi, I know this is not what you're asking for, but maybe some lateral thinking could help with your need. Jump to the end for the TL;DR suggestion or bear with me some paragraphs for a practical example. In our project about "IndieWeb with Brea", we use Pandoc and some external tools to produce the web site you see in [1] from Markdown files in [2] combining them with templates done is Mustache[3], as the one in [3a]. Everything is orchestrated by the minimalist Pharo based Brea CMS[4] and produced using interactive Grafoscopio[5] notebooks and stored in Fossil[6] SCM, which proves timelines[6a], user management, permissions and wiki like views of each page (click on the top right corner Icons of each page to see it). It has been a pretty agile experience and kind of our "pocket infrastructures" approach to decoupled/headless CMS, even before we knew about them (and their rising). [1] https://mutabit.com/repos.fossil/indieweb/ [2] https://mutabit.com/repos.fossil/indieweb/tree?type=tree&name=docs/es [3] https://github.com/noha/mustache [3a] https://mutabit.com/repos.fossil/indieweb/doc/trunk/docs/es/pagina.mus.html [4] https://mutabit.com/repos.fossil/brea/ [5] https://mutabit.com/grafoscopio/en.html [6] https://fossil-scm.org/ [6a] https://mutabit.com/repos.fossil/indieweb/timeline [7] https://github.com/pillar-markup/MicroDown We use Pandoc because of historical reasons and because we need YAML metadata headers, multiformat support including PDF export with custom pre-processors (Pandoc filters). But, at some point I would like to use Microdown[7] as a pure Pharo native format when Pandoc is not available or as a replacement/complement for Pandoc filters. So, my lateral thinking suggestion is why not to avoid HTML altogether? Mustache and Microdown could take you far regarding light web deployment and development. Cheers, Offray On 28/09/20 12:28 p. m., Tim Mackinnon wrote:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
Hi Tim, To build HTML I use the HtmlElement in https://github.com/jgfoster/WebGS <https://github.com/jgfoster/WebGS>. James
On Sep 28, 2020, at 10:28 AM, Tim Mackinnon <tim@testit.works> wrote:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
Hello, I am using https://github.com/JanBliznicenko/eleven for one of my projects. It is also a full framework, yet much simplier than Seaside and stateless and I believe only the HTML building functionality can be used indpendently. Example: htmlObject := HtmlBody with: (HtmlDiv class: 'content' with: (HtmlAnchor new href: 'https://pharo.org'; targetBlank; with: 'Pharo website'; yourself)). String streamContents: [:stream | htmlObject renderFor: nil on: stream] The nil I am passing in the last line is there in place of an ELRequest entity and is not needed for simple HTML tags without custom components. You might check it out. Be aware that my former colleague created it for our specific project and I have never used it in any other place, so I just HOPE it would work like I imagine. It is also not documented or tested at all. Best regards, Jan Tim Mackinnon wrote
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi Jan, Nice work, the "Eleven" framework goes in the direction of what I was experimenting with for Seaside, but instead of trying to introduce that in Seaside without breaking everything else (as I failed to some extent) you went directly to replace and redo most of the stuff there (some with simplifications). It's nice to see that you have ideas like OneTimeCallback and a FormHandler in it, because I had something similar going on. I didn't understand why you have a CSRF list of tokens in the Session. Thinking of Seaside, I think this would be something nice to introduce in Seaside 4.0 :-) Regards! El mar., 29 de septiembre de 2020 05:38, Jan BlizniÄenko < jan.bliznicenko@fit.cvut.cz> escribió:
Hello,
I am using https://github.com/JanBliznicenko/eleven for one of my projects. It is also a full framework, yet much simplier than Seaside and stateless and I believe only the HTML building functionality can be used indpendently.
Example: htmlObject := HtmlBody with: (HtmlDiv class: 'content' with: (HtmlAnchor new href: 'https://pharo.org'; targetBlank; with: 'Pharo website'; yourself)). String streamContents: [:stream | htmlObject renderFor: nil on: stream]
The nil I am passing in the last line is there in place of an ELRequest entity and is not needed for simple HTML tags without custom components. You might check it out. Be aware that my former colleague created it for our specific project and I have never used it in any other place, so I just HOPE it would work like I imagine. It is also not documented or tested at all.
Best regards, Jan
Tim Mackinnon wrote
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
There have been some excellent suggestions in all of this - and I also came across HttpView2 as well. I am a bit spoiled for choice it seems - so will start trying out a few and will report back. We may also use this topic as a follow-on conversation from the UKST talk from Cincom about building web applications, if people have time afterwards. Thanks again everyone. Tim On Tue, 29 Sep 2020, at 1:03 PM, Esteban Maringolo wrote:
Hi Jan,
Nice work, the "Eleven" framework goes in the direction of what I was experimenting with for Seaside, but instead of trying to introduce that in Seaside without breaking everything else (as I failed to some extent) you went directly to replace and redo most of the stuff there (some with simplifications).
It's nice to see that you have ideas like OneTimeCallback and a FormHandler in it, because I had something similar going on. I didn't understand why you have a CSRF list of tokens in the Session.
Thinking of Seaside, I think this would be something nice to introduce in Seaside 4.0 :-)
Regards!
El mar., 29 de septiembre de 2020 05:38, Jan BlizniÄenko <jan.bliznicenko@fit.cvut.cz> escribió:
Hello,
I am using https://github.com/JanBliznicenko/eleven for one of my projects. It is also a full framework, yet much simplier than Seaside and stateless and I believe only the HTML building functionality can be used indpendently.
Example: htmlObject := HtmlBody with: (HtmlDiv class: 'content' with: (HtmlAnchor new href: 'https://pharo.org'; targetBlank; with: 'Pharo website'; yourself)). String streamContents: [:stream | htmlObject renderFor: nil on: stream]
The nil I am passing in the last line is there in place of an ELRequest entity and is not needed for simple HTML tags without custom components. You might check it out. Be aware that my former colleague created it for our specific project and I have never used it in any other place, so I just HOPE it would work like I imagine. It is also not documented or tested at all.
Best regards, Jan
Tim Mackinnon wrote
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi jan can you do a PR to add eleven to the awesome list? S
On 29 Sep 2020, at 10:37, Jan BlizniÄenko <jan.bliznicenko@fit.cvut.cz> wrote:
Hello,
I am using https://github.com/JanBliznicenko/eleven for one of my projects. It is also a full framework, yet much simplier than Seaside and stateless and I believe only the HTML building functionality can be used indpendently.
Example: htmlObject := HtmlBody with: (HtmlDiv class: 'content' with: (HtmlAnchor new href: 'https://pharo.org'; targetBlank; with: 'Pharo website'; yourself)). String streamContents: [:stream | htmlObject renderFor: nil on: stream]
The nil I am passing in the last line is there in place of an ELRequest entity and is not needed for simple HTML tags without custom components. You might check it out. Be aware that my former colleague created it for our specific project and I have never used it in any other place, so I just HOPE it would work like I imagine. It is also not documented or tested at all.
Best regards, Jan
Tim Mackinnon wrote
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
-------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
Jan BlizniÄenko wrote
...HtmlDiv...
Cool :) I've often felt a suspicion that the lack of logical HTML domain objects leaves a hole in the possibilities for declarative style / meta info ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi Tim. My two cents: I am using XML Writer (from the catalog) and i am really happy so far. El lun., 28 sept. 2020 a las 19:28, Tim Mackinnon (<tim@testit.works>) escribió:
Hi - has anyone ever managed to extract the html builder out of seaside - or written something equivalent?
I often find I want to build some HTML, but donât want the full seaside - and was wondering if anyone has managed to extract it, or have something similar?
This combined with Renoir from BA-ST would give a good little light weight web potential to run with Zinc.
Tim
participants (14)
-
Eric Gade -
Esteban Maringolo -
Franz Josef Konrad -
Jan BlizniÄenko -
monty -
Offray Vladimir Luna Cárdenas -
Pierce Ng -
Santiago Bragagnolo -
Sean P. DeNigris -
Smalltalk@JGFoster.net -
Stéphane Ducasse -
Sven Van Caekenberghe -
Tim Mackinnon -
Torsten Bergmann