A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Ajax vs Flash

  1. #1
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917

    Ajax vs Flash

    If you're interested in web application development I'm sure that you've heard of Ajax (Asynchronous JavaScript + XML).

    This new approach to creating interfaces and interaction on the web is based on:

    - using standards XHTML/CSS,
    - manipulation of page elements using the DOM
    - updated content and data exchange using XML and XMLHttpRequest

    Although the advocates of this system are promoting it as a collection of technologies working together, the key to ajax is XMLHttpRequest. This little fella allows the web page to exchange data with the server without reloading the page, all of this happens in the background, and the page can 'react' using javascript to alter page content utilising the DOM.

    I'm not going to go into a long-winded explanation of Ajax here, enough to say if you haven't heard of it you should do some research because it is the 'next big thing'. Take a look at google maps for the best example of Ajax in use today.

    What I'm interested in hearing from people here is how Ajax will effect the use of flash by web application developers.

    Take a look at this.

    That is the power of Ajax.

    Now, you might say well flash can do that, has been able to do that for a long time. And you'd be right. As far as I can see there's nothing Ajax can do that flash can't, and flash is certainly a 'cleaner' development environment, being a single technology with a purpose built development application.

    Some early examples of Ajax use flash as part of the toolbox, until recently flickr used flash on almost every page, alongside some nifty DOM tricks that enabled you to create/edit content on a page without reloading it, while XMLHttpRequest inserted your new data into the database invisibly to the client. I always loved flickr for their use of technology and page widgets that neither insult the user's intelligence, nor confuse them.

    But.

    Due to user demands Flickr (now owned by yahoo) is removing as much flash from the site as possible and replacing it all with javascript/DOM techniques instead.

    Why is this? Is it because flash wasn't working properly? Is it because people didn't have the flash plugin? No, none of this, people just didn't like flash. As one photographer/developer recently told me:

    I personally don't like it either. Actually, I believe the thing with Flash is all psychological. I <b>hate</b> seeing the loading screens. Reminds me back to the 32-bit videogame days or something.

    We're all used to JPG's scrolling down r 'unpixelate' themselves rather than seeing a loading countdown which seems to take forever, but really doesn't when compared to JPGs. It's all psychological. I hated having to check out that damn Flickr loading panel everytime I wanted to see a photo. Now I'm happy.
    The lead developer at Flickr, Eric Costello, said at a recent Ajax gathering that they had made the change because of user demand, and that replacing all the flash function with javascript had been difficult, especially with cross browser problems. They have succeeded admirably in doing so but to my eyes the javascript just isn't as 'cool' as the flash, it flickers and jumps about a bit, where flash was just smooth.

    This raises a couple of questions.

    Firstly, is Ajax what users, who really do seem to have a continuing dislike of flash (*), have been waiting for? A way to say that flash just isn't necessary any more, even if programming in javascript is messier and more problematic for browsers?

    And secondly, isn't the very concept of Ajax, getting away from the browser reloading page model, just recreating all those same criticisms of flash? Where people complain they can't bookmark anything, or that interfaces don't behave as they expect them to? Derek Powazek, a developer at the Ajax meeting said this on his blog:

    Stop thinking about the web in terms of pages that go from a server to a browser, and instead think of pages as collections of chunks that can each go to and from a server as needed.
    I understand the excitement that this is all now possible within a traditional browser page, as long as it's a modern browser, but hello, hasn't this been flash's functional model for the last few years? Hasn't this been the concept that has had all flash application developers excited since the coining of the term Rich Internet Application (RIA), since we first saw that MM pet store application example?

    The answer is yes, it is. So what's so much better about Ajax? A collection of technologies (that may or may not include flash) that are thrown together and made to jump through hoops to work together in a way that flash, as a single technology, was designed to do.

    Well, there are advantages to the XMLHttpRequest/javascript/DOM/css/xhtml way of doing things.

    - more consistent interface elements with the rest of the browser, whatever browser it may be (**)
    - a standard/free HTTP server backend
    - more support for the tools, which aren't commercial protected as the SWF format is.
    - data also seems to move faster using XMLHttpRequest than it does trafficking through flash, no matter what method you're using.

    Mainly though, what I think we're seeing is developers who have always been hacking away at the browser/html model, doing cool things and neat tricks, finally able to bring everything they've been learning together and create this new paradigm for web applications, a paradigm that takes nothing away from their validating XHTML and CSS. I can understand this, I love standards design and will never create another table-based layout again, and I will no doubt be using an Ajax foundation for a project soon. But I can't help but think that none of this is new. The way it's being done is different, but flash has been the answer to all of the problems Ajax is being hailed as overcoming for years.

    What has held flash back from being accepted is a prejudice on the part of certain developers and on the part of the user. I can understand this prejudice, and I even share some of the concerns about the flash RIA way, such as bookmarking pages, accessibility of design and code - remember that with Ajax everything is laid bare to be examined by anyone, but isn't the Ajax way subject to all these same problems and shortcomings? How will users react to Ajax-driven sites? I guess time will tell. My bet is that the lack of flash on the page, reasonable or not, will make users far more likely to accept this 'new' way of doing things, of their form submission being validated as they type it, etc.

    Is it fair? Hell no, flash has everything to offer the developer, a single technology and working environment with no browser difficulties at all. But its proprietary/commercial leanings and it's lack of transparency haven't endeared it to many web developers who are now embracing Ajax as a new and fascinating concept.





    *although there are less crappy flashturbation sites around these days, many users equate flash with all those stupid overlaid web ads, one of the most popular firefox plugins blocks all flash on a page.

    **so many flash developers seem to have little understanding or appreciation of how important this factor is to many of the end users.

  2. #2
    perpetually bored
    Join Date
    Jun 2003
    Location
    not there
    Posts
    309
    hey aversion ... tell that photographer/developer friend of yours who likes to hear himself talk to check out the homepage for the developer of that example you posted http://www.backbase.com and follow the links so he can watch the LOAD bars as the info LOADS... then pour acid in his eyes so he can see the world in the blurry and pixelated way he seems to enjoy ...

    can spiders even crawl the content on these pages?... if yes then ajax has one HUGE advantage over flash... but from what i see i don't think the spiders will see anything... am i wrong?

    ajax is whack... we all know Adobe just bought macromedia which means future versions of flash are going to be integrated and sick...
    Last edited by flashlorax; 05-22-2005 at 05:26 AM.

  3. #3
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    Ajax is just html and css with some changing content, so yes it can be spidered, at least the 'default' state of content can, so it does have that advantage.

    I'm not sure what adobe will be integrating flash with, the macromedia developers have stated that they don't see the need for deep linking functionality. That's one area of flash I don't see changing. I think what ajax presents them with is an alternate vision of the future of web apps, one where flash isn't the technology of choice, but where it is used in concert with the other ajax technologies to produce widgets, much like on flickr.

    Problem is of course flickr users rejected that use of flash, even though it was pretty seamless and transparent and fitted the page function perfectly.

    That's not something MM or adobe can contest other than encouraging good practice in design. But what people see of flash is annoying and intrusive advertising. No one's saying it's a rational conclusion, it's a prejudive pure and simple, but you're going to have to do better than rubbing their noses in it to cure them off it...

  4. #4
    imagination through stupidity
    Join Date
    Apr 2001
    Location
    P3X-3113
    Posts
    1,238
    I believe ajax can ONLY be spidered if the engine doing the index can read and process javascript/httptransport.

    As geribick knows, I figured a work around that allows flash indirectly to be indexed with hyperlinks.
    Last edited by Sybersnake; 06-06-2005 at 07:02 PM.
    Nothing to see here, move along.

  5. #5
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    sybersnake- Link?
    would make for good reference material.

  6. #6
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    2,563
    Great post Av, nice intro to Ajax.

    There are problems here that crop up with both ajax and flash, which really need to be dealt with properly.

    I think most importantly is UI consistency; we've spent years struggling with the reputation of flash, and part of that is due to ui inconsistency.
    How many thousands of scroll bar systems have been written out there? I know I've written a couple of different ones.
    Now we've finally got a platform to work from, with the standard MM components, the last thing the web needs is to start again with ajax and a new saga of widget construction.

    It's bad enough that the MM widgets aren't OS native, but understandable.
    Even worse though is that some widgets in ajax are OS native while others won't be. And there's no way to solve this problem that I can see, without some sort of plugin for browsers that allows access to the native widgets.


    Another problem is DOM implementation.
    I know when I was writing DHTML stuff a couple of years ago it was a nightmare; the DOM is badly implemented and in different way across the board in browsers.

    Dave Hyatt recently got his developer builds of Safari to be CSS2 compliant (http://weblogs.mozillazine.org/hyatt...4.html#008042), and that's the only browser I know of that comes close.

    This is the benefit that Flash has; a consistent platform to work on; you know it will work the same across different OSs and browsers. No need to sniff for browser type and then implement code written for that browser specifically; no exclusion of some browsers or platforms because the client can't pay to write the same thing twice.
    I'm not sure how much this still happens, maybe I'm wrong, but it's a real sticking point for ajax.
    Sam



  7. #7
    imagination through stupidity
    Join Date
    Apr 2001
    Location
    P3X-3113
    Posts
    1,238
    Quote Originally Posted by SJT
    Great post Av, nice intro to Ajax.

    Another problem is DOM implementation.
    I know when I was writing DHTML stuff a couple of years ago it was a nightmare; the DOM is badly implemented and in different way across the board in browsers.
    I've always had a problem with this, why cannot the javascript DOM follow a predefined strucutre? Is is really that hard? Why does every browser have to have their own "implementation" of javascript complete with their own DOM. God knows jScript follows stuff that is only available in IE and on purpose or because microsoft "does their own thing".

    As far as links go, there will be an example on my site when the product is ready.
    Nothing to see here, move along.

  8. #8
    Junior Member
    Join Date
    Sep 2002
    Posts
    12
    I can see the merits of both, but I'm glad I'm working with Flex/Flash Remoting. Hope you don't mind me sharing my thoughts...

    I do not have as much experience with AJAX, so anyone can correct me if I'm wrong.

    I do believe the Flex/Flash Remoting solution is stronger than AJAX. But AJAX is free. However, you cannot do media as well with AJAX. Flex runs well on a PDA, but AJAX does not. Flex looks the same on every platform, b/c it runs in the Flash player. AJAX, not so much. Plus, with Flex you can get training and support. AJAX...Not as easy to find, except for user groups.

    In Flex, You can modify your JSP to produce MXML instead of HTML, and keep the current page-based request/response thing everyone is used to. You can make your web service and your UI in an object-oriented fashion. That’s the heart of all of this, reusability, OOP. Everything I build, I can reuse. Want me to change that graph to a pie chart? 10 seconds, tops. My data is already plugged in, I’m just swapping out components (a matter of a few xml tags)and keeping my data model separate. Event handling? Flex kills that and its easy to do.

    AJAX is lighter, which appeals to many. But in today's world of Broadband, that is becoming less of an issue. The Flash/Flex solution gives you more capabilities and out-of-the-box components that are ready to go. And if you're good, you can make your Flex application very lightweight.

    Overall, I feel that Flex/Flash Remoting is a much cleaner implementation. You have xml and you have actionscript with Flex. The biggest hurdle is costs.

    Both technologies have a ways to go. Flex has to become cheaper and given more time so people can catch up on actionscript. Until then, I'm sitting pretty, being one of the not so many.

    I work as a government contractor, so if they're getting on board, that's a good thing for me. We still have work to do on accessibility...but most of this stuff is on a first or second release. We'll get there soon. And anything is better than a plain old HTML solution(AJAX definitely a step up). We need more than what old-school HTML can provide for complex applications.

    We recently put some flash remoting and flex in front of our client. Immediately they say 'we want that!'. Then we tell them its Flash. Works every time.

  9. #9
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    Quote Originally Posted by Sybersnake
    I believe ajax can ONLY be spidered if the engine doing the index can read and process javascript/httptransport.
    ajax content is just XHTML content and its initial state can be read and linked to by google or any other search engine because the initial state is always just XHTML content. It's only once you change the content of a page using ajax technologies that it can't be read by a search engine, as you would expect.

    I'd like to see anything that genuinely allows deep linking in flash, there are hacks out there now but they all fall short, native support for this will never come from MM, they've expressed it several times.

  10. #10
    imagination through stupidity
    Join Date
    Apr 2001
    Location
    P3X-3113
    Posts
    1,238
    Quote Originally Posted by aversion
    ajax content is just XHTML content and its initial state can be read and linked to by google or any other search engine because the initial state is always just XHTML content. It's only once you change the content of a page using ajax technologies that it can't be read by a search engine, as you would expect.

    I'd like to see anything that genuinely allows deep linking in flash, there are hacks out there now but they all fall short, native support for this will never come from MM, they've expressed it several times.
    WHat about an ajax based page that does not run off of xhtml content initially?

    The more complex applications would expect to use xml/xhtml data which is aquired via httptransport and only the core javascript application is loaded initally. Therefore, there would be no index worthy XHTML in the initial state for a search engine to read.

    In flash, the website/application structure is completely defined by programming. I think it would be possible to have native deep-linking support for slides/forms in flash, but thats it.

    What type of deep-linking functionality are you looking for in flash?
    Nothing to see here, move along.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center