What are the (technical) pros and cons of Flash vs AJAX/JS?
Asked Answered
V

11

6

We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigation elements, popup dialogs etc.

Today it's obvious that AJAX/JS offers roughly the same possibilities and because of the number of frameworks that are readily available, it's very feasible to implement them.

Is there a technical reason one should choose either technology over the other? By "technical", I mean performance, security, portability/compatibility and the like. I don't mean aspects such as the very non-programmer way development is done in Flash or whether it makes sense to switch an app from one to the other.

As I just explained in another question, it seems to me that JS is way ahead in terms of market share and I'm wondering whether we are missing some important point if we stick to Flash.

Veasey answered 9/9, 2008 at 15:20 Comment(0)
F
3
  • Correctly designed AJAX apps are more googleable than Flash
  • Correctly designed AJAX apps are more easily deep linkable than Flash
  • AJAX doesn't require a plugin (Flash is pretty ubiquitous, so it's not really a big deal)*
  • AJAX isn't controlled by a single company the way Flash is

Edited to add: * Except for the iPhone, as Abdu points out.

Fibrinogen answered 9/9, 2008 at 15:25 Comment(0)
L
4

In addition to what others have said, Flash is constrained in the "rectangle" and cannot be added to a normal html page in an un-obtrusive manner.

@Gulzar I think when more browsers will support the video tag like mozilla 3.1 does we'll see even more adoption of ajax/js over flash.

Luncheonette answered 9/9, 2008 at 15:38 Comment(1)
True. I would go for Javascript any day myself.Centrifuge
L
4
  • Adobe Actionscript is a statically typed language, Javascript is dynamically typed. Depending on your point of view, this may be a good thing or a bad thing.
  • With Javascript/HTML/CSS you're going to be heading into cross-browser compatibility hell, especially if you want to support older browsers. This can be mitigated by the libraries that are available, but it's still a big headache. With Flash, you write the code once and it just works in all browsers.
  • Even with the libraries available, Flash user controls are simply more advanced than anything you can find in the world of Javascript/HTML. In Javascript, you are not going to find anything that comes close to the simplicity and power of a databound user control that Flash provides.

I don't see how Javascript has more of a "market share" than Flash. Pretty much anyone with a web browser has a Flash plugin installed. I'd be curious to know how many people disable Javascript but have a Flash plugin.

Also keep in mind that you're going to be in for a huge learning curve and lots of development time if you decide to switch your technology base so you'd really better have a good business reason to do it.

This decision also has a lot to do with what your application does and who your install base is.

Edit: I see people have mentioned that the iPhone doesn't have Flash support. I would expect this to change with the install base of the iPhone - Adobe would be crazy not to support it.

Liberality answered 9/9, 2008 at 15:44 Comment(1)
That depends on what version of Flash you're talking about. ActionScript2 is just syntactic sugar on top of ActionScript1, which is essentially JavaScript (both are ECMAScript). It's very much a dynamic language. ActionScript3 is both. You can declare dynamic objects, though most aren't dynamic.Collinear
F
3
  • Correctly designed AJAX apps are more googleable than Flash
  • Correctly designed AJAX apps are more easily deep linkable than Flash
  • AJAX doesn't require a plugin (Flash is pretty ubiquitous, so it's not really a big deal)*
  • AJAX isn't controlled by a single company the way Flash is

Edited to add: * Except for the iPhone, as Abdu points out.

Fibrinogen answered 9/9, 2008 at 15:25 Comment(0)
C
2

JS and Flash both have great presence on the web with overlapping capabilities. One area JS is still lacking is in rendering video.

Centrifuge answered 9/9, 2008 at 15:22 Comment(0)
E
1

Flash, used well, allows easy localization and internationalization.

Furthermore, it is much easier to use Flash in an accessible manner; you can feed screen readers the right text, instead of having them iterate over all of the possible form elements.

Ethelinda answered 9/9, 2008 at 18:4 Comment(0)
B
0

I think Flash should be limited to online games, videos and animation. Otherwise use html and Ajax. It's a web standard and supported by almost all devices. AFAIK, the iPhone doesn't support Flash. That's a fast growing segment you're blocking out already. Keep it simple and efficient.

Bedcover answered 9/9, 2008 at 15:31 Comment(0)
E
0

Although flash is pretty ubiquitous on desktop browsers, mobile support is very limited (flash lite? yeah, right). I get really frustrated looking up a restaurant on my phone only to find the entire site is flash based and I can't even get a phone number or address!

Euphemiah answered 9/9, 2008 at 15:33 Comment(0)
L
0

One benefit of Flash is that it has a few facilities to help do cross domain type operations safely, which can be helpful. Flash also has (limited) support for some hardware, which is not possible with Javascript.

Personally, I'd try to use as much Ajax as possible before turning to something like Flash. From the UI perspective, it is better in that the controls and basic authoring is a little more developed. The Sound Manager project is a good example of effectively using a small amount of Flash while keeping the remainder in Javascript.

Languishment answered 9/9, 2008 at 15:42 Comment(0)
F
0

I suspect one of the reasons javascript is becoming more popular is that it's more easy to retrofit into an existing application.

Flathead answered 10/9, 2008 at 14:10 Comment(0)
V
0

As I can't accept two answers, I'm going to merge Christ Upchurch's and 17 of 26's answers in my own post. I think, these two together pretty much sum up what I wanted to know. Thanks guys!

Veasey answered 12/9, 2008 at 12:52 Comment(0)
F
0

If you're dealing a lot with polygons, then Flash is still easier to program and debug. With AJAX there are a lot of libraries to handle polygons, but the more libraries your app uses, the slower it gets.

Fictitious answered 30/11, 2012 at 2:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.