Drag and drop in the Reorderer
Colin Clark
colin.clark at utoronto.ca
Tue Oct 16 00:41:54 UTC 2007
Eli, Michelle, and all,
Lots of good points here. Some responses below.
Eli said:
>> Are we saying that we're leaving the field open once again, or are we
>> still looking for the holy grail of JS frameworks?
I have the feeling that a search for the holy grail of JavaScript
frameworks will end as most searches for holy grails tend to...
As you say, there are always going to be strengths and weaknesses to a
particular toolkit, and others will shine in particular areas. I agree
that there is a lot of benefit to consistency and coherence by choosing
a single framework.
As Michelle points out, there is an even larger can of worms when we
consider mixing and matching widgets from different toolkits. For
example, we see menu-like behaviour in lots of different
widgets: menu bars, combo boxes, and so on. If this low-level behaviour
varies between widgets culled from different toolkits, the user
experience will suffer as a result.
Logic that doesn't interact directly with the user, such as library
code, doesn't apply. Since Dijit widgets don't take advantage of their
own drag and drop library, we're probably okay to use jQuery's solution,
at least from the consistency perspective.
>> We're always going to find one framework that does X well while
>> another does Y well; while one has a great widget for W, another will
>> have an even better widget for Z. There is value in settling on a
>> single framework. One framework means one style of coding, one
>> learning curve, better interoperability,... Seems that the best thing
>> is to pick one framework because fits our needs the most closely, and
>> then fill in (within that framework) the functionality that is missing.
I agree with this for the most part. Indeed, I'd like to see Fluid work
closely with other JavaScript toolkit communities.
In this particular case of Dojo's drag and drop library, we were dead in
the water. With our first release approaching, we realized that Dojo's
current drag and drop solution simply won't work with many types of
markup. Since the Reorderer is intended as a general and reusable
solution, we needed something that doesn't place restrictions on the DOM
structure of orderables.
jQuery UI's library seems to have slotted into the Reorderer seamlessly.
Michelle is still working with the Dojo community to help suggest an
improved strategy for their library.
But in the interest of time, we've had to go with a mix-and-match
approach for now. The upside is that we'll deliver a fully functioning
Reorderer that can handle all kinds of markup. The downside is that our
download size is a bit larger as a result of the dependency on jQuery.
Perhaps this points to the viability of jQuery UI as an alternative to
Dojo, and I'm open to that possibility. But I'm still concerned about
the amount of work we'll have to invest into making their widgets
accessible. For the time being, Dijit still has a significant advantage
in this respect.
Colin
--
Colin Clark
Technical Lead, Fluid Project
Adaptive Technology Resource Centre, University of Toronto
http://fluidproject.org