We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Codev Web>NakedMeta (30 Sep 2004, CrawfordCurrie)
Tags:
create new tag
, view all tags

Expose the Meta object to plugins

For a long time the plugins have been forced to interpret %META tags in topic text, because the TWiki::Meta module interface was undocumented, and therefore hard to use. Never mind that parsing %META: tags is twice as hard as using that interface!

As well as cleaning up the interface in the LocationLocationLocation patch I've documented it, and in theory when (if) this patch is applied, that reason disappears. This would permit the recoding of plugins so they don't need to know about %META (sigh of relief) and can flexibly add/remove meta-data they require from/to topics.

The first question is how we get the documentation for the TWiki::Meta module to sit alongside the TWiki::Func documentation in the release, for potential plugins authors?

In the Store module, the code goes through stunningly inefficient hoops of fire to add %META: back in to the topic before calling the beforeSaveHandler. Other handlers may do the same sort of thing - I'm not sure. The second question is whether it is acceptable for the beforeSaveHandler to be recoded to pass the TWiki::Meta object to the plugin, instead of going through the hoops of fire.

If I don't get any counter-arguments, I'm going to do it anyway, and tag any plugins it breaks for the author's attention.

-- CrawfordCurrie - 29 Sep 2004

Before you start coding away, please read SimplifyInternalMetaDataHandling and PluginApiForHandlingMetaData

-- PeterThoeny - 30 Sep 2004

OK, I had read them before and just had a more careful read, but there's nothing there that leaps out at me. Was there something specific you wanted me to be aware of?

I haven't actually written any code; all I have done to date is to clean up and document the existing interface to Meta to the extent that it could be published. it isn't any safer, or any easier to use, because it seemed pretty safe and easy to use as it was, and leaving it alone seemed like the lowest risk route.

-- CrawfordCurrie - 30 Sep 2004

 
Topic revision: r3 - 30 Sep 2004 - 17:38:14 - CrawfordCurrie
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback