[Seaside] Better selectors for jQuery script builders

Philippe Marschall philippe.marschall at gmail.com
Mon Sep 11 15:52:39 UTC 2017


On Mon, Sep 11, 2017 at 4:41 PM, Esteban A. Maringolo
<emaringolo at gmail.com> wrote:
> Hi all,
>
> From some time now, I want to have a consistent naming criteria for the
> selectors that return a JSObject or a JSFunction, and I'd like to know other
> ideas about naming them.
>
> I name all the HTML rendering methods with the `renderSomething...On:`, so
> "render" is always the prefix and the canvas (html) the last argument (being
> it a single argument, or more than one).

With you so far.

> And because of that I don't want to use 'render' as a prefix for the methods
> that create a script.
> So lately I'm using the "create...On:" pattern for these selectors.

I never thought of that but it makes sense. I'm not a particular
friend of the #create selector for this. #script On: or #jQuery On:
would be other options but but I'm not in love with these as well.

Cheers
Philippe


More information about the seaside mailing list