Archive for category jQuery

Sprinting new concepts

I decided to do a sprint this weekend, I’m currently working on my bachelor project so I didn’t want to have some big project floating around at the same time, but I needed to do something different so I decided to come up with a new (to me) concept.

I love data and trying to figure out what to do with it, so the natural choice was to find some sort of free data and (ab)use it in a very simple page/web app. The Norwegian Public Roads Administration, or Statens Vegvesen as they’re called in Norway, have an XML feed available with all the information about the roads in Norway (closed roads, weather conditions and so on).

By using CakePHP to convert it to JSON and cache it to avoid getting banned for DoS’ing their server, and jQuery for the front end, it took 3 days (including horse riding, football(soccer) on TV, gaming, etc) to get everything up and running.

Overall doing this sprint gave me some useful information:

  • Programming too much makes it hard to sleep
  • When you sleep, you dream about code
  • Keeping the code maintainable when on a tight deadline can be a challenge, even when its only yourself you have to kneel down and apologize to from the bottom of your heart.
  • At the very least, add comments shortly after implementing something (useful after some sleep!)
  • Sometimes development can be fun, if you can tear yourself away from the worries about security flaws, browser incompatibilities, LOLcode and the kind of feedback which only is appropriate in TV-shows about cooking.

Anyhow, my sprint project:

https://github.com/bovan/Trafikkmeldinger

No Comments

Dojo vs jQuery in a jQuery based system

I recently had to evaluate which JavaScript framework/toolkit/library I wanted to use for developing a workflow engine inside a system that already uses jQuery.

Using jQuery would include less files and have (hopefully) no chance of conflicts. However, 1 year into the future, when I’m most likely not working here at CERN, what would happen if the system that my application is embedded inside would be updated with a newer jQuery version?

As one doesn’t know the changes in future versions of jQuery (I’ve seen plugins break before), one could run into the risk of having the embedded application stop working, because it wasn’t updated along with jQuery.

This makes a strong point for my development using Dojo instead. Dojo uses it’s own namespace, and if one updates jQuery it shouldn’t affect the Dojo-application. Add to the fact that with Dojo one have less need for 3rd party plugins, as it has got so much more included in the package, and the survivability of the application should be longer.

No Comments