Wednesday, October 4th, 2006

“Don’t Waste Time” with Graphical Ajax Solutions

Category: Editorial, Flash, UI, Usability

ZDNet’s Ryan Stewart argues against performing interactive graphics with Ajax (i.e. standard web technologies). The article relates to my post on different techniques for graphics with Ajax (covered on Ajaxian).

Michael responds that the main argument against Flash is the user base, then goes on to list the plusses and minuses of "richer plugins".

You simply should not be trying to create a rich, graphical experience in Ajax. The options (SVG, Canvas, VML, ect) are buggy, supported in different ways depending on the browser, and, for the most part, are a poor experience for both users and developers.

The kind of rich interactivity that Flash and Windows Presentation Foundation provide are going to be leaps and bounds ahead of what any browser technology can do, and that's why they will succeed. The web becomes richer every day. Video and Music are taking the web by storm, and with the surge in broadband adoption, people are making these things part of their every day web experience. Ajax applications can't take advantage of them in the way the Flash or WPF can.

Flash (more generally, Richer Plugins) was actualy one of the graphics techniques mentioned in the original article. It’s all about trade-offs. I’ve actually argued myself that Ajax developers ought to take Flash more seriously, as it’s an excellent complement to Ajax. Flash sometimes makes a nice sweet spot – with graphics and multimedia closer to that of the desktop than standard DHTML/Ajax, but still living in a web platform that’s often more convenient than the desktop. The two monster apps of the past 12-18 months, YouTube and MySpace, demonstrate the power of Flash and multimedia on the web.

The benefits of Flash over Ajax are self-evident and undeniable, but Flash comes with its own set of problems too – not every user has Flash installed, not every user has the latest version, not every network allows Flash applications to run, not every developer and company wants to commit to proprietary technology when viable alternatives are available. Ajax apps tend to be easier to degrade gracefully as well; Flash is more all-or-none.

What if I want to introduce a histogram to an Ajax enterprise app? I’ll happily use a DOM/CSS library like CSS Graphs. Or if I’m writing a Firefox extension, I might use a data: resource to create a whimpy graphic since I no longer care about portability or even extravagant display. Maybe I want a 16×16 heatmap next to each search result – I’ll draw it with a Canvas and keep all the search results in standard HTML. And so on. See? Competent developers don’t engage in dogmatic battles, because they know software is all about trade-offs. Many times, Flash wins. Many times, it loses.

Last word goes to Ryan:

Don’t waste time trying to build the next generation of the web with graphical Ajax solutions … you already have a solution, and it’s getting more robust by the day. As your web applications start to require a more rich environment, embrace Rich Internet Applications – you’ll be better off.

Posted by Michael Mahemoff at 4:44 pm
22 Comments

+++--
3.3 rating from 42 votes

22 Comments »

Comments feed TrackBack URI

I think this really depends on the application. Javascript (AJAX or not) is very well suited for producing office type applications. I’m currently working on what can most easily be described as a Visio app in JavaScript. I use Canvas / VML extensively to do things like connect elements, small drawings, etc. The development is going very smoothly. Granted, I wouldn’t use JavaScript for 3D or video, etc, but you have to know the strengths and weaknesses of what you’re working with.

Comment by Mark Kahn — October 4, 2006

This is a debate that Ryan and I engage in quite often and some of his points are valid. My big issue with Ryan’s take on things is that he seems to portray Flash/Flex as the solution for every form of RIA and IMO, its not. Ajax & DHTML libraries have more than proven their worth and have matured enough to provide VERY rich Internet experiences on the Web. I do agree with Ryan, though, that if you’re going to build a desktop app, then something like Flex/Flash, especially with Apollo, is better suited.

Comment by Rey Bango — October 4, 2006

Hmm.  Here’s another way of thinking about this.  Guys like Ryan Stewart don’t understand that the web is built on open standards, and that the web browser is a client that understands how to interpret and display those standards.  The standards themselves have matured greatly since the early-to-mid 1990’s, and more standards have been added to the web browser’s repertoire.  But the fact is that Flash is not a native content type that the web browser understands… it does so only through plugins.  Folks who argue that the rich-interface web should be built with native standards like JavaScript, HTML, and CSS are making the case for continued reliance on open standards in web application development.  Why?  I know the reason it matters to me is that I don’t want to see the web fractured along proprietary-standard lines.

Although Flash is widely deployed, well respected, and powerful, it’s not an open standard.  It’s a legitimate foundation for application development, but it’s not web-based development… web as in World Wide Web… as in Tim Berners-Lee and his NextStep HTML browser.

At least Flash is cross-platform, however.  To talk about Windows Presentation Foundation in the same breath with talk of web application development is simply a commercial argument for Microsoft Windows.  Folks who think this way don’t care about non-Windows platforms, and in fact would likely prefer that they just go away.

Apollo and Flex are more likely to work cross-platform, but they are still commercial products from one company–Adobe.  To allow any one company to usurp the power of open standards on which the web is built is simply to argue against the web browser itself.  Ever since Microsoft engaged Netscape in battle 10 years ago, companies have tried to lay claim on the “standards” for web development, and I sincerely hope that web developers continue to resist those efforts.

It may be that SVG and Canvas are too young to build fancy graphical apps with.  But they won’t be young for long!  In the meantime, I have no objection to pulling in a flash object now and then as the need arises, just as I think it’s fine to use java or QuickTime or other plugin objects.  But let’s remember they are plugins.  HTML does not plug in to Flash, folks… it’s the other way around, or it’s no longer a web application. 

Comment by Leland Scott — October 4, 2006

Agreed. This is a waste of time.
I have developed web apps in Flash and “Ajax” and I have to kinda agree with Mark Kahn on this one. Flash has its place and Ajax has its place. I recently deployed a Budget application that is reliant on Ajax. And the overall response to the new budget app is a good one. My take on Ajax is that is just another tool in the shed to use at your dispense – as long as the user experience is a good one. User experience people!
Keeping with the subject at hand, Graphical Ajax solutions, in my opinion is a waste of time. Flash has too many advantages to overlook. These “graphical Ajax solutions” are just javascript. Ajax is meant for sending data back and forth.

Comment by David Barber — October 4, 2006

Isn’t SVG pretty much dead now that Adobe is abandoning the plug-in?

Comment by phil — October 4, 2006

a flow charting tool could easily be done in flash (I am talking less than 10 lines of code easy… flash has its own drawing api… why reinvent the wheel unless as is in my case we cannot rely that the user is allowed to have flash installed on their system

Comment by Mario — October 4, 2006

“But the fact is that Flash is not a native content type that the web browser understands… it does so only through plugins. Folks who argue that the rich-interface web should be built with native standards like JavaScript, HTML, and CSS are making the case…”

You’re aware that browser extensions preceded JavaScript, right?
http://wp.netscape.com/newsref/pr/newsrelease67.html
http://cgi.netscape.com/newsref/pr/newsrelease28.html

The features on which the various deployed browsers have converged are great. For the leading edge, extending various browsers in a predictable way is great too.

jd

Comment by John Dowdell — October 4, 2006

I strongly support Leland Scott. The web, as we see today has evolved massively in terms of its interactivity is all because of the open standards. DHTML, CSS and now AJAX have made it more and more acceptable and the developers community have strived to make it all the more reusable and easier to maintain by providing libraries, frameworks. CSS now as we advocate its use over the older designs through the use of table elements is only becuase CSS is an open standard. Had it been propeirity then the web would have been hampered in its stead fast growth. I have read about SVG and have a strong feeling than it would not take much time to grow and capture the web as AJAX today. I support people who make technology available for the benefit of the world and its refinement rather than making the world come to them asking for it.

Comment by Nitin Pai — October 4, 2006

[…] I was quite irritated while readin this point in a post on ajaxian The kind of rich interactivity that Flash and Windows Presentation Foundation provide are going to be leaps and bounds ahead of what any browser technology can do, and that’s why they will succeed. The web becomes richer every day.Ajax applications can’t take advantage of them in the way the Flash or WPF can. […]

Pingback by Open vs Proprietary Standards « Nitin’s World — October 5, 2006

Ad phil: I agree that svg as plugin is dead idea. Real benefits come when svg gets integrated into browser dom, as it will in all browsers in the future. Having svg as a plugin then would be as silly as having an IMG plugin.

Comment by Ilkka — October 5, 2006

Ajax or Flash or Both or none.

Thats the debate we have been doing since long and I think there is no need. I think the choice is clear, it will be based on your requirement and expertise.

I do a lot of Flash and recently started doing some Ajax as well.
I started Ajax to learn the difference (or similarity) between what I had been doing in Flash all these years and what Ajax had in offer.

I started my Ajax experience by trying to Ajax the wordpress. This I did after I had sucessfully implemented a Flash interface for wordpress. While doing the Flash interface for wordpress, I figured out that the textfield component of Flash has lot of bugs (maybe they will resolve them in future but as of now, its buggy). Apart from that, the interface came up very well and I have created an opensource project on sourceforge for more people to get involved and refine it further.

So next, I thought, let me try an Ajax interface for wordpress and see if that turns out to be better. In a way, I encountered different problems. I can not bookmark or maintain back/next states. Secondly, I have to do a lot of CSS to make it look as pretty as Flash. Maybe because I know Flash better then CSS :) . So again a skill based opinion.

I feel one needs to make the tradeoff based on the requirements and skills that they (or their team) have.

Comment by Sajid — October 5, 2006

Competent developers don’t engage in dogmatic battles

[…] Competent developers don’t engage in dogmatic battles, because they know software is all about trade-offs. Many times, Flash wins. Many times, it loses. I find this article pretty interesting. It is said : bq.. The benefits of Flash ove…

Trackback by in progress — October 5, 2006

Phil and Ilkka: SVG is most certainly *not* dead; FF 1.5 and Opera 9 support it natively (mixed documents), and Safari + KHTML is coming soon (it’s in the nightlies).
And to those who think WPE is going to be a Windows only thing–MS announced a while ago that they are working on the runtime for OS X.
My only real beef with Flash at this point is that it remains timeline-based, which (to me) is odd when you are touting it as an app development platform. Especially when it’s so close to a pure runtime :)

Comment by Tom Trenka — October 5, 2006

Speaking as someone who writes SVG for a living, SVG is dead. Yes, it’s nice that Firefox and some others (sort of) support it natively. But IE will never do so, because they’d rather have the world move to XAML, and that pretty much seals the deal.

I view the future of SVG the same as VRML is now – used in some niche applications, and useful as a common 2D vector file format, but that’s about it.

Comment by el j — October 5, 2006

[Tom said:]My only real beef with Flash at this point is that it remains timeline-based,[…]

I dont think any highly interactive Flash application or Flash RIA developer uses timeline these days. Use of timeline is timited to those who like to use extensive animations.

Most of the code is written in custom classes and use of external data source and shared libraries etc etc…

Comment by Sajid — October 5, 2006

“…(SVG, Canvas, VML, ect) are buggy, supported in different ways depending on the browser…”

“…Windows Presentation Foundation [is] going to be leaps and bounds ahead of what any browser technology can do…”

I was trying to figure out where the logical disconnect in Stewart’s argument was…. and there you have it.

That, and even with SVG being “dead”, it’ll be at least another 18 months to 2 years before the “IE on Vista” market share exceeds that of browsers with SVG and Canvas support…. unless your site’s address ends in “microsoft.com”.

(but for what it’s worth, I think Flash is the only sane way to do anything on the web that requires sound or video, so my hopes rest on Gnash eventually becoming useful.)

Comment by raindog — October 5, 2006

A proprietary platform is always alluring because of it’s consistency and integration. Flash is an awesome platform, and is really the best choice for a lot of things. However, it’s important to realize that one company can never provide everything we need. A Flash monoculture would slow down development and would make us dependent on a monopoly. Granted, Adobe already enjoys near monopoly status in a lot of areas, and they have proved to be much better stewards of best-of-breed products than, say, Microsoft. Even so, open standards provide the only means of true collaborative improvement of the web.

Comment by Gabe da Silveira — October 5, 2006

The trend I’m seeing for a balance pretty much split down the middle, either people want the additional richness of Flash and Flex or they want to support OSs other than windows, don’t like plug-ins for admin reasons and don’t to entrust a critical application entirely in the hands of the owner of the dependent plug-in.

I get flash for presentations, it does a great job. But if you’re going to require a plug-in, using Java on the client for applications surely makes more sense. I guess Flash is just simpler to program, shame really Java never took off like Flash.

In answer to your comments about the usability and programmability of SVG, JS, VML, etc, certainly the usability difference is clear., but in large enterprises you’d be surprised what a huge issue plug-ins are and that they are usually more of an issue than the usability.

Various libraries are emerging to address the issues for developers. Take mxGraph – http://www.mxgraph.com. It uses the native mechanisms in the browsers to provide interactive diagramming. The API is simple and the library takes care of the browser-specifics out of sight. This is the kind of library that we’re seeing being developed now, also think dojo. As a few more libraries appear and mature, the development side will become a lot easier. And as long as the graphical requirement of an application are not vastly complex, I think this route will become a viable solution for 50-60% of browser based applications.

Comment by David Benson — October 6, 2006

How many of those saying that Flash is platform independent have tried visiting websites using Firefox under Linux with the Flash plugin? I can say I have and it is not a pleasant experience.
1. Flash under Linux is only at version 7. Those websites where 9 is needed therefore do not work.
2. I have come across websites (e.g. sci-fi.com) where the text and images in the flash object is non-existant, it is really interesting when you click on what looks like blank space to have a pop-up or new page load.
3. Flash 7 uses a now defunct method to send sound to the speakers. You have to jump through hoops to install the old sound system and even then, my experience is that, the sound works sporadically.
As a Linux user my advice would be to stay as far away from Flash as you can.

Comment by Antony — October 6, 2006

[…] Don’t waste time with Ajax Solution […]

Pingback by Ajax Or Flash « JusStore — October 9, 2006

lol this is a funny discussion. AJAX is here to stay. Its platform independant and it can be modified on the fly, unlike flash. Flash requires you download a plugin, which means security risk, which mean undesireable. Hell how do we know that Adobe isn’t hiding trojans in there? heh, ok I’m being cynical but you get my point.

AJAX combined with SVG/VML can do shit load of things and its faster than mxgraph, as one user here referred to. In fact mxGraph is sub-par when you compare it to performance of the same type of app built with SVG/VML such as this site:

http://www.cumulatelabs.com/draw/draw.html

Comment by Peter — March 12, 2007

And whats even funnier is that people think XAML will be the demise of svg, do they even know that XAML is basically SVG with a new name space. How easy would it be to add an abstraction around that? ( I believe there are people already working on svg to xaml translation). And given the fact that WPF/E and consequently XAML is javascript accessible dom so you can write XAML code using just textpad… its not svg but flash that has to be worried.

Comment by sartre — March 12, 2007

Leave a comment

You must be logged in to post a comment.