Archive for the 'AJAX' Category

All the Cool Kids use bitly.tv

It was a huge week at bit.ly. At the beginning of the week Google and Facebook launched URL shorteners at the same time we were launching bit.ly pro. As if that wasn’t exciting enough, I also launched my first product experience for bit.ly known as bitly.tv.

The response to bitly.tv has been very exciting and positive. It launched as part of labs.bit.ly, where I hope to be involved in many future experiments with bit.ly data. The bitly.tv User Interface is very fun and extremely different from anything I have built in the last few years, I had the opportunity to really flex my AJAX application skills.

The app uses quite a few of my favorite libraries and JavaScript projects, including jQuery, SWF Address, SWF Object and a few plugins I wrote specifically for bitly.tv. I also got my first taste of writing Python for a production level project as well as using the Tornado framework. In addition, I got the opportunity to finally use the new Google Closure Compiler. All in all, I think all of these technologies are excellent and make writing apps fun.

I also learned some extremely valuable lessons about the jQuery animation code and DOM interface. During the prototyping phase of bitly.tv, I noticed that jQuery was consuming a considerable about of memory because my architecture was not caching references to DOM elements. Essentially, I was crawling the DOM looking for the correct rows and columns to transition on every mouse over and mouse out. This was very slow in FireFox, but not very noticeable from a user experience point of view in Chrome and Safari. To help alleviate this issue, I began storing the references to each row and column in an array then did a simple jQuery.inArray(); check to skip the DOM API completely. This reduced the number of internal jQuery calls from around 32,000 to around 4,000.

In addition to the above, I also helped speed up the jQuery animation code by skipping the standard jQuery().animate(); and going directly to jQuery.fx();, which also had a considerable impact on the number of internal calls jQuery needed to make. I don’t recommend doing this, however, as it could cause compatibly issues with future releases of jQuery.

Take a few minutes and check out bitly.tv. We are already planning bitly.tv 2.0, and I would love to include your feedback.

New Safari JS Engine?

Safari is getting a new JavaScript engine, thank god! Having suffered through some of the quirks of Safari, I am happy they are moving on. Maybe the new Squirrelfish engine will be more inline with Firefox or the dreaded Internet Explorer and eliminate some of the Safari specific workarounds (read: hacks) that have been added into so much of the front end code.

If we are all really, really lucky, maybe Safari/Webkit will get a new CSS engine too. Oh, happy days.

A foto eBook launch

http://myleslittlephotography.com/

I just finished installing the foto eBook software for Myles Little. This is the second domain running on the foto eBook beta version. Kenneth Dickerman’s site is also powered by the beta version of the software. The back end foto eBook application uses PHP, MySQL and JavaScript to allow photographers to manage their Flash galleries online from anywhere they have an internet connection.  The front end uses Flash, Apache mod rewrite and a CGI script to allow deeplinking into the flash movie. For instance, if Kenneth wants to send users directly to his Portraits Gallery, he can. I wrote a little about that technology in this post.

There is also still an alpha version of the software, which Sarah Sudhoff uses.  Sarah’s site has a custom Flash intro, which isn’t supported in the beta version, but will be in foto eBook 1.0.

JavaScript Prototype – My experiences

I’ve always liked the concept of the JavaScript prototype property. It wasn’t until my most recent project for AOL, and my journeys in Java and JSP, that I found a real use for it in my day-to-day coding. In the past, I wrote several prototype methods for the foto eBook application. Since then, however, prototypes have felt like more trouble than they’re worth.

The prototype property comes into its own when writing JavaScript in an object oriented manner. Object oriented code structuring is a great practice that Java forces you to adhere to. In PHP, it’s easy to write scripts that aren’t object oriented. Meaning, in PHP, you can get away with not writing classes for specific tasks. This is a bad practice, primarily because the code isn’t being modularized. So a task such as parsing XML isn’t encapsulated. This makes it difficult to reuse the XML parser inside of other projects.

Continue reading ‘JavaScript Prototype – My experiences’

Death of Gmail?

Well not yet, but I found that headline so catchy, I couldn’t resist. :)

This post is just a pointer over to Joel on Software’s recent post titled Strategy Letter VI. In his post, Joel explores the death of Lotus and rise of Wordperfect and what this historical reference might mean for AJAX web applications – using Gmail as an example. You’ll have to get past the first few graphs about the rise of Lotus to see the relevance, but it’s worth the read, but then again, there aren’t too many posts on that blog that aren’t worth your time.

I’m not sure Joel is aware of the Google Desktop SDK Google Web Toolkit. I’m certainly no authority on Google’s products, but I believe their SDK is Java-based and compiles down to HTML & JavaScript – something that Joel hints at as a solution for AJAX development in his post. When I played with the Google SDK, everything I built looked so much like Gmail, I couldn’t see how Google developers wouldn’t have used their own SDK to write the Gmail application.

P.S. read more about why writers & bloggers love catchy headlines and why it’s terrible for SEO in my That monster called SEO post.