Don,

You're right about there being only a two-way split. I've looked in the archives and found as long ago as 2002 Howard described "invisible instrumentation" as being "a term for how Tapestry HTML templates maintain WYSIWYG editor compatibility". So, as you say, my 2nd and 3rd styles are both examples of invisible instrumentation.

Regarding "embedded components", I'd offer the suggestion that we can think of invisible instrumentation as being achieved by embedding components in regular HTML elements. Tapestry recognises the embedded component at runtime by the presence of a namespaced type or id attribute, eg. t:type="foo", and/or t:id="bar". I dunno, maybe "embedding" is ambiguous.

Geoff

On 28/06/2008, at 2:59 AM, Don Ryan wrote:


On 26 Jun 2008, at 23:31, Geoff Callender wrote:

<snip>

Really there are 3 styles and I think the doco has slipped up on them. Weren't these the terms being used a while back...

- Components as elements, eg. <t:pagelink page="Index">Home</ t:pagelink> - Embedded components, eg. <a t:type="pagelink" t:page="Index" href="#">Home</a>
- Invisible instrumentation, eg.  <a t:id="index" href="#">Home</a>
        with
        @Component(id = "index", parameters = {"page=Index"})
        @SuppressWarnings("unused")
        private PageLink _index;

I don't recall this three-way split being introduced. In fact, the second and third are, to my understanding, both examples of what has been termed "invisible instrumentation". You can add just a t:id or just a t:type or you can add both. In cases where you have added a t:id without the t:type, you must include the annotated field in the page class.

But really, my point here was to that I think the terminology needs to be improved, to help newcomers get to grips with the framework more quickly. (There's nothing like a slightly inaccurate piece of terminology to cause newbies to hit roadblocks.) I would contend that the above three terms are all quite poor: "Components as elements". Well, all components correspond to some element in the template, so this isn't being specific at all. The issue is whether they're Tapestry elements or HTML elements. "Embedded components". Embedded in what? The template? Then ditto as to the previous point. "Invisible instrumentation". As I pointed out in my previous post, both techniques for instrumenting a Tapestry template are invisible in a rendered browser view, so this is again a bad piece of terminology.

I think that the Component Templates page in the User's Guide could do with a re-write to reflect the two possible ways of instrumenting a template:
(i) Adding Tapestry elements
(ii) Adding attributes to HTML elements
These two terms are the best I can come up with to express the fact that there are two ways of doing it. (Maybe someone can be more succinct and accurate.) Also, I think this should be near the top of the Component Templates page, rather than explaining templates in terms of Tapestry elements and then have a quick "oh, by the way, there's also another way of doing it..." near the bottom. I'd be happy to contribute a draft.

Don.
This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to