IP-WARS.NET - a forward command post of the IP Wars
create account| Front Page|Mission|Standard Operating Procedures|Operating Instructions(aka FAQ's)|Privacy Policy|Site Stats/Info|Admin Actions|Search
Sections:General|IP|SCO v World |Microsoft|grok*/OSRM|IPW Site Meta|Logbooks|Diaries|Legal Documents|View All Articles

AJAX Conquers the World


General News

By ColonelZen, Section Diary
Posted on Sun Nov 12th, 2006 at 21:41:11 EST

(also http://www.zensden.net/boredz/xmsg/view/1/211)

In my diary "Language Wars" (http://www.ip-wars.net/story/2005/6/27/19419/8506) I commented that javascript looked interesting. Well it is.  Not so much as a language, it has numerous weaknesses as such, but for what you can do with it.  

Over the past several weeks I have been looking at AJAX.  In case you've been under a rock for the last year, AJAX (Asynchronous Javascript And XML) is a name for the collection of techniques commonly used to dynamically modify web pages with minimal interaction and load on the server.  

The keys to AJAX as a distinguished technology (the acronym itself is less than two years old, credited to Jesse James Garret) is the DOM model of the elements of a web page and XMLHttpRequest an object/method for sending a request to a server and getting results back - optionally asynchronously through a callback method.  The API's for these capabilities are built into javascript on all modern browsers and allow a programmer to modify the page entirely due to timings or user input, and to query the server and modify the page based upon the results from it.

The DOM model is exactly the same one you get when you open tools button in your browser and see DOM Inspector.  What you see there, you can read and change in javascript.  This is the same "DOM" that you may be aware of as a key concept in XML processing.   DOM provides means of setting and changing attributes and of detaching, adding, and creating new elements (nodes) in the object hierarchy.   In essence a web browser is an XML parser (admittedly with some other things added in!) and this is just treating the things you see on the page as parts of an XML document with the added "magic" that when you remove something from the tree, it disappears from the page and when you add something, it appears (often moving other elements of the page to accommodate what you've added).  

XMLHttpRequest is the part which allows asynchronous happenings.  The part I didn't know about until recently though evidently it's been around for nearly a decade.   This object has means of building whatever you might need to present to a web server - cookies and form parameters, anything you might be sending from a form or a complex url, and get the results back into your javascript program.   And as your program can continue until the results come back, not necessarily waiting, your javascript can do many things and deal with the results queued as they arrive.

Javascript itself is a far more powerful language than I originally expected it to be.  There is an adequate if not extensive set of built in features and functions.   That it is a prototyping language rather than a class based language takes some getting used to - not least because all of the books and tutorials are downright wrong in explaining how to build an OO equivalent class capable of inheritance (by assigning [including functions] to the prototype of the class name, NOT the constructor).

Being interested in learning new things, the power of javascript, with its built in access to the DOM and the request object has parochially thrilled me.  I'm hooked.

The weak link of course, is the browser.  Each browser supports different invocations of the AJAX objects and different levels of support for DOM elements.  IE in particular is notorious for requiring DOMParser and XMLHttpRequest to be invoked explicitly as ActiveX objects, Microsoft refusing even the trivial courtesy of building wrappers in the javascript namespace so that they can be invoked with "new" as in the Firefox.  

This mishmash of supported features in different essentially means that the bulk of most AJAX libraries is a scaffolding of trivial conditionals holding together multiple but even more trivial but differing setting, retrieval and invocation of attributes and methods.  The sheer number of AJAX libraries tells me that, whenever possible, I'm better off developing my own conventions and standard objects and functions in javascript.    The horror of cross browser support tells me that whenever I can get away with it I should will develop only for Firefox - and ideally only the intersection of Firefox and w3c recommendations.  So far I've only written two AJAX apps at work and as they were both internal maintenance apps I haven't gotten fired for var req = new XMLHttpRequest; if(!req){alert("This application requires Firefox 1.5 or better browser!); throw "Bad, bad  Browser!"; }.  Obviously I couldn't do this for a "production" environment where users may have various browsers and an unwillingness to upgrade for my application.   But I suspect a lot of programmers will write for a single browser's API for their own purposes ... and publish it.   And sooner or later it will be obvious that one browser has "won".

This is an unstable situation.  If I am like other programmers there is a lot of frustration over not having a TRUE universal lightweight API for user interaction.  But Firefox is available -free, in all senses - for virtually all platforms now, and is the most w3c compliant browser.

AJAX is truly a mess right now, but it's a beginning of something good.  We have returned from whence we came.   Client-server returns.  

I have a hazy vision of all graphical desktops dying, being replaced, by an interface - perhaps even a low level interface to the video card drivers - which does nothing but run an (or multiple) instance of a web browser.  And ALl the presentation libraries replaced by built in web servers.  There's a long way to go and a host of protocols to be fought over before such can come to pass, but I suspect that in the long term, it will.

-- TWZ

< ex Penrose's The Emperor's New Mind (first comments) (1 comments) | Review: Cirque du Soleil: Delirium (0 comments) >
Display: Sort:
AJAX Conquers the World | 4 comments (4 topical, 0 editorial, 0 hidden)
Re: AJAX Conquers the World (3.66 / 3) (#1)
by ColonelZen (tzellers lieth within pobox of thy kingdom com) on Thu Nov 16th, 2006 at 22:32:57 EST
(User Info)
No techies left here?   AJAX has got to be worthy of some conflict!  I'm conflicted in my own mind about it.

-- TWZ

  • Re: AJAX Conquers the World by JCausey, 11/17/2006 22:14:04 EST (4.00 / 2)
Bye bye spambot (1.00 / 2) (#3)
by Potential Recruit on Tue Nov 28th, 2006 at 10:50:56 EST
This used to be a spambot post that is flooding the site. Due to volume, I had to resort to this while I work to block access by these bots. My apologies - thanks for your patience.

Jeff

Bye bye spambot (none / 1) (#4)
by Potential Recruit on Tue Nov 28th, 2006 at 14:27:43 EST
This used to be a spambot post that is flooding the site. Due to volume, I had to resort to this while I work to block access by these bots. My apologies - thanks for your patience.

Jeff

AJAX Conquers the World | 4 comments (4 topical, 0 editorial, 0 hidden)
Display: Sort:

Links

Firefox 2

Use OpenOffice.org

Add to Technorati Favorites

Join EFF Today

ToTehMoon web site button

~ Merkey v The Internet et al Docs
~ Yahoeuvre
~ tuxrocks.com (SCO cases legal docs)
~ scofacts.org
~ eagle.petrofsky.org
~ Zen's Den
~ Yahoo SCOX Message Board
~ Lamlaw
~ Microsoft Watch
~ Groklaw
~ Korgwal - a Groklaw mirror
~ nosoftwarepatents.com
~ Flame Warriors
~ SCOXE Wars
~ Get your Merkey Number here!
~ Digital Law Online

Recent Comments

Breaking News and External Article Comments
General News – General Articles
by ColonelZen, January 5
60 comments
» SCO Lifeboat List from Stats_for_all – AncientBrit, May 6
» Not a single comment on the Novell... – sphealey, Jul 22
» Re: Not a single comment on the Novell... – AncientBrit, Aug 8

Eagle Loses Appeals
General News – General Articles
by JCausey, December 15
1 comment
» Re: Eagle Loses Appeals – br3n, Jan 7

The Chinese Room Revisited, Thoughts on...
General News – Diary
by ColonelZen, November 24
1 comment
» Re: The Chinese Room Revisited,... – ColonelZen, Nov 24

How to Transition a Windows Shop to Linux
General News – General Articles
by JCausey, November 21
3 comments
» Re: How to Transition a Windows Shop to... – ColonelZen, Nov 22
» Re: How to Transition a Windows Shop to... – JCausey, Nov 23
» Re: How to Transition a Windows Shop to... – ColonelZen, Nov 23

Advocacy
General News – Diary
by br3n, October 29
3 comments
» Re: Advocacy – br3n, Nov 2
» Re: Advocacy – ColonelZen, Nov 2
» Re: Advocacy – br3n, Nov 4

Very Bad News for Darl and Ralph
SCO v The World – Diary
by ColonelZen, October 13
7 comments
» Re: OT advocacy – br3n, Oct 26
» Re: OT advocacy – JCausey, Oct 28
» Re: OT advocacy – br3n, Oct 29

Some SCOX Financial Analysis
SCO v The World – SCO Related Articles
by JCausey, September 21
13 comments
» Re: Some SCOX Financial Analysis – br3n, Oct 3
» Re: Some SCOX Financial Analysis – ColonelZen, Oct 3
» Re: Some SCOX Financial Analysis – br3n, Oct 6

Open Source in Education - Opening Doors
General News – General Articles
by JCausey, September 28
1 comment
» Re: Open Source in Education - Opening... – br3n, Sep 29

An IPOWER ful experience
General News – Diary
by ColonelZen, September 25
6 comments
» IPOWER SysAdmin Doesn't Do Weekends!! – ColonelZen, Sep 29
» Re: An IPOWER ful experience – ColonelZen, Sep 29
» Re: An IPOWER ful experience – ColonelZen, Sep 29

Learning C#
Microsoft – Diary
by ColonelZen, September 23
1 comment
» Re: Learning C# – ColonelZen, Sep 23

Comment search...

Recent Diaries

SCO has a Potential and Credible BILLION Dollar Liability
by ColonelZen - March 15

The Chinese Room Revisited, Thoughts on Consciousness
by ColonelZen - November 24
1 comment


Advocacy
by br3n - October 29
3 comments


An IPOWER ful experience
by ColonelZen - September 25
6 comments


Learning C#
by ColonelZen - September 23
1 comment


Getting ruby DBI for Mysql and Postgresql working on FC 6
by ColonelZen - March 7

Declaration of Linus Torvalds
by nedu - February 13
1 comment


Declaration of M. Douglas McIlroy
by nedu - February 12
6 comments


Declaration of Ulrich Drepper
by nedu - February 11
1 comment


Declaration of K. Y. Srinivasan
by nedu - February 11


More Diaries...

Login

Make a new account

Username:
Password:

Older Stories

Monday May 28th
Why SCO Does Not Own the Unix Copyrights
   (0 comments)

Thursday April 5th
It Can Really Happen - Eagle Broadband Delisting from AMEX
   (5 comments)

Monday March 12th
OpenOffice.org Sends Open Letter to Dell
   (0 comments)

Tuesday March 6th
Preliminary Order in Prohibition
   (2 comments)

Monday January 15th
[Linux-ia64] optimizing __copy_user
   (12 comments)

Older Stories...

Related Links

~ http://www .zensden.net/boredz/xmsg/view/1/211
~ http://www .ip-wars.net/story/2005/6/27/19419/8506
~ ColonelZen's Diary

SourceForge Logo Powered by Scoop

All trademarks and copyrights on this page are owned by their respective companies or owners.
Comments, articles and logbooks are owned by the Poster. By posting on the ip-wars.net web site, all posters grant a license to ip-wars.net to publish the content and release it pursuant to the Creative Commons License that covers the rest of the site. For more details, please check out the Standard Operating Procedures. Also, please read the Privacy Policy for the site. Finally, DO NOT send e-mail to the site owner (Jeff Causey) unless you have read and agree to the terms regarding e-mail included in the Standard Operating Procedures.
Everything else © 2004, 2005, 2006, 2007 ip-wars.net and Jeffrey G. Causey and is licensed under a
Creative Commons License
This work is licensed under a Creative Commons License.