Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

2007-09-10

Extending the Timetable Combinator

I received quite some feedback on the Timetable Combinator, and the number of accesses was quite motivating:

  • Saturday 15:00 - 0 hits
  • Sunday 16:00 - ~1200 hits
  • Monday 10:45 - ~2400 hits

So, I took some time yesterday to implement stuff.

Firstly, I listened to a request I received a few times: the possibility to toggle theoretical classes. It was quite easy, just inserting a parameter in a few methods.

The second improvement has more to do with jQuery and is performance-related. I noticed that when having too many URLs to load, the browser would eat up too much processing power and sometimes the server would refuse to serve some pages. So, I thought about implementing some kind of AJAX request queueing.

Then, I thought again and googled quickly for some implementation of AJAX request queueing for jQuery. It was very easy to find and worked like a charm. However, now the resources were being wasted, because one request at a time would take to long to complete if the URL list was too long. It took me some minutes to implement support for multiple queues, just check the source code if you're interested.

2007-09-08

Experimenting with jQuery

Today I concluded a little exploration journey through jQuery.

I already had some experience with Prototype (and Script.aculo.us, building the website of the Portuguese Museum of Ancient Art), so I had some expectations regarding jQuery. I have to admit that jQuery blew them away quite easily.

jQuery is more intuitive than Prototype in many aspects, allows developers to do more with less coding and already contains many effects that can be found in Script.aculo.us. The documentation is very complete (including useful examples) and, of course, supports plugins and provides AJAX to your applications.

The main advantage is precisely its "querying" abilities: it's very easy to find multiple elements on the DOM and manipulate them in various ways (including attributes and CSS). jQuery supports CSS expressions, XPath expressions and even some custom expressions (for example, to select all even nodes that match some expression).

To experiment with jQuery, I picked up something I did some time ago and turned it into what is now known as the Timetable Combinator :)

I'm sorry, I opened it with IE, Opera and Safari for Windows but I think it only works in Firefox. I think it wouldn't be too hard to cross-browserize it, but I don't have the time. If you want to take it to the next level, drop me a line.