Item11103: Document best practice of using GluePlugin
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: GluePlugin
Branches:
HughBlair is doing some fine work sharing solutions to problems in Support web, but is using
GluePlugin syntax, I guess because it describes itself as a kind of "best practice" for writing readable TML.
I doubt we need
GluePlugin any more, except perhaps for some macros which aren't
Foswiki::Func::registerTagHandler()
'd
I must admit, I also fell into the trap of using
GluePlugin in 2009, because (a) most of the topics we shipped with Foswiki 1.0 were written on a single line, and (b) the description to
GluePlugin seems to imply that you need it in order to write readable TML split over multiple lines.
I've fixed (a) by re-writing most of the topics included with Foswiki to split long macro expression over multiple lines, but we still need to fix (b), or we will keep getting new users who pick up this plugin based on its description.
--
PaulHarvey - 04 Sep 2011
Former issue title was: "Please update
GluePlugin topic to warn people that this plugin is usually NOT necessary".
No, don't do that!
GluePlugin still is required for writing readable foswiki tables or break long html tags into multiple lines. Sad truth however is that people overused it.
I have seen horrible TML with glue all over the place. These wiki apps are still not recovered making them maintainable again.
Downgrading this to low as this is more of a documentation issue what actually
is best practice using glue chars.
--
MichaelDaum - 04 Sep 2011
Cool, okay then. However, I personally use trailing \ to break up long HTML tags and TML tables
But I can see that
GluePlugin would be useful for that.
--
PaulHarvey - 05 Sep 2011
A trailing \ is much too fragile as any extra whitespace after it will break the thing thus driving users crazy.
--
MichaelDaum - 05 Sep 2011
Thanks Gents, exactly as Paul says I was just doing what I thought the docs suggested I should do. I don't want to set a bad example so I'd be happy to do things differently once I have a clear idea of what that
is... I'm not 100% clear yet whether trailing
\
or glue
~~~
notation is the way to go, it sounds like either is possible so long as the pros/cons of each are considered. Some clarification in the documentation would be great...
--
HughBlair - 05 Sep 2011
Best practice is: try not to use it. This plugin has lost its importance. Foswiki core's parser allows linebreaks and whitespaces in enough spaces to craft readable code without
GluePlugin.
--
MichaelDaum - 14 Oct 2013