We’ve. Got. Ideas.

Goodbye Flash, hello jQuery

Goodbye Flash, hello jQuery
Published August 3, 2009 by Chris Griffin Comments: 5

As someone who works on the web on a daily basis, I know I’m supposed to affect an aloof, jaded attitude towards the eye-candy aspect of the web.  A sort of “been there, done that” vibe.  I should probably be saying “Sure, that’s a nice example of a fully interactive user-defined multimedia interface – if you like that sort of thing.”  The sad fact is, more often I’m like an ADHD kid off his medication – easily distracted by quick movements or something shiny.  I still find myself fixated on even the simple aspects of online animation – repeatedly clicking on drop-down menu navigations while chanting softly “menu goes up, menu goes down…”

Surely there can not be a more quintessential example of a cheesy animated .gif than the infamous bouncing ball.

Surely there can not be a more quintessential example of a cheesy animated .gif than the infamous bouncing ball.

But because of this fascination with online animation, over the years, I have tried to keep up-to-date with the latest technologies and techniques for creating animations for the web.  Years ago, options were limited.  Of course there were animated .gif files, but as the digital equivalent of flip-books, they were inherently restrictive and not especially interactive.  Or you could work with java applets, but those involved an unfamiliar programming language to learn, the cpu requirements were often unrealistic (for the time), the viewer needed the correct version of java on their machine, etc.  The results for java were fairly hit or miss.

For easy web animations, Macromedia Flash (later bought by Adobe) was pretty much the only game in town. Used primarily for simple animations based on motion tweens, Flash was easy to learn, didn’t require a heavy-duty processor and was widely supported even in its early days.  Flash enjoyed quite a heydey as the default for online animation and quickly and continually expanded its capabilities to become an object-oriented programming environment capable of complex animations, pulling dynamic content from external sources, video and audio playback, 3D animation, etc.  For a while, there was a trend for building out entire websites completely in Flash, full of motion and interaction and shiny bits and baubles.  Needless to say, I fell in love with it and used Flash at every opportunity for several years.

Then came the advent of three little letters which caused me to question my Flash fixation – SEO.  Google and other search engines came on strong and suddenly everyone was concerned about Search Engine Optimization – where does my site rank?  Flash is strong in many areas, but a core weakness has always been that the content inside flash apps is largely inaccessible to Search Engine Robots.  So, with few exceptions, the entire body of content on full Flash websites is basically invisible to Search Engines.

Now, there had been an alternative to Flash that had been quietly simmering in the background that suddenly seemed a lot more appealing – javascript animation (not to be confused with java applets – I never understood why the two were named so similarly when they had nothing in common).  Several competing and cooperative javascript libraries appeared on the scene, which allowed web developers to take standard SEO accessible HTML content and animate it using client-side javascript code.  Some of the early javascript libraries were MooTools, Scriptaculous, and Prototype.  I used each of these for various projects without favoring any of them.  There were some cross-browser issues, but for the most part, I was able to achieve simple animation effects with relative ease and without sacrificing SEO.

Then I happened upon jQuery and fell in love all over again.  The jquery javascript framework was lightweight and easy to code for.  It has an ungodly amount of developers providing open source examples and tutorials and more extensibility plug-ins than you can shake a stick at.  I was up and running and animating within a matter of minutes – all while maintaining SEO friendly site content.  jQuery has become my defacto javascript animation tool – I use it for accordions and tabs for better organization of page content, slideshows for product galleries, drawers for hiding and showing page elements, navigation dropdowns, etc.  And these applications just scratch the surface of its capabilities.

Now, to be fair, there are a number of things that jQuery – or any javascript library –  isn’t great at and Flash still takes the prize.  Javascript animation is generally fairly simple in nature and is more often used for User Interface elements rather than complex, image heavy animations.  There are definitely instances when one technology is a better fit than the other.  Still, there are areas of overlap that used to be dominated by flash animation and now can be handled rather easily by jQuery.  Check out the following comparisons as offered by DLL at LogicPool (http://logicpool.com/archives/30).

The Pros & Cons of using Flash vs Javascript:

Flash Pros Flash Cons
  • Extensive features
  • 3D Capabilities
  • Consistent appearance in supported browsers
  • Supports vector artwork
  • Built-in UI & other features
  • Many free and Commercial tools available
  • More font options
  • Not compatible with all browsers including iPhone, cells phones, PS3, PSP, PDA’s
  • Moderate learning curve to use
  • Cost of purchasing Flash software
  • Possible problems with users that have older versions of the Flash Player
  • Potentially large file size
  • Possible security issues with Flash Player
  • Tracking stats for Flash elements is limited
Javascript Pros Javascript Cons
  • Small size
  • Using jQuery or other libraries reduces the learning curve
  • Hundreds of free professional quality programs
  • Can add interactivity to web page elements and tags
  • Skinnable Form Components UI
  • Compatible with more browsers than Flash including iPhone, cell phones, PS3, PSP
  • Features not as extensive as Flash
  • Complex features may not perform as quickly as flash
  • 3D features are limited
  • Users can disable Javascript support
  • Source Code Not Protected

When to use Flash vs Javascript:

Application Flash Javascript
Slide Show X
Form Validation X
Dropdown Menus X
Tabbed Panels X
Popups & Tooltips X
Expandable/Collapsible Elements X
Video/Audio Player X
Complex Animation X
3D X
Complex Multimedia X

The available applications for  jQuery are growing daily and I look at it as in being in an adolescent stage of development, much as Flash was when it was primarily used for tweening animations.  Given another year or two, jQuery will certainly gain more ground and expand its capabilities.  Flash will likely always have its place, but even now there are jQuery scripts being used to control flash apps. (Has the student become the master?)

Designers, developers, end-users – what do you think?  Has Flash had it’s time in the sun? Are the growing capabilities of javascript animation the better alternative and will they eventually be advanced enough to overthrow Flash as the dominating force in online animation?  Or should we relegate javascript animation to niche User Interface elements and stick to Flash for the major eye-candy?

I’ll be eagerly awaiting your response.  In the meantime… (menu goes up, menu goes down, menu goes up…)


This post is closed to new comments.

5 Responses to “Goodbye Flash, hello jQuery”

  1. Josh Gibbs said:

    Another cool thing that people are starting to use is HTML 5. It takes a lot of those “flashy” elements everyone is so keen on and makes it REALLY good for SEO.

    • Jennifer Hoy said:

      HTML 5 does have some excellent features. Unfortunately, most companies need to wait for IE6 to perish before they can take full advantage of these.

      It is a hopeful look at where the web will head next, though.

  2. Bill Cokas said:

    Ah, understood. Sounds like another jquery “pro” and Flash “con.”

  3. Bill Cokas said:

    Fascinating history lesson. I feel like I can at least talk about these things now and sound authoritative. Note the judicious use of the word “sound.” However, you brought out SEO as a principal difference between Flash and jquery up front, yet it doesn’t rate a mention in the comparison chart. Relative to the other chart pros/cons, is it a negligible factor when deciding between the two?

    • Chris Griffin said:

      SEO was my personal reason for looking for alternatives. We had actually produced several full flash sites that were visually impressive and highly interactive and performed very well in all areas except one – generating traffic. Since search engines don’t see full flash sites very well, the sites never ranked very well on search results pages. That continues to be a problem, though some search engines now have limited capacity to catalog flash content. Similarly, we have created a number of sites in the past which used flash for the main navigation system to achieve a particular effect. Since the pages are only partially flash-based, search engines were able to find the sites without much difficulty. However, even when search engines found the site, they were unable to correctly follow the main navigation since the search bots don’t read flash well, and the cataloging of the site stopped at the home page.

      So I would say SEO is an important factor when comparing the two.

      As an aside, I’d like to mention that the charts are not entirely inclusive. If you’ll notice, one of the cons for javascript is that users can disable javascript support. What isn’t mentioned is that users can also disable their flash plug-ins, effectively killing any flash animations as well.