About: This is the first part in a series of posts about the present and future state of User Interface programming models and their applicability in various scenarios.
This series of posts introduces the three programming models that in my opinion are going to occupy significant portion of current and future development in the world of user interfaces, I will start with the
Let me tell you what is
What are the underlying technologies used by the
Developing a Web Application using
- XHTML and CSS – XHTML is an evolution of HTML; it looks very similar to HTML but is designed to work with XML which imposes some changes in the rules of writing the markup. Cascading Style Sheets (CSS) allows for defining how various elements should appear on a Web page, the most common usage of CSS is to provide a library of styles that are reused throughout a Web Site.
- DOM –Document Object Model (DOM) is an API for HTML and XML documents that allows programmers to create and build documents, navigate their structure, and add, modify, or delete elements and content
- XMLHttpRequest object – The XMLHttpRequest object can be used to exchange data asynchronously with the Web Server. The object was originally developed by Microsoft and made available in Internet Explorer 5.0. Mozilla contributors implemented a compatible native version in Mozilla 1.0, Apple made it available in Safari 1.2 and others followed suit.
How does an AJAX-based application differs from traditional Web Applications?
In a traditional Web Application user interactions usually result in an HTTP request to the Web server which processes the request, potentially using other servers and database components, and returns the results to the user. While the Web Server is processing the request the user often sees a wait icon and is unable to interact with the UI, after the data has been received and rendered the user can continue with the application. In case of an AJAX-based application, an
Can I implement
AJAX does not dictate and is not concerned with what happens after the request has been received by the web server, you can use the AJAX style of programming whether you are writing ASPs or JSPs. Microsoft has been using this style of programming (without calling it AJAX) for a number years for its Web applications like Outlook Web Access, and XMLHttpRequest was introduced by Microsoft in Internet Explorer 5.0, there are specific features in ASP.NET 2.0 (e.g. asynchronous callbacks) that make it easier to implement this style of programming, in addition, it was possible to do this years ago using Java Applets, so why the recent buzz? I think that it is primarily due to the release of a number of high profile sites (and some about to go to production this year) that are been based on this style of Web programming.
Pros and Cons of
AJAX is an improvement over the vanilla Web Applications, and yes I know that a lot of people (like myself) believe that it is a marketing brand for technologies that have been available and used for quiet sometime (by Microsoft, Sun and others) but lets leave that debate aside; I am excited that it is becoming more mainstream.