Choosing Between Flash & Ajax for Client-Side Apps

In summary, Flash is a self contained program downloaded and run in the browser, while Ajax is a set of techniques for allowing a web page to communicate back and forth to the server as parts of the page change. They are fundamentally different things and should be used for different purposes.
  • #1
Ronnin
168
1
I have been playing around with a couple projects of mine on again, off again for about a year now. I was thinking of dabbling with some client side applications and wanted to get some personal opinions from anyone who has used Flash or Ajax. Can anyone give me some insight if they have had to choose between the two. Most of my applications are pretty generic DB front ends that I have used either, VB, C#, or a Java applet, but I have found myself about Flash w/ Actionscript. Any thoughts?
 
Computer science news on Phys.org
  • #2
They are fundementally failry different things.
Flash creates a self contained program downloaded and run in the browser.
Ajax is a set of techniques for allowing a web page to communicate back and forth to the server as parts of the page change.
Think of flash as more a replacement for a Java applet.

You can use Flash to stream content into a page, called Asynchronous Flash - and marketed as Ajax/Flash but it isn't really the same thing.
If you are prepared to target windows only and don't mind being on the cutting edge your could look at silverlight - this is MS's competitor to Flash which let's you run a limited .Net app inside a browser.
 
Last edited:
  • #3
Flash and Javascript/Ajax share many of the same capabilities (and actually had the same syntax as well, in Actionscript 1).

Flash is widely available but a good rule of thumb is: if it can be done with javascript with good performance then use javascript. I would use Flash for drawing vector images, and manipulating audio/graphics. Flash 8 added some great image manipulation capabilities (e.g. you can specify matrix transformations to produce your own image effects/filters in real time).

Multimedia in general should be done with Flash (or Silverlight when it gets there).

In addition Flash has sockets - a very valuable resource. With flash sockets you can implement a stateful connection (i.e. where as in Ajax you have to query the server every x seconds, in Flash you can create a socket connection and have the server send data to the client whenever it needs to, there's two-way communication). There are some reverse-ajax frameworks that enable you to implement more socket-like connections in ajax - but these have some drawbacks.

Java applets i would only use for some extreme needs (such as accessing the user's file system, hardware devices, or for cross-domain socket connections) because the JRE is a big download, and because even for some quite simple tasks you end up having to sign your JAR's, which generates certificate prompts and security warnings. Also two-way java to javascript communication is not the easiest thing to implement - same goes for dynamically adding java applets to html pages with javascript. Finally, there isn't great compatibility between JRE versions - something that works in 1.4.1 does not always work in 1.5 (from my experience).
 
  • #4
Job,
Thanks, that is some good input. I wasn't aware of the sockets in flash and I have a couple of applications in Java that make use of them. Good things to consider.
 
  • #5
Flash is very similar to Ajax, but one notable difference is that Flash loads slowly, while Ajax is better optimized for page use. (In my opinion)
 
  • #6
=CIA= h1tman said:
Flash is very similar to Ajax, but one notable difference is that Flash loads slowly, while Ajax is better optimized for page use. (In my opinion)

What?!
 
  • #7
=CIA= h1tman said:
Flash is very similar to Ajax, but one notable difference is that Flash loads slowly, while Ajax is better optimized for page use. (In my opinion)

Yeah, that statement really doesn't make sense.
 
  • #8
I meant page use as in webapps and such...sorry if it was misinterpreted. I just think Ajax works better for those types of applications.
 
  • #9
Where besides web applications would you use Ajax and Flash?

I think the confusing thing was that you said that they're similar things, where one is a software product and the other is a programming technique. And it doesn't make sense to say that a programming technique is “optimized”.
 
  • #10
You're right, I didn't word that very well, sorry about that.
 
  • #11
Not to mention that you can load flash asynchronously in layers or components, so load time between Ajax and Flash driven applications is not independent of implementation. One isn't better than the other in that aspect by default - it will vary according to the application and its implementation.
 

What is Flash and Ajax?

Flash and Ajax are two different technologies used for creating client-side applications. Flash is a multimedia platform developed by Adobe that allows for creating animations, games, and interactive elements on websites. Ajax, on the other hand, is a web development technique that allows for making asynchronous requests to the server without reloading the entire webpage.

What are the advantages of using Flash for client-side apps?

Flash provides a rich and interactive user experience, with its ability to create animations, games, and other interactive elements. It also has a large developer community and a wide range of tools and resources available for creating applications.

What are the disadvantages of using Flash for client-side apps?

Flash requires users to have a plugin installed on their browsers, which can be a barrier for some users. It is also not supported on all devices, such as iPhones and iPads, which limits its reach. Additionally, Flash applications can be resource-heavy and may affect the overall performance of a website.

What are the advantages of using Ajax for client-side apps?

Ajax allows for creating dynamic and responsive web applications without the need for a browser plugin. It also reduces the amount of data that needs to be transferred between the server and the client, resulting in faster loading times. Ajax is also supported on a wide range of devices, making it a more accessible option.

What are the disadvantages of using Ajax for client-side apps?

Ajax has limited capabilities when it comes to creating animations and interactive elements compared to Flash. It also requires more technical expertise and coding knowledge to implement. Additionally, Ajax is not suitable for websites that require a lot of multimedia content, as it may affect the overall performance and user experience.

Similar threads

  • Computing and Technology
Replies
4
Views
2K
  • STEM Academic Advising
Replies
2
Views
1K
Replies
28
Views
664
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Computing and Technology
Replies
5
Views
1K
Replies
5
Views
699
  • STEM Academic Advising
Replies
7
Views
2K
  • Special and General Relativity
Replies
8
Views
2K
  • STEM Academic Advising
Replies
20
Views
3K
  • Math Proof Training and Practice
Replies
5
Views
949
Back
Top