Hi John,
many thanks for checking out the manual.
> It's particularly cool that the $() shortcut works ala jQuery, an easy and
> familiar a pattern but I'm drawn to the compatibility tables of jQuery $ vs
> Qooxdoo $ and there are a number of differences that come up quite quickly.
> Even really simple and common things like .val(), collections, .css() have
> different method names. The docs say that Qooxdoo is intentionally more
> verbose than jQuery, citing the disadvantages to have too much implicit magic
> (I completely agree) and this is why there are differences – but I think that
> it's a mistake to use the jQuery namespace and replace it with something
> which looks like jQuery but isn't _quite_ compatible.
The documentation of qx.Website is outdated.
It refers to the old qx.Collection. Actually, we no longer overwrite $, that is
unless your build of qooxdoo includes qx.Collection.
The API of qx.Website changed considerably and centers around the q() method.
Here an example from the front page:
q.create("<h1></h1>")
.setHtml("Hello")
.setStyle("color", "blue")
.on("click", function() { alert("click") })
.appendTo("#container");
To learn more, take a look at the API documentation of qx.module [1].
> For newbies, it'll be easy (and understandable) to assume that $() ===
> jQuery() (or at least, jQuery compatible) and it will be confusing – google
> searches will have a similar problem distinguishing and it'll be virtually
> impossible for old hands to search for answers except via this list.
Absolutely.
> Although $() is a usefully terse syntax, how about something Qooxdoo-specific
> like $Q or even $$?
I find "q" even easier to type and read it as "query". And there's Q… [2]
> Also, there are thousands of jQuery plugins out there which are not
> compatible with Qooxdoo $() … but which might be compatible if there was a
> jQuery compatible $() shim in place between the plugin and Qooxdoo. It
> sounds that a jQuery compatible $() might be possible (although not
> necessarily as part of the Qooxdoo core, i.e. a contrib) which would be
> fantastic because of all the plugins that would bring to the Qooxdoo platform
> – but that's only a possibility if you use something other than $().
Actually, we are already experimenting with a two-way jQuery <-> (q) wrapper,
but have not decided yet if we want to follow the path. Being able to integrate
jQuery plugins to qx.Website is certainly very attractive goal. The issue I see
is that implementing a 100% compatible shim is pretty hard. I know of Zepto [3]
that is doing a pretty good job of providing a jQuery like API, but still its
far from 100%. We may need to go the other way round.
Regards
Tristan
[1] http://demo.qooxdoo.org/devel/apiviewer/#qx.module
[2] http://de.wikipedia.org/w/index.php?title=Datei:Desmond_Llewelyn_01.jpg
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel