This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Ajax and Adobes Flash Flex are both used to create dynamic and interactive web applications. Both are platform independent i.e. contents will render the same across different platforms and permits for interface animation. There are many similarities between the two. However, there are considerable differences as well. Say for example, Flash is animation format software that allows for fast download of animation files in a resizable format in order to facilitate files be downloaded over a regular modem connection. Flash creates better interactivity by encoding information in smaller files.
This report discusses both Ajax and Flash/Flex technology as they battle in making Rich Internet Application(s). Both Ajax and Flex can execute similar functions. However, there are few advantages and disadvantages to both refer to Table-1 for comparisons.
2. What is Ajax?
Ajax is a set of technologies which allows a website to be very responsive. Most importantly Ajax supports asynchronous communication and also partial refresh of a web page. Here Partial refresh means; when an interaction event is invoked, for e.g. when a user enters information into a form on a web page and clicks a "Submit Button". The server processes the keyed information and returns a partial response specific to the data it receives (See Figure-2). Notably, the server does not transmit back an entire page, compared to the traditional web application which is "Click, Wait, and Refresh" (See Figure-1), instead, only part of the page is updated. The web application that uses Ajax is events and data driven, where as conventional web applications are driven by pages.
Full page refresh
Figure-1: Classic Web Application Model - Synchronous Communication
Partial UI updates
Figure-2: Ajax Model - Partial UI updates and Asynchronous Communication
2.1. Ajax Asynchronous
Asynchronous means after sending data to the server, a client can continue to perform other things whilst the server continues to do its processing in the background. Such as, a user can continue to move the mouse over a map in google website and notice a smooth, uninterrupted change in the display. Compared to the traditional, synchronous, approach here the clients do not have to wait for a response from the server before continuing. Figure 1 and Figure-2 illustrates a Classical vs Ajax web application interaction.
An additional significant feature of Ajax-enabled sites is that when an event is triggered, responses from Ajax are not restricted to submitting data in a form or clicking on a link. An Ajax response can be triggered in various number of ways such as moving a mouse over to a particular area on a web page, entering part of an entry in a text field, or dragging a map around with a cursor in Google Map etc. With these cool dynamic interactions among the user and the web page excels web applications nearer to what users experience in rich desktop applications.
2.2. Ajax Technologies at a glance
The technologies included in Ajax are as follows:
Cascading Style Sheets (CSS) - a markup language designed for defining a page presentation style, such as colors and fonts etc.
Document Object Model (DOM) - presents a logical view of a web page in a tree structure.
Like other web applications, Ajax-enabled web application uses markup languages such as HTML or XHTML to present web pages. Java Server Pages (JSP) as server-side technology can be used to generate web pages. Moreover, server side application systems play an important role in processing Ajax applications. Server side application system such Java2EE, which includes support for user identity management, data validation, and persistence, fits very well with the Ajax methodology Ed Ort (2006). Figure-3: illustrates how all these technologies work collectively to handle a user action.
2.3. Ajax Architecture
Callback ( )
Web and / XML Server
HTML + CSS data
HTML & CSS Data
Figure-3: How Ajax Technologies Handle a User Action
The XMLHttpRequest object makes an asynchronous HTTP request to the web server.
The web server processes the request and returns an XML document that contains the result.
The XMLHttpRequest object calls the callback ( ) function, it receives the data and processes the result.
The HTML DOM is updated.
2.4. Ajax and Server-Side Java Technologies
Adobe Flash Professional Multi-Media authoring program developed in 1996 by Macromedia and was acquired by Adobe in 2006. Flash is used to create content for the Adobe engagement Platform. One of the Flash's greatest strength is ease of development.
They are very well-liked for creating HTML applications and are hence very significant to web development. Often assist to automate tasks, making web programming and usability faster. For adding animation and interactivity to a web site Flash is one of a well known method. However, it is currently contributions toward developing RIAs (Rich Internet Applications). The release of Adobe Flex technology directly responds to RIA development.
Flex is precisely where Flash meets with Ajax. Both technologies aim towards creating RIAs. Flex mechanism is on the presentation level of an RIA. It is a vendor specific product which means it is not free and requires purchase.
4. Comparison between Ajax and Flex
Table-1: Comparisons on features between Ajax and Flex/Flash
Supported through external plug-ins (Media Player).
Support embedded flash audio. Dynamically load audio.
Flash player plug-in is required.
Major compatibility differences between browser versions.
Minor variations between versions of Flash.
Supported through external plug-ins (Media Player).
Dynamically load FLV video files or embedded videos.
Powerful layout capabilities.
Text API mimics some HTML functionality.
Full Support. MXML
4.1. Key Difference
The following are key differences on developing Ajax and Flex based online applications:
Free and Proprietary - One of the biggest features of Ajax is that there are many freely available useful tools online. There is no need for additional IDE in Ajax, as the major components of this technique simply need leveraging. On the other hand Flex is a proprietary tool so developers have to spend a bit to use this development format. A paid tool assures functioning tool to developers. Supports for freely available may not be available.
Learning Requirement - Flex is already popular to various developers particularly those who have already worked with Flash. Combine this fact with the available platform; developers can expect implementation of Flex based application faster. Ajax, on the other hand, will require more from their developers. Those who wanted to create the application manually, without the assistance of frameworks, will find the task of creating Ajax based applications difficult. This is the reason why Frameworks and libraries are created.
Data vs. Looks - although each development form can be used for data and its looks, Ajax is more proficient in handling and manipulating data. As an online application, various functions, variables and objects are available and they are simply created to manipulate data. Flex on the other hand, is very useful in creating great looking websites. The reason for this expertise is from that fact that it traces its roots from Flash.
4.2. Advantages and Disadvantages of Ajax and Flex/Flash
Decrease in bandwidth use.
Complex. Requires more coding.
Adobe MXML and Flex allows the integration of internet applications through a variety of desktop functions.
Flex has the advantage of Flash player being installed on over 90% of browsers. Support for webcam and microphone.
Present information in a visually rich interface.
Video and audio integration with the Flex API is very simple and straightforward
Flex might not handle lots of records easily.
Flex does not read or write files to end-users computer. This is a restriction of Flash Player.
More CPU usage.
Lack of support for multi-threading.
No DOM Model
Binary Sockets, cross-domain Access Policy
Flash Vector graphics APIs
Object model access
Data-stores, backend processing, legacy systems
Web and/or XML server
HTML + CSS data
This paper has presented an overview of the AJAX technique for developing interactive web applications.
Ideas of how to introduce the AJAX approach in teaching web development and examples for lab sessions
have been suggested.
Incorporating popular technologies into the computing courses appears to motivate the students and in the
same time it helps them understand better fundamental theoretical concepts. The AJAX technology requires
relatively little new knowledge and can be easily included in teaching web development by focusing
on specific parts of existing technologies and demonstrating appropriate applications. The challenge is
the constant need of updating the material and selecting relevant examples and tools. However, the experience
of learning new technologies and related applications has been rewarding and exciting. The material
presented here could be used as an example of embedding emerging technologies in the computing curriculum
through existing modules.