• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Learn AJAX from Scratch - Part I ...

Hey to all of you, I’m Jimmy and I’m going to write about Ajax and there is no need to tell what is Ajax ? everyone knows better now a days but as this is my first post and I want those who are new to Ajax or still want to learn it from scratch so I’m going to start it with scratch. Hope you like it.

View More Info

Hey to all of you, I’m Jimmy and I’m going to write about Ajax and there is no need to tell what is Ajax ? everyone knows better now a days but as this is my first post and I want those who are new to Ajax or still want to learn it from scratch so I’m going to start it with scratch. Hope you like it.

AJAX - or Asynchronous JavaScript and XML - is a new term coined for a set of technologies that has existed for many years. AJAX is a big buzz word in the technology world right now. It’s recent popularity is due in part because of sites like Google Maps and Google Suggest, although these are certainly not the first sites to make use of AJAX technologies.

You can also say AJAX is a new way for web pages to send and receive data to and from a web site without forcing the user to wait for a new page to load.

True AJAX applications, like Google’s Gmail, Google Maps and Google Suggest etc… have certain things in common:

* They can use a standard web browser, such as Firefox, Internet Explorer or Safari, as their only user interface.

* They don’t force the user to wait for the web server every time the user clicks a button. This is what “asynchronous” means. For instance, gmail fetches new email messages in the background (”asynchronously”) without forcing the user to wait. This makes an AJAX application respond much more like a “real” application on the user’s computer, such as Microsoft Outlook.

* They use standard JavaScript features (including the unofficial XMLHTTPRequest standard, pioneered by Microsoft and adopted by Firefox and other browsers) to fetch data in the background and display different email messages or other data “on the fly” when the user clicks on appropriate parts of the interface.

* Usually they manipulate data in XML format. This allows AJAX applications to interact easily with server-side code written in a variety of languages, such as PHP, Perl/CGI, Python and ASP.NET. Using XML isn’t absolutely necessary, and in fact many “AJAX” applications don’t - they use the XMLHTTPRequest object to send and receive data “on the fly,” but they don’t actually bother packaging that data as XML.

Most AJAX applications use XML only for data coming from the server to the browser, and sometimes not even then. XMLHTTPRequest can accommodate other data formats just as easily, and parsing is often faster when XML is not used. For communications from the browser to the server, submitting the data like a conventional POST form submission is the most common method. Built-in features of server-side languages like ASP and PHP can easily understand data that arrives that way and respond with XML, or another format that the JavaScript client has been designed to understand.

Applications can act more like and be developed more like the days of Visual Basic, Delphi, PowerBuilder, C++ with GUI frameworks, etc. Thus, it is 90’s GUI features but with a web browser: it strives to meld the best of web and the best of desktop GUI’s. Web browser standards were originally designed for e-brochures only. Business forms and other needs were hacked into this e-brochure framework over time and it is clear that this after-thought retrofitting for different purposes has been ugly. Ajax attempts to remedy this.

Some of the characteristics of Ajax applications also include:

* Continuous Feel: Traditional web applications force you to submit a form, wait a few seconds, watch the page redraw, and then add some more info. Forgot to enter the area code in a phone number? Start all over again. Sometimes, you feel like you’re in the middle of a traffic jam: go 20 meters, stop a minute, go 20 meters, stop a minute … How many E-Commerce sales have been lost because the user encountered one too many error message and gave up the battle? Ajax offers a smooth ride all the way. There’s no page reloads here - you’re just doing stuff and the browser is responding. The server is only telling the screen what changed rather than having it redraw the whole screen from scratch.

* Real-Time Updates: As part of the continuous feel, Ajax applications can update the page in real-time. Currently, news services on the web redraw the entire page at intervals, e.g. once every 15 minutes. In contrast, it’s feasible for a browser running an Ajax application to poll the server every few seconds, so it’s capable of updating any information directly on the parts of the page that need changing. The rest of the page is unaffected.

* Graphical Interaction: Flashy backdrops are abundant on the web, but the basic mode of interaction has nevertheless mimicked the 1970s-style form-based data entry systems. Ajax represents a transition into the world of GUI controls visible on present-day desktops. Thus, you will encounter animations such as fading text to tell you somethings just been saved, you will be able to drag items around, you will see some static text suddenly turn into an edit field as you hover over it.

* Language Neutrality - Ajax strives to be equally usable with all the popular languages rather than be tied to one language. Past GUI attempts such as VB, TK, and Swing tended to be married to one specific programming language. Ajax has learned from the past and rejects this notion. To help facilitate this, XML is often used as a declarative interface language.

To prevent any confusion, these things are not characteristic of Ajax:

* Proprietary: “Ajax” is perhaps one of the most common brand names in history, but in the present context, “Ajax” is neither the name of a company nor a product. It’s not even the name of a standard or committee. It’s a label for a design approach involving several related technologies and open standards such as HTML, CSS, and JavaScript. Each of these is “open” in the sense that its based on a published standard governed by a standards body and able to be implemented in any browser, free of legal and information constraints.

* Plugin-Based: Ajax applications do not require users to install browser plugins, or desktop software for that matter.

* Browser Specific: As long as the user is working with a relatively recent, mainstream, browser (say 2001+), the application should work roughly the same way. Browser-specific applications somewhat defeat the purpose of Ajax.

And now wait for the next part of this tutorial in which you will learn your first Ajax enabled program.
source: heygb

 View Full Story.
Posted at 08:08:00 am | Permalink | Posted in Tutorials  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Be the first ... |Add your comment.

Your Comment ...

  Name (required)

  Email (required, hidden)

  Website


About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Recent Stuff

CSS Animations via MooTools

JSON form builder

Using ASP.NET AJAX JSON Asynchronous Web Services

Growl for Windows and a Web Notification API

Learn AJAX from Scratch - Part II

Learn AJAX from Scratch - Part I


Our Partners

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines


Search


Topics

  • .Net (96)
  • Articles (76)
  • Bookmarking (35)
  • Calendar (18)
  • Chat (38)
  • ColdFusion (3)
  • CSS (31)
  • Email (23)
  • Flash (13)
  • Games (6)
  • Google (17)
  • Html (6)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (34)
  • Javascript (146)
  • JSON (17)
  • Perl (2)
  • PHP (82)
  • Presentation (19)
  • Python (3)
  • Resources (1)
  • RSS (1)
  • Ruby (7)
  • Storage (4)
  • Toolkits (87)
  • Tutorials (190)
  • UI (11)
  • Utilities (161)
  • Web2.0 (13)
  • XmlHttpRequest (18)
  • YUI (4)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange