Search the web
Sign In
New User? Sign Up
xbl-developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
first post: What flavors of XBL are there?   Message List  
Reply | Forward Message #10 of 38 |
Re: [xbl-developers] Re: first post: What flavors of XBL are there?

Doug Schepers wrote:
> Hi, Jeremy-
>
> As I understand it, the advantage of shadow-trees is in their direct
> connection with the source elements, in terms of structure, semantics, and
> liveness.

Ah, yes, that makes sense.

One of my basic objections about the way this stuff is being engineered
is that everything you mentioned is dependent upon being able to
subscribe to changes. There's no reason to lock up this ability in XBL
alone; even within an XBL-implementation proper it would be very useful
to be able to explicitly say "call this code when this changes"; you
might want to make decisions about which callback gets registered, for
instance, or you might want to be able to respond to events not directly
connected to the nodes of this particular XBL object. (This came up for
me a couple of times when I wanted something like an overarching
"table"-type manager, with specialized and sometimes heterogenous table
"rows" and "cells", or when there was something that's a sibling in the
DOM tree that I wanted to attach to some other element's input.)

You are correct that at this time, I can't replicate that feature in
scripting. However, this is not a fundamental advantage of XBL and a
fundamental failure of scripting; this is a failure to expose the
relevant change events to scripting control.

I have also yet to encounter a need for any of that in practice, as a
web developer. Out of curiousity, have you *used* this feature in any
significant way? I'm certainly expecting the answer could be "yes", I'm
genuinely curious.

> I read your XBLinJS page, and the erm... "strongly worded warning"... You
> made some interesting points, but you were mostly attacking a particular
> implementation of XBL, and the very idea of using XML at all. I guess that
> I'm not sure how your library is like XBL. Without condemning your approach
> of converting data via JS (which I use myself), you are eschewing XML,
> removing the bindings, and creating a library (rather than a language). So,
> there isn't an X, B, or L. ;)

My library is like XBL because, excepting the shadow node feature you
mention above, it works just like XBL if you describe what you're doing
with XBL without explicit references to XML. You "create widgets" that
can "bind to nodes" and "respond to events", carry their own specialized
methods, can include each other, can do inheritance (although XBLinJS
gets JS's inheritance model which is unbelievably easier to work with
than the one in Mozilla's XBL), etc.. The design process is the same;
you don't slap down HTML and start hacking together Javascript and
hard-coded event handlers (the old way of doing such things), you create
"widgets" that are much better encapsulated and use those to create the
discrete behaviors you want.

That is, it does the same sorts of things with the same organizational
principles coming into play. Hence, XBLinJS. It is true that it has
neither X nor L (there is some "B", actually, but as there is no direct
browser support it's somewhat more manual, although easily automated;
and that's another thing the broser could support directly, instead of
locking the capability into XBL), but I consider that incidental to the
entire "widgets-in-DOM" that XBL defines.

For what it's worth, I have very little hope or intention of converting
anybody. Mostly I'd be happy if someday XBLinJS makes someone take a
fresh look at XBL and ask why certain things are so darned hard when
they don't have to be, and question whether the putative benefits of the
X outweight the costs.





Wed Apr 19, 2006 9:33 pm

jerfb
Offline Offline
Send Email Send Email

Forward
Message #10 of 38 |
Expand Messages Author Sort by Date

I count 4 different flavors: MozXBL1, MozXBL2, sXBL, w3cXBL2. This is not how they were/are originally named by the parties that designed them, but...
steltenpower
Offline Send Email
Apr 17, 2006
10:42 pm

Can we count XBLinJS as another serious flavour? http://www.jerf.org/resources/xblinjs/ The developer created it cause he doesn't like MozXBL: ...
steltenpower
Offline Send Email
Apr 19, 2006
11:59 am

Hi Ruud. ... I've wondered before whether an implementation of sXBL in script would be viable (to get more people to try using it in UAs other than Batik), but...
Cameron McCormack
heycam_yg
Offline Send Email
Apr 19, 2006
12:54 pm

... Interesting. If I'm reading the definition of "shadow tree" correctly, I consider it one of the *advantages* of XBLinJS that it uses *real* nodes and not...
Jeremy Bowers
jerfb
Offline Send Email
Apr 19, 2006
3:52 pm

Hi, Jeremy- As I understand it, the advantage of shadow-trees is in their direct connection with the source elements, in terms of structure, semantics, and ...
Doug Schepers
d_a_schepers
Offline Send Email
Apr 19, 2006
8:49 pm

... Ah, yes, that makes sense. One of my basic objections about the way this stuff is being engineered is that everything you mentioned is dependent upon being...
Jeremy Bowers
jerfb
Offline Send Email
Apr 19, 2006
9:56 pm

... In a word, encapsulation. Having the shadow nodes inside a shadow tree that is connected to the element, and not in the real DOM, affords some level of...
Cameron McCormack
heycam_yg
Offline Send Email
Apr 19, 2006
11:10 pm

Re: shadow nodes and event binding I think that the only things that you wouldn't be able to do with a Javascript implementation of an XBL would be obscuring...
Kurt Cagle
kurt_cagle
Offline Send Email
Apr 21, 2006
6:01 am

... Cameron, Not completely sure about that. I do agree that it would probably be fairly inefficient, but I'm not sure that a Javascript shadow tree ...
Kurt Cagle
kurt_cagle
Offline Send Email
Apr 21, 2006
5:48 am

... I don't think it would be that inefficient, but there'd be the issue of having things like: <svg ...> <g id="stuff"> <ex:star cx="100" cy="100"...
Cameron McCormack
heycam_yg
Offline Send Email
Apr 21, 2006
6:33 am

What if there was a central requirement that the shadow tree 1) had to be contained within the element, 2) had to be in a namespace with a different prefix...
Kurt Cagle
kurt_cagle
Offline Send Email
Apr 21, 2006
6:59 am

... I added the xmlns declaration to your first svg tag, because I think you need it and I need it for my point. This won't work. The 'abbreviation' of the...
Jeremy Bowers
jerfb
Offline Send Email
Apr 21, 2006
10:02 pm

... Yeah, it seems a bit dodgy somehow to rely on the prefix that was used (especially since the element may have been created in a namespace but without a...
Cameron McCormack
heycam_yg
Offline Send Email
Apr 22, 2006
3:08 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help