WABrush vs. WATagBrush

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

WABrush vs. WATagBrush

Sean P. DeNigris
Administrator
What is the difference? They seem to be parallel hierarchies describing
similar things, but with subtle differences e.g. WABrushes DNU #ensureID.
Thanks!



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Seaside-General-f86180.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: WABrush vs. WATagBrush

Esteban A. Maringolo
Hi Sean,

On 28/08/2018 09:54, Sean P. DeNigris wrote:
> What is the difference? They seem to be parallel hierarchies describing
> similar things, but with subtle differences e.g. WABrushes DNU #ensureID.

This is not an official reply since I didn't build the hierarchy, but as
I understand it WABrush is the "abstract" implementation that provides
the building blocks to do the kind of "nested" rendering (`with:`) that
characterizes Seaside.

While WATagBrush is meant to be used in a WATagCanvas only, the same way
WAJsonBrush is meant to be used in a WAJsonCanvas.

I think that hierarchy might have some historical influence, becase in
previous Seaside versions the html canvas was actually XHTML, which was
a subset of XML.

And my memory might be flawed but waaay back (circa Seaside 1 or 2) the
only distinction was between "single" and "compound" brushes, but other
than for dates or time inputs that rendered several fields together with
a single callback I've never seen it used elsewhere.

Regards,

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

Re: WABrush vs. WATagBrush

Johan Brichau-2
In reply to this post by Sean P. DeNigris
Hi Sean,

I’m also not the author but I don’t understand why you say there is a ‘parallel hierarchy’.
WABrush is the superclass of a WACompound and a WATagBrush. A WATagBrush always produces a single tag, while a WACompound is a composition of multiple tags.
In that sense, the structure can be seen as a composite design pattern.

In our app, we have several subclasses of WABrush and WACompound to implement recurring html structures. This makes it possible to simplify our rendering methods for html patterns that occur frequently throughout our app.

Is this an answer to your question?

cheers
Johan

> On 28 Aug 2018, at 14:54, Sean P. DeNigris <[hidden email]> wrote:
>
> What is the difference? They seem to be parallel hierarchies describing
> similar things, but with subtle differences e.g. WABrushes DNU #ensureID.
> Thanks!
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Seaside-General-f86180.html
> _______________________________________________
> 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