Sean,

the question is of course - is it the HTML only model you are
interested in or is it rather a 'web document model' (i.e. something
which is displayed in a browser) thus including HTML and CSS.

--HH.

On 9/9/17, H. Hirzel <hannes.hir...@gmail.com> wrote:
> On 9/9/17, Sean P. DeNigris <s...@clipperadams.com> wrote:
>> I'd like to create HTML via a DSL, like Seaside's canvas builder, but
>> without
>> loading a whole web framework. Any ideas?
>>
>
> Hello Sean
>
>
> 1.
> One idea is _not_ to go for a HTML builder DSL but for a document
> model plus a generator.
> The generator is a visitor for the document object model.
>
> There is the Pillar document model and a visitor already in place.
>
> The current challenge  - actually it is not a challenge - but just
> needs some time -  is to extract the Pillar document model (easy) and
> the tests (needs more time)  so that it can be loaded as a stand-alone
> package.
>
> See a long discussion in a thread in August about including Pillar in the
> image.
>
> The same then applies for the HTML generator. That is just a file-out
> from an image which has the full Pillar loaded.
>
> So IMHO it is not so much about inventing a new HTML builder DSL but
> to "mold" exisiting infrastructure into shape.
>
> This has the advantage that you can generate other representations easily.
>
>
> 2.
> Another idea is to look at HttpView2 done 10 years ago and come up
> with a revised version.
> http://wiki.squeak.org/squeak/182
>
>     "No Files. No HTML. Just Smalltalk code!"
>
> A builder: http://wiki.squeak.org/squeak/637
> The element hierarchy: http://wiki.squeak.org/squeak/840
>
>
> Discussion
> ---------------
>
> Comparison of 1 and 2
>
> In 1 you use a document model (DOM) which is independent from the
> representation in HTML code.
>
> Than you have a generator generating the HTML code. The DOM is
> actually quite close to the HTML DOM.
>
> The Pillar DOM is nicely supported in Pharo with the inspector.
>
> Neither 1 nor 2 actually take CSS into account. An issue which is
> important when you generate web pages.
>
> So from the Smalltalk data model point of view (web document modeling)
> you have a Smalltalk object which is then rendered on two output
> streams
>
> - HTML
> - CSS
>
> Things get interesting in particular if you want to generate
> responsive web sites.
> The you need to do more on the CSS side and with generating pictures as
> well.
>
> Regards
> Hannes
>
>>
>> -----
>> Cheers,
>> Sean
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>

Reply via email to