All posts tagged 'jquery'

Dojo and fixing bugs

After complaining about Dojo taking so long fixing bugs I found another quite interesting bug report this morning:

Dojo Bug 7844:

  • Filed almost 2 years (!!!) ago
  • Filed against Dojo 1.2
  • Not fixed with the latest 1.5 release, but moved to 1.6 now

Yes, fixing the dojo.back in IE8 is definitely harder than the 1/2 line fix for 8546, but in the end dojo.back is “supported” since Dojo 1.0, so I’d expect that Dojo is tested against new browsers and bugs are fixed in a timely manner…

Dojo 1.5 and open bugs…

And the saga continues… I reported a Dojo bug about scheme-less URLs in March (filed against 1.4.2)… now the brand new 1.5 has been released and the (simple-to-fix bug)… was not fixed.

Why? Well, I don’t know. Maybe because they don’t care? The comment in bug 8546 is:

It’s been open for 18 months, and it was pointed out to me as a bug by a large user of Dojo and jQuery. They reported the issue to jQuery, and it was fixed in 2 weeks, and we’re going on 18 months.

Sorry dojo, speed-wise you already lost, no matter what you do!

Scheme-less URLs in xDomain Dojo

Sometimes I have the feeling that the only large Web site that uses scheme-less URLs is the one I work with during office hours… because not a lot of Web sites use this handy feature which allows to include resources independent of the protocol (i.e. <link type=”text/css” rel=”stylesheet” media=”all” href=”//” /> – note the missing protocol). This works cross browser and is perfectly valid – and saves the hassle of security warnings in IE in case of secure Web sites.

Anyhow, when I used the jQuery library it turned out that these scheme-less URLs confused the .getScript function. The bug was easy to find and report and after some whining it got fixed. I mean, how hard is it? Fix the simple bug, add a test case to the unit tests (you do unit test, don’t you?), run the tests done.

Does not seem to be the case with Dojo, which experiences the same bug (already reported here and here). Not only that the bug is open since 14 month, this simple bug was reported in version 1.2.3 and won’t be fixed until version 2.0? Come on, you must be kidding! Signing up and submitting a comment or patch (1/2 line of code: || relpath.indexOf(‘//’) === 0 appended to the first if in the function _xdIsXDomainPath) is also not possible because the user sign-up leads to a 404 page. Uuups.

So I’ll end up with maintaining my local patch file, and hopefully I remember to apply the patch in case there is a future Dojo upgrade…

“jQuery for Absolute Beginners” Video Series

There are tons of jQuery tutorials available, but I just recently found out about the “jQuery for Absolute Beginners” Video Series, which has 15 online videos and, according to a good friend, teaches exactly what is needed to get started with jQuery.

So if you want to learn jQuery just fire up your browser and point it to the “jQuery for Absolute Beginners” Video Series.

Display Dojo tooltips based on the title tag

Recently I had to add nice tooltips to a larger Web application that is based on the Dojo framework. I thought “nothing easier that that”, as with jQuery I can do stuff like

with some (optional) parameters and that’s it. Unfortunately I had to learn from the various sources and samples that this simple feature is not supported out of the box by Dojo. There is a way of creating tooltips on the fly but there does not seem to be a ready-to-use solution which uses the title tag of the elements and shows a tooltip based on that.

So here is the code I came up with to display Dojo tooltips based on the title tag:

The code selects all elements with the class “withTooltip” and creates a Tooltip dijit for each of the found elements. It is important to notice that an ID is being added in case there is none – dijit.Tooltip requires an id and does not seem to work with classes or just an element being specified.

The jQuery Camp 2008 is over

The jQuery Camp 2008, which has been held today at the Stata Center at the MIT, is over. It has been organized by the creator of the library, John Resig – who did a great job – with the library and with the conference!

While John opened the day with news about the current jQuery status, planned changes, internals and notsowellknown features of the core he also mentioned:

“I haven’t done any serious Web development in a long time…”

Which obviously nobody in the crowd believed.

Afterwards other speakers talked about scalable applications, jQuery UI and jQuery Plugin development. At least in the advanced track the quality of the talks was pretty high, except for one exception, where downloading and installing the framework would have had the same effect… completely wrong for an advanced audience to just explain the basic samples delivered with the framework. Punished by typing noise (80% MacBooks, 20% others).

One of the highlights was the talk about processing.js, a port of the Processing visualization language, which clearly showed what is possible with todays JavaScript and current browsers (including IE!).

Overall a great day together with the jQuery community and the jQuery developers at the MIT! Looking forward to next years conference!

(Photo source)

jQuery is going to be used by Microsoft and Nokia

John Resig announced today that the jQuery library is going to be integrated into new mobile phones by Nokia and into Visual Studio by Microsoft.

Microsoft and Nokia aren’t looking to make any modifications to jQuery (both in the form of code or licensing) – they simply wish to promote its use as-is. They’ve recognized its position as the most popular JavaScript library and wish to see its growth and popularity continue to flourish.

This is great news for the future of the jQuery library! Congratulations!

Read the full announcement.

jQuery Conference 2008

The jQuery Conference is going to take place on September 28, 2008, in Boston. Finally the Conference Agenda was posted – containing a beginner and an advanced track, great speakers and interesting topics. To be able to choose tracks at the event just import this iCal agenda file and synchronize it to your mobile device. I’ll update the file as updates are released.

The Ajax Experience 2008 / jQuery Camp

End of September is going to be great – first of all there will be the Ajax Experience 2008 in Boston; on the day before the jQuery Camp is held, hopefully at the same place.
Both events feature a lot of interesting speakers, a lot of sessions and information useful for everyone working with Web technologies in the Web 2.0 world. Not easy to decide which of the up to four tracks to visit… cloning would be a great technology and very useful these days… So Tracie provided an iCal file of the conference agenda which can easily be imported into iCal or any other application which can read ics files. Not that it helps deciding which session to visit, but at least I know what’s going on and up to decide!


jQuery on the Server

Last night I had an idea about a project I’m working on and how to make this extensible and flexible by using JavaScript code snippets which are to be added to the Java code. Sounds like a crazy idea but I remembered Mozilla Rhino which allows executing JavaScript from within Java. Issue 1 solved.

Also I’m a great fan of the jQuery library and would most probably like to use it on the server side to perform modifications – saves a lot of time in working with the DOM. Luckily I also remembered a post of John Resig which explains exactly that issue (ok, Google helped me to find it :) ) – executing jQuery inside of Rhino. Using an application server like Jaxer is no option as the server environment is given. Issue 2 solved.

So, downloading Rhino, downloading env.js, downloading jquery.js, putting the sample together and, guess what, nothing worked. Uff. Even simple selectors like jQuery(‘div’).length always returned 0. After a little investigation I figured out that up to jQuery version 1.2.1 it worked like a charm, but the newer versions did not work anymore. But why? Hard to figure if there are not error messages shown.

What to do? Firing of a note to John Resig and – surprise – he wrote back within a few minutes, pointing me to a new version of env.js which also works with newer versions of jQuery.


So grab the new version of env.js and start using jQuery 1.2.6 on the server right now!