19 November 2007

Is the Writing on the Wall for AJAX?

Written by Richard Leggett ( Contact the author of this post )
Published on November 19th, 2007 @ 02:46:13 pm, using 1775 words, 5444 views

I try to remain open about technologies, particularly when speaking about technologies that a lot of my colleagues use for their “bread and butter". But I’ve made it no secret the last couple of years that for me the writing has been on the wall for AJAX. Really this has been my view since the first JavaScript/HTML menus appeared. I’ve felt there’s something very wrong with this picture. The sort of “innovations” you find on JavaScript related blogs feel a lot like taking a trip into the Computer Chronicles. It seems like the blind are leading the blind into a stagnating, crumbling mess of a future, desperately clutching onto the past rather than accepting new paradigms and making the web better for everyone (we’ll come onto accessibility later).

In my opinion one of the main reasons for the popularity of JavaScript is that it’s more accessible to the web neophyte. By accessible I mean you can start out with minimal effort and zero cost, merrily copying and pasting from someone elses pages and have your site looking like a teenage girl’s MySpace page in no time at all. Ok, so that’s a little tongue-in-cheek, but another reason is that you can mix JavaScript into an existing HTML website to improve or add to the experience, and HTML is great if you are after a semantic web, no-one can deny that. All in all it has been very successful, but it is showing signs of age and there are quite a few major obstacles in its way…

Stop the Emulation

Over the last few years, DHTML applications have imitated more and more of the sort of things we find in richer web apps; such as eliminating the “page” metaphor where sensible (and therefore the meaningless refresh), more efficient data loading, drag and drop, transitions, and so on. But that progress (or “catch-up") is slowing rapidly. We are reaching the limits of what various browsers can do natively, and it’s no good hoping they’ll bolt on lots of shiny new features, all in agreement; that would destroy the value a browser gives in the first place. What best of breed AJAX applications like Google Docs currently offer it isn’t even close to what people are starting to expect in a modern RIA. Isn’t time to stop crowbarring the proverbial round peg into the square hole, there are easier ways to do things that won’t cause you to lose your hair.

Problems Facing JavaScript/AJAX

The problem with AJAX is two-fold, at the very least. The first problem is browser fragmentation. Open web standards are a good thing if everyone adheres to them, but that is never going to happen ("purists"/"standardistas” should all take a reality check here). Microsoft’s Internet Explorer is still the most popular browser out there, but people are carrying on, blissfully unaware that Microsoft is investing a lot of time and money into more facilitating platforms, namely Silverlight and WPF. Like Flash, I refer to these as enabling technologies, their conception makes forward momentum possible. In version 1.0, Silverlight applications and games were driven by JavaScript, but let’s not be fooled here, the preferred way of developing with Silverlight will undoubtedly be via .NET (specifically the DLR). They aren’t doing this for fun, they don’t make tools to support JavaScript development, they make one kick-ass .NET dev environment. Of course AJAX.NET is the middle-ground that allows them to maintain the dependency on VS when doing any AJAX work by providing a value added offering. So with Silverlight I think supporting JavaScript is a smart business move, more marketing than anything else, particularly when you consider that they were competing directly with Flash, with all the DHTML/AJAX people as fair game. So as they have shown by not implementing a standard JavaScript VM (sorry, JScript!) in IE, and are wavering at the sound of JavaScript 2.0 (sorry, JScript.NET for IE8), things are not looking rosy for everyones’ favourite scripting language.

The second problem is that the combination of JavaScript and HTML is simply lacking in what you can actually do, the web is evolving much faster than the browsers can. To make up the shortfall people are using Flash for small specific tasks that the browser cannot do, like showing the right font, or half decent uploading of files. HTML wasn’t made for this purpose, we are hacking the hell out of HTML to get it to do the things Prototype/MOOTools/<insert-1-of-147-potentially-incompatible-variations-here> allow for. Some might argue neither was Flash, that’s true for the first few versions, but that’s not true any longer (the reason it has been able to shed this baggage is discussed later). Application development has been core to Flash and Flex for several versions, indeed, Flex was specifically created for that role. The browser is not the be all and end all. It is just one way of accessing “web” content, albeit the most popular one right now.

Limiting Factors

The browser is very limiting. This is primarily because *it* is actually *them*, and *they* have to move at the pace of the open standards or make an entire community of developers suffer even more headaches. Backwards compatibility is always a sore-point, but that’s usually delt with through a layer of abstraction (bytecode perhaps). Flash and Silverlight on the other hand benefit hugely from being (to some extent) “closed source", they can improve and evolve year on year without fear of revolt from the development community. Flash 1.0 content still runs as it did 10 years later, I found some Flash 3 content on the BBC website the other day, it doesn’t know that there have been countless browser releases since its conception… it doesn’t need to, that’s a big difference.

Anything that is “open” or led by committee moves very slowly. This is again a generalisation, there are several open source projects that have kept up the pace, but to be honest these are usually funded or motivated in some form by a commercial interest. This slow pace and time spent debating really goes against the grain when it comes to how fast technology evolves. Things simply get left behind and replaced with a better offer, and when the thing being left behind is your skill set, it’s time to take note.

But people are taking note. Finally I read an article on Ajaxian that took the issue seriously, yet almost none of the commenters did, heads buried in what they know they tried to dig the poster out of the hole rather than making the realisation themselves. It’s definitely worth the read for comedic value at least.

Solutions and Alternatives

So what tools do we have to build the new web? Flash, Flex, Silverlight, Air, Widgets, JavaFX, to name a few. When you see massively successful and future thinking companies like Microsoft, Adobe and Sun all investing heavily into something you should pay attention.

Still people think Flash is bad. There are some crazy misconceptions out there. Some of the more popular include…

“AJAX is testable, Flash isn’t” - Tell me that again when my unit tests have finished, or do you mean testing it in various browsers? ;)

“AJAX is SEO friendly because it gracefully degrades” - Fallacy. Here’s one of our latest sites, check it out without Flash or JavaScript enabled, Google likes it too, Flash deeplinks and all. Gracefully degrading is a bit of a misnomer. What we really want to do is make a site accessible to people and search engines. People with disabilities are usually served the search engine friendly version because most of the tools available are designed to work with HTML, just like current search engines. But this is not a problem, with a CMS this is easily achieved and as a result you get a more manageable site as a bonus.

“Flash is not as accessible” - I wonder if people are still reading Jacob’s 7 year old entry and thinking it still applies. Even complex Flash applications can be screenreader friendly (can DHTML?), alternatively offer a HTML version if it’s really suitable (sometimes I wonder why people want to make certain content accessible in the first place).

“AJAX doesn’t require an expensive IDE” - There are countless totally free pieces of software for all major platforms to enable professional Flash and Flex development. The SDK/compiler is also free.

It’s not just the aforementioned companies that know this. Google knows this, and is introducing more and more Flash into its web apps and services. But it’s not all about Flash. Let’s look at Google Android for example (something really groundbreaking in my opinion). Google’s Android OS uses a custom layer on top of a Java syntax to provide its UI and interactivity; you’d think that the king of all AJAX applications would have opted for DHTML if it really was the best choice. It’s not, it’s fast becoming one of the worst choices for applications unless you are an industry behemoth that can write perfect code and don’t want to make your clients hate you as you continue to charge them for needless maintenance year on year.

What Lies Ahead?

In all honesty I don’t want this to sound like a JavaScript (read: DHTML) bashing entry, I have spent a lot of time coding JavaScript and I think like many other technologies it serves a purpose and has been a real enabler in the past. On the flipside don’t let its current popularity fool you. COBOL remained “popular” (in one sense of the word) long after its hay day. Perhaps “JavaScript/DOM” guru’s will be able to eek out a rather obscene living in 5 years with the swath of legacy web apps that break when IE 12 comes out. Or maybe they will just replace them and be done with it.

Recently I was speaking about this subject with a fellow developer and they said -regarding the current lack of Flash developers- “it’s great for us though right?". In a sense yes, but there’s such a demand right now for good Flash and Flex developers that we could quadruple the number and there’d still be plenty of work for everyone. Interestingly I’m noticing colleagues that haven’t touched Flash before are downloading Flex Builder, and really enjoying it, perhaps Flex has finally made Flash seem more serious, maybe it’s just to avoid the confusion of an uncertain future.

As always, the most important thing has to be to choose the right tool for the job. But it still leaves the question, will AJAX and JavaScript be allowed to mature, or will its growth be stunted for the reasons discussed?

Comments, Pingbacks:

Comment from: Symbian
Gracefully degrading is important
PermalinkPermalink 19/11/07 @ 16:11
Comment from: cm
I WANT TO READ IT BUT ALL THAT WHITE TEXT ON BLACK MAKES my eye go crazy and I cnnot seee my comments
PermalinkPermalink 19/11/07 @ 20:01
Comment from: Timbot
Absolutely agree.
It is amazing how many old chestnuts are still floating around regarding development in Flash, and how they spill over onto the other newer runtimes as well. They simply don't apply any more.
From the developer's perspective, Flash has taken me places javascript never could have. I went to it primarily because of frustration with cross-browser problems (I didn't like writing the same code three times every time). Yes, there was an amount of pain at first, both from working in an unfamilliar environment, and also from spending some cash on the IDE. But when I did 'get it', Flash development took me to creative heights I could not have achieved elsewhere. I had to learn timelines...but just so happens timelines are used in 3D software, animation, non-linear editing. As the platform advanced, I had to learn OOP. Hey guess what, major programming languages like Java, C++ are based on OOP. What I'm saying is that as a creative professional, Flash has kept me learning, kept me exploring new concepts and software...and freed up a lot of my time that would have otherwise been spent trying to get my work compliant with unstable non-standardized browsers, which is a fact of life for the AJAX developer. Life is better!
PermalinkPermalink 19/11/07 @ 20:03
Comment from: Richard Leggett [Member] Email
Quick note to give my apologies for the legibility. I've been playing with the CSS and it needs tweaking. I've darkened the text, made the column width more narrow and fixed the comment form to help with the immediate issues. I'll work on the overall styles to make this text more readable asap.
PermalinkPermalink 20/11/07 @ 00:01
Comment from: Mike Brunt
This is a good article in my opinion thanks for taking the time to put it out. I worked as a ColdFusion consultant at Allaire when there was a small team trying to figure out what could be done by using ColdFusion and Flash in combination. Flash Remoting being an early used method. I have also labored through the DHTML era and turned cartwheels trying to get nested menus and other constructs to work reliably in different browsers. Nothing has really changed in my opinion and it is time and has been for a long time to stop trying to make HTML do things it was never created to do.
PermalinkPermalink 20/11/07 @ 01:17
Comment from: navot
I would like to draw your attention to another alternative which is a paradigm shift for AJAX front ends. One should be aware that I am not, and do not pretend to be objective, never the less I believe that one can judge for himself. Visual WebGui is an open source rapid application development framework for graphic user interfaces of IT web applications. VWG replaces the obsolete paradigms of ASP.NET in both design-time and run-time which were designed for developing sites, with WinForms methodologies, which were designed for developing applications. Thus enabling designer that was designed for application interfaces (WinForms designer) instead of a word documents (ASP.NET designer). This provides the developer with an extremely efficient way to design interfaces using drag and drop instead of hand coding HTML. Visual WebGui is an AJAX frame work that doesn’t expose logic, data or open services on client requests and therefore is not as vulnerable as common AJAX solution.. VWG presentation layer is de-coupled and instead of standard browser it can, and will run Silverlight.
NO!!! Visual Webgui is not!!
Not a component library – It is a complete revised approach to developing web applications.

not a JavaScript generator – It runs on the server controlling the browser using a small static JavaScript kernel.

Not for developing sites – It was designed to provide for developing IT web applications GUIs.

Not a closed / locked-in framework – It has many extensibility features, which allow integration of legacy resources (ASP.NET or DHTML resources) and the development of custom controls and behaviors.
Worth a look at www.visualwebgui.com,
PermalinkPermalink 20/11/07 @ 09:27
Comment from: Kevin Hoyt
Excellent food for thought, Richard!

When I read the post last night, I started writing a general comment to round out your discussion. What evolved was a full blog post of my own...

http://blog.kevinhoyt.org/2007/11/20/on-ajax-walls-and-writing/
PermalinkPermalink 20/11/07 @ 15:56
Comment from: Richard Leggett [Member] Email
Hi Kevin, First of all I thoroughly enjoyed reading your post. It certainly balances things out a bit. Of course I'm still skeptical with the mention of things like Canvas3D and SVG as emerging standards to enable the things we are building right now some time in the future, but hopefully we will get there and we don't end up with a whole load of VRMLs, I guess a lot of this depends on Microsoft. I also agree whole-heartedly that it's the user at the center of this, and we should always make full use of our collective/shared toolbox to give them the best experience. This post might have sounded a little one-sided in retrospect, but I like to do this sometimes just to persue a particular thought path. Thanks again.
PermalinkPermalink 20/11/07 @ 16:17
Comment from: Rick
Nice one Rich - hitting the nail on the head as usual. I came across this response (http://tinyurl.com/2wmrms) to Android though and it really got me thinking; particularly the points concerning installable applications and pixel graphics.
PermalinkPermalink 21/11/07 @ 10:07
Comment from: Anup Shah
Hi. Really interesting post.

A specific comment here about when what said of Flash, that "Flash 1.0 content still runs as it did 10 years later, I found some Flash 3 content ... it doesn’t know that there have been countless browser releases since its conception… it doesn’t need to, that’s a big difference."

Web development is (meant to be!) like that too -- html 3 sites still run, for example. For sure there are MANY sites that are IE only and won't work properly when the next versions come out, because the way they code specifically towards browsers rather than standards, etc, but html/css/javascript have always been designed to be backward compatible too (even JavaScript 2, according to Brendan Eich, who invented it).

Reality is of course not perfect, but tons of people have written about that so I won't here.
PermalinkPermalink 26/11/07 @ 18:24
Comment from: Kontra
In

Runtime wars (1): Does Apple have an answer to Flash, Silverlight and JavaFX?
http://counternotions.com/2007/11/15/runtime-wars/

and

Runtime wars (2): Apple’s answer to Flash, Silverlight and JavaFX
http://counternotions.com/2007/11/15/apple-runtime-answer-2/

I explored Apple's recent moves with WebKit 3.0 to accelerate the formation of a x-platform alternative to non-DHTML runtimes. It's not unlikely that Silverlight will remain predominantly Windows-only and JavaFX mobile-centric. Odds are better for Flash/Flex, but it will be eclipsed by OS X on Macs and iPhone and other post-PC devices from Apple to come. I don't see much that's a lock-in yet.
PermalinkPermalink 27/11/07 @ 09:50
Comment from: Foster
This post might have sounded a little one-sided in retrospect, but I like to do this sometimes just to persue a particular thought path. Thanks again.
PermalinkPermalink 25/04/08 @ 21:01
Comment from: Biley
I'll work on the overall styles to make this text more readable asap.
PermalinkPermalink 25/04/08 @ 21:02
Comment from: Tomelloso
Interesting post. Ajax is my alternative and for the moment work fine with my proyects. Also agree with need of make this more legible please. Thanks.
PermalinkPermalink 06/05/08 @ 12:13
Comment from: Steve Elliott Email
Great article and some fantastic input from Kevin. I can't see the end of Ajax, it is fantastic for minimising complicated processes and I hope it stick around for a while to come.
PermalinkPermalink 13/05/08 @ 22:40
Comment from: John Walters Email
Hi,
interesting read. The end of Ajax is not with us just yet. It still has a purpose and until something comes out that is consistantly better it will still have a use.
John
PermalinkPermalink 18/05/08 @ 13:07
Comment from: Anemo Email
last words - the question of the year!
PermalinkPermalink 17/06/08 @ 16:30

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

About

Richard Leggett is a Freelance RIA and Web Developer (download CV, skills/portfolio coming soon). He is co-author of Foundation Flash Applications for Mobile Devices (Friend of ED), an Adobe Community Expert and speaker at industry conferences and user groups.



July 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Categories

Miscellany

XML Feeds

Information

Contact the admin  /   b2evo template by Two18 Media