Twitter, jQuery, and Performance

January 21, 2011 § Leave a comment

This writeup by John Resig concerning Twitter’s recent performance problems is an interesting read. It points out that some changes in jQuery 1.43 were responsible for part of the performance degradation, but the larger problem had more to do with how jQuery was being used. John points out two things that we would all do well to pay attention to.

  1. It’s a very, very, bad idea to attach handlers to the window scroll event.
  2. Always cache the selector queries that you’re re-using.

If you’d like to explore this topic further, this jQuery performance optimization video by Addy Osmani is great. You’ll need to block off half an hour or so to watch it, but it offers some excellent tips that are really useful if you’re in and out of jQuery on a regular basis.

Advertisements

imgsho.com – search-based image slideshow

November 4, 2010 § 2 Comments

I just published ImgSho.com, which is a search-based image slideshow. It allows you to do an image search for anything you like, and it will automatically cycle through the search results.

In order to make it, I hacked together the Bing search API (which is clean, nice, and easy to use) and the Galeriffic jQuery plugin (which works fine, but isn’t really designed for what I’m doing with it). Clearly there are some features missing that I will be adding, such as allowing you to restrict and filter your search. Also, the site is in serious need of an actual design. Despite that, though, the site is functional, and I thought I’d push something out. I haven’t spent too much time on it yet (obviously), but plan to put quite a bit of effort into polishing it over the next few weeks.

A little bit of backstory…

My daughter had her third birthday earlier this year, and one of the things she insisted on having was a Dora the Explorer cake (which I made for her, and am unabashedly showing off here.)

Making the Dora cake involved looking through many, many pictures of other Dora cakes online in order to get ideas. Perhaps predictably, my daughter enjoyed this a little too much, and looking at pictures of Dora cakes online soon became one of her favorite activities.

The problem with this is that looking at pictures of Dora cakes quickly grew tiresome (at least for the adult that was helping her), but she hadn’t yet learned how to navigate search results to see the pictures. I looked for an image search with a slideshow feature, but was not able to find one.

So, I made one . . . http://imgsho.com!

Let me know what you think – your feedback will drive what I work on. If you like the site, think it has potential, or would like some particular features, please let me know and I will do my best to add them. Either comment here or send me an email.

.NET, Javascript, jQuery, and you

October 8, 2010 § 5 Comments

I’ve been doing a lot of Sharepoint development recently. Now Sharepoint presents several challenges, not the least of which is that you don’t have access to the familiar code behind functionality in most cases. Custom development in Sharepoint consists of master pages and page layouts that contain web parts. Web parts have code behind files, but the pages don’t, and it’s unwieldy to develop custom Sharepoint applications with the familiar ASP.NET forms-based development model.

As such, I’ve relied pretty heavily on client side code to accomplish much of the functionality that I’ve needed. My friend Ted Hughes introduced me to some of these concepts when we were working together at Curtis 1000. He was working primarily with the ASP.NET MVC framework, which I had played around with, but hadn’t used extensively up to that point.

One of the things that surprised me so much was just how pervasive the jQuery framework was used within that MVC development paradigm. Coming from a background of traditional ASP.NET forms development, I thought I was being progressive by using the ASP.NET Ajax framework, but Microsoft quite quickly dropped the framework in favor of jQuery. This article by Dave Ward goes into some detail about why.

So, obviously I was aware of jQuery, and had used it in some limited capacity, but if you’re not using it regularly, you should begin doing so. Depending on your background, you may view javascript as a subpar tool for developing web applications. At one point, I would probably have agreed with you, but javascript is a real language – really! The productivity increase from using jQuery properly and intelligently is excellent.

Here’s another article by Dave Ward to give you just a little jQuery introduction. If you’re a book learner, I can recommend jQuery in Action, which I thought was thorough as well as quick and easy to read. Also, a simple web search for “jQuery” + “whatever you want to do” almost always yields a quick result. Or if you can’t figure it out, ask me.

Cheat sheets – web design / development

June 24, 2009 § Leave a comment

http://delimitdesign.com/design/14-incredibly-useful-web-design-cheat-sheets/

I don’t use all of these, but I love this jQuery cheat sheet.

Where Am I?

You are currently browsing the jQuery category at Mike Vallotton's Blog.