XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Xlink Isn't Dead

On 9/26/06, Robert Koberg <rob@koberg.com> wrote:
> Peter Hunsberger wrote:
>
> > Although Microsoft may have got these two aspects more-or-less correct
> > they unfortunately did so with an implementation that gives you poor
> > reusability.  It's been a while since I attempted to use their
> > implementation but as I recall event mapping is cumbersome and there
> > is very little capability to exploit any kind of polymorphism.  In
> > particular, one should be able to define parameters (dynamic and
> > static) that are passed with the event notification to the handler, a
> > feature that is completely missing in the MS implementation.
> >
>
> FWIW, the dojo toolkit (ajax/javascript) has made a way to publish and
> subscribe to an object's events. For example you have some link/button
> object/widget where you define an onClick method:
> ...
> onClick: function() {
>    dojo.event.topic.publish(this.widgetId+"/onBeforeClick", {some:
> "set", of: properties});
>
>    //handle onClick
>
>    dojo.event.topic.publish(this.widgetId+"/onAfterClick", this);
> }
> ...
>
> then in some other code you can subscribe by referencing the identifier
> and giving it a handler function, like:
>
> dojo.event.topic.subscribe("metadata_page/onBeforeClick", setupMetadata);

We use Dojo.  The model is somewhat different; you're back to
programmatic attaching the events to the objects based on DOM
traversal (even if Dojo helps hide some of those details).  The MS
model Len was referring to is done by attaching the event handlers at
the CSS level.  There's really nothing else out there like it, but as
I said, the implementation leaves a lot to be desired.

-- 
Peter Hunsberger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS