About world wide web

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Introduction

The beginning of the World Wide Web was pretty simple and straight forward. It started with the basic text based pages loaded in the web-server for sharing the contents in scientific society. But as it emerge in the public arena, web was become a mass phenomenon. General people, enterprises to small business, are not only profiling themselves in the web but also begin to interact with each other. It was become an entity. Everybody is looking for something in the web every day. It is such an entity that whatever anybody refers to could be found in the web: an entity which knows everything.

From the pre-historic web-sites to modern day's web-application, various technologies emerged to solve various issues relating to the everyday web-site problems. As a result now, the market for tools and technologies for building a web-site is immense and new technologies outdated old technologies in rapid manner. Adopting with new technologies becomes a challenge for the developer's everyday life. But the better thing is that as new technologies evolved, the whole web experience is changing in respect to the mass user. So it is also become a vital task to make web-site more interesting and up to date with the new technologies for the developers.

As the web went on evolving from static pages to dynamic pages, where web pages now can load the data from the server, a new era of ecommerce web application evolved. But, as it went on evolving, it was now more than just loading data or information; now it needs the ability to share and more interactive. But as the traditional web-site which simple model is to request and reloading responses back from the server seemed become an obstacle to move forward the web. So, a verity of new technologies emerged like:- ActiveX, Java Applet, Flash, etc. But, still something was missing in these technologies. But when in the article “Ajax: A New Approach to Web Applications” by Jesse James Garrett published, a new door open for all to shift the web-application to new level.

Now web sites can communicate with the server asynchronously without reloading or refreshing the page contents, which may be not a new technology but a new approach to develop the web application and provide better experience to the audience as like as the desktop applications. As with the AJAX various similar technologies emerged as well to compete in web technology market. But because of Ajax's open source and free attribute, developers grasp AJAX more intimately than other available technologies.

In this research, I am going to examine the way AJAX works and comparing with a similar technology Flex, which is a product of Adobe. Firstly, I will examine both of their coding manners and the way they work. Lastly, comparing both as I found in various web-sites and blog how the developers think which one is good for what and when using them.

The Buzz Word “AJAX”

The whole concept of AJAX is pretty simple. All the technologies AJAX used are available for long time before AJAX was becoming a buzz word in the tech-world. It is a kind of reinvention of putting some old technologies together to meet new demands in the World Wide Web user experience. In the old way web pages are loaded in the browser, interact with server responses and fetching new results as user interact with the pages. AJAX shifts these loading features a bit ahead. When user submit a form, the pages are still loaded but rather than loading a whole new page, AJAX enables the submission background and update the current page as required which is also in background. As a result user will not see any reloading of pages and also any changes in the address bar. Not only this, as AJAX go on, a loads of usability evolved as per experiencing the audiences with rich user interaction capabilities and animations without refreshing or loading GIF image or using any other media.

What is Ajax?

AJAX is the acronyms of (Asynchronous Java Script and XML). As its name suggested, AJAX is a mixture of three technologies: - asynchronous communication, Java Script and XML. Java Script and XML are used and practiced by developers for a long time and in well standard form before AJAX evolved. Asynchronous communication enables the web pages loaded as per demands and whole operation will be executed in background without reloading or refreshing the web page.

Synchronous and Asynchronous Communication

The very basic of web browsing is simply “click, wait and refresh” user interaction paradigm. The communication mechanism is always one-way and synchronous request/response from web-browser to web-server. In Figure 1, it shows that browser make response to the user action from the HTML page and sending an HTTP request to the web-server. Than the web server response back with an HTML page which web-client browser receives and rendered it to the user. Here client browser always requests the web-server as per user action.

These two basic features of traditional web structure is not well enough for web-application software capable of desktop application. It is often regarded as sluggish, too much server responses and more over consuming unnecessary bandwidth because of reloading or refreshing same pages in every request.

As application software requires more and frequent user responses to respond, a new way of communication was needed to introduce: - like the server only needs to respond at the time when it is required to. This way of communication is asynchronous.

As AJAX introduced, the traditional “click, wait and refresh” interaction paradigm replaced by the “Partial screen update” paradigm for the web applications. Now the pages only updates when new information are available or request by the client browser.

In the Figure 2, it shows that the UI updates are totally handled by the AJAX engine and the communication with the server occurred only when the pages needed to load new data from the server. The beauty of this model is the whole client to server communication is done in background, as a result user never experiencing any hindrance using the application continuously.

Inside AJAX

By the definition AJAX is combination of trio Java Script, XML and Asynchronous Communication. AJAX is a client-side technology comparing with the server-side dynamic web technologies: - like PHP, ASP, JSP, etc. It uses Java Script as the language and for communication with the server its uses XMLHttpRequest object of the browser. Originally this technology was introduced by Microsoft for its ActiveX components for the Internet Explorer; which was named as XMLHTTP. Later that is adopted by the all other browsers. The XMLHttpRequest object communicates with the server background and transfer data like:- XML, JSON, GIF, etc. Often these data are processed by the server side technologies (ASP.Net, JSP, PHP, etc). For reading and manipulating the UI on the web browser AJAX uses DOM (Document Object Model), DHTML (Dynamic HTML), etc.

An Example of Ajax code:

if (window.XMLHttpRequest) { // for other browsers than IE

XMLHttpRequestObject = new XMLHttpRequest();

} else if (window.ActiveXObject) { // for internet explorer

XMLHttpRequestObject = new ActiveXObject(“Microsoft.XMLHTTP”);

This is the chunk of code declaring the primary XMLHttpRequest object. This is the base of communication object uses by AJAX. All other magic is done by Java Scripts and Java Scripts uses DOM, DHTML, different architecture and libraries for handling the data and updating the UI.

Advantages of AJAX

- AJAX uses widely used HTML, CSS and Javascript by the web-developers before AJAX was introduced. It is freely available and open source technology.

- The web users are also very much familiar with the technology as these technologies were using from the earlier days.

- There is no need of any framework or plug-ins for the browser to support AJAX, because all these technologies are natively supported by all the modern browsers.

- Cross browser implements is the main downside of AJAX; often it is hard for a developer to mitigate the browser compatibility. Changing and managing code in this regard time consuming and laborious.

Disadvantages of AJAX

As it uses the old technologies, the weaknesses of these technologies remains. Although, these weakness can be overcome but the task is laborious and complex. Often hard to maintain and not designed for team development.

Due to its heavily using Javascript, performance and functionality limitations are often a problem. For enhancing the functionality often requires to use other technologies.

Flex (Action Script 3) as an Alternative to AJAX

Flex is development platform for Rich Internet Application (RIA), which was developed by Adobe. It is web-based and other than using HTML it uses its own language MXML, which is XML based, to build UI and Action Script 3 uses for its logic development. Action Script is similar to Java Script because it is strongly typed ECMA language standard like the Java Script. Flex offers the developer to build enhanced and complex visual presentation on web browsers with capabilities of multimedia experiences and robust user interaction without reloading or refreshing the web browser. Flex requires plug-ins for the browsers to run. The runtime environment of Flex is widely and freely available for all kind of modern bowers for various OS platforms.

Flex Communication

As like AJAX, Flex can communicate server asynchronously. In this case Flex uses its own Http Service library. Moreover Flex can communicate with the server using binary data communication.

An Example code of Asynchronous communication implementation in Flex:

var http:HTTPService = new HTTPService();

// register event handlers (resultHandler and faultHandler functions)

http.addEventListener( ResultEvent.RESULT, resultHandler );

http.addEventListener( FaultEvent.FAULT, faultHandler );

// specify the url to request, the method and result format

http.url = "http://www.flexafterdark.com";

http.method = "GET";

http.resultFormat = "text";

// send the request

http.send();

This excerpts of code is taken from http://www.flexafterdark.com/docs/Flex-HttpService.

The Flex Way works

The whole control cycle of Flex is describes in the figure below:

Here the view display the User Interfaces: - like animations, button, movie clips, etc. which may be defined as action listener as a result when user interact with mouse or key board the View sends event to ViewHelper which decides which Command class to be called to send the response to the Event Broadcaster. Event Broadcaster than pass it to the RIA front controller which than interact with the RIA commands/Respnders which holds the action listener of the associate command classes. Than it interact with the business delegate which eventually fetch the data from the Command Classes or any server pages using HTTPService. The end command class or server pages return back XML output which eventually back forward to each layer to the View, where user sees the end result.

Advantages of Flex:

Easy to learn in case of learning HTML, CSS and Javascript all together.

Very robust and eye catching interfaces and animation. All these can be done using a little code.

Multimedia data, like :- playing MP3s, videos, etc. can added in the application using just a few lines of code.

Disadvantages of Flex

For small size application flex is better but as application gets larger it becomes laborious and cumbersome.

Flex is it not search friendly.

It is needs the flash player to run.

Comparing AJAX and Flex

A various arguments can be found in the web relating to Flex and AJAX comparisons. Different user compare in different aspects. Some basic comparisons are describes below:

Runtime Environment:

As AJAX uses the technologies native to the browser, there is no need of any runtime, although some AJAX frameworks have JavaScript Engine. On the other hand, Flex depends on Flash 9 browser plug-in.

Extensibility:

As both are open source frameworks, creating extended features using external code is available for both.

Multimedia:

Flex heavily support multimedia features like: - vector graphics, animation, various format audio, video, etc. Flex inherits this from its another sister product Adobe Flash. On the other, AJAX does not have these capabilities.

Benchmark Data Loading:

In James Ward blog (http://www.jamesward.com/2007/04/30/ajax-and-flex-data-loading-benchmarks/), he compared both Flex and AJAX based on loading performance of benchmark data. He shows that Flex out performs AJAX when it is concerned handling large data. He also shows that as Flex uses extremely fast compact binary object serialization protocol, called AMF3, which helps the flex outperforming AJAX in this scenario. But main uses of AJAX is not dealing with large chunk of data. In this case AJAX is should be used where small chunk of data is used.

Performace:

Flex needs large size of files in initial load of the application. But as the application goes bigger the flex needs high speed internet access to view. Where AJAX is usually very small size application which requires small chunk of data comparing to Flex. The AJAX performance mainly depends on the browser performance.

Server Communication:

AJAX using the browsers XMLHttpRequest object for its server communication which is native to the browser's HTTP. Flex also has similar type of mechanism available like :- HTTPService. Moreover Flex also supports binary data communication.

Security:

As both are client based framework and run in the browser's sandbox, their security level are both same; although Flex could introduce addition security features. Where AJAX is written in easy-to-read text, may be a issue of vulnerabilities.

Conclusion

As the web-application paradigm evolved, web applications are getting richer and richer day by day. In the horizon not only AJAX and Flex are offering the extensibility and asynchronous service, but there are lots of other vendors like :- JavaFX, SilverLight, Flash, etc. offering better solutions and more are coming in the year to come. But from extensive search through the web it is very clear to me that which web-application platform should be used, is totally now depending on the complexities and requirements of the application. For heavy multimedia and visual presentation centric application may be better off using Flex, on the other hand AJAX is better when small chunk of data needed to be care off. In the web today, social networking web-sites are using heavy AJAX frameworks to provide richer user experience to their users. But these is not the utmost conclusion, because in developers world, they are still arguing which one is better than other, to many hybrids are the best solution.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.