YOUR FEEDBACK
the usr wrote: So... how about your prediction that SCO would prevail? 11/20/2008 565 - FINAL...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP LINKS YOU MUST CLICK ON


Real-World AJAX Book Preview: The Essential AJAX Pieces
AJAX is a set of technologies that are now all part of most contemporary browsers

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs for the special pre-order price, click here for more information. Aimed at everyone from enterprise developers to self-taught scripters, Real-World AJAX: Secrets of the Masters is the perfect book for anyone who wants to start developing AJAX applications.

AJAX isn't so much a single technology as it is a set of technologies that are now all part of most contemporary browsers. Because of this factor, it's sometimes difficult to explain what precisely AJAX is, especially the degree to which XML or JavaScript predominates.

This chapter will explore most of the canonical elements of AJAX on the client and get into some of the grittier details about how exactly an AJAX application works. It will also stray a bit off course and show how AJAX applications can use some of the more advanced capabilities on browsers (such as XPath and XSLT) to simplify the underlying development process, though perhaps at the cost of some portability.

The Essential AJAX Pieces
This should be a no-brainer. AJAX stands for Asynchronous JavaScript and XML so it stands to reason that AJAX would have both of these as core pieces (and it does, though interpreting the role of XML varies considerably from user to user in the AJAX space). However, AJAX generally involves considerably more than just these two technologies.

On the client, in particular, what has come to be called AJAX can best be broken down into the following areas:

JavaScript: This provides the scripting language for performing most of the actions (and generally for setting up event management).
XMLHttpRequest: This particular component makes communication between the client and server possible from within a Web page.
HTML/XML Document Object Model: This provides a way of describing a Web page as a tree of interconnected objects.
Cascading Style Sheets (CSS): This language makes it possible to change the visual styling of the page to alter its presentation layer.

Besides these four elements, there are two more that are found in Internet Explorer and Mozilla Firefox:

XSLT: This transforms XML content into other XML content and works quite effectively for building rich objects from data streams.
XPath: This provides a way of navigating around complex XML structures more readily.

These will be covered in greater depth at the end of this chapter.

Whole books have been written on all of these topics, so my goal here is not to teach the basics of JavaScript, DOM programming, or CSS. Instead, I'll be looking at those techniques that may be a little more advanced, but hopefully also be of more use to you as developers. Please check out the references at the end of this book for more information on each of the core technologies.

Examining JavaScript
JavaScript (or ECMAScript, as it's formally known) has been around in various forms since early 1994. It's found in all contemporary Web browsers, and in slightly modified form in the Macromedia/Adobe Flash player, in Adobe PDF, and as a scripting language on both Windows- and Linux-based systems. It's used as the binding language of choice in the Mozilla Firefox and Thunderbird applications

Despite this fairly impressive use record, until comparatively recently JavaScript has been maligned as being too lightweight to be useful in real-world applications, but its gradual re-emergence as part of AJAX has left those JavaScript developers who understood the power of their "light" language feeling more than a trifle smug.

While it's easy to look at JavaScript as being, as its name implies, a scripted variant of Java, this impression is in fact somewhat erroneous. Java is a strongly typed language with an elaborate inheritance mechanism and a foundational class system with classes numbering in the thousands. It has only recently branched into type templates and reflection.

JavaScript, on the other hand, views classes as being particular variants of functions, envisions objects as little more than bundled collections of properties and methods, dynamically assigns type depending on the context, and has only a handful of "core" objects and no foundational class system to speak of. Indeed, while it's possible to inherit classes in JavaScript, in point of fact it's usually far more effective to keep inheritance down to an absolute minimum.

These differences have made for very different ways of programming JavaScript compared to Java. Add to this the question of scope – JavaScript is typically used to automate Web page manipulation and, as such, is generally far more transient than most Java applications – this leads to a situation where the best way to learn JavaScript seriously is to forget that you ever learned Java and take it from scratch.

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs, click here to order.

About Kurt Cagle
Kurt Cagle is a developer and author, with nearly 20 books to his name and several dozen articles. He writes about Web technologies, open source, Java, and .NET programming issues. He has also worked with Microsoft and others to develop white papers on these technologies. He is the owner of Cagle Communications and a co-author of Real-World AJAX: Secrets of the Masters (SYS-CON books, 2006).

LATEST LINUX STORIES
rPath has announced support for the Ubuntu and CentOS Linux operating systems as part of rBuilder and the rPath Lifecycle Management Platform. rBuilder is the category-defining build and release management system for creating virtual appliances and application images. The rPath Lifecyc...
IBM is going to buy Transitive, the British cross-platform virtualization firm that salvaged legacy Macintosh programs and made Apple's move from IBM to Intel chips as graceful as a prima ballerina’s pirouette. Transitive is clever at running applications written for one kind of micr...
IBM has found something else to do with Linux. Its Lotus software operation is going into the hardware business – it’s concocted a Linux-based server appliance for e-mail, calendaring and its OpenOffice-based Symphony software for SMBs called IBM Lotus Foundations Start.
Omni and Userful have announced that over 50 academic institutions from 29 US States and 10 countries worldwide have signed up to deploy Multi-station SUSE Linux Enterprise Desktops through the "Free the Penguins" education initiative. Originally launched in September, "Free the Pengui...
Aonix has announced the release of PERC Ultra SMP with support for Concurrent’s RedHawk real-time Linux and associated NightStar advanced Linux debugging and analysis tools. PERC Ultra, Aonix’s flagship product, targets the same time-critical applications such as simulation and tra...
Centrify, the folks with Active Directory savvy clever at using it on non-Microsoft platforms, is moving out Centrify Suite 2008, an integrated family of Active Directory-based auditing, access control and identity management solutions that secure cross-platform environments and help a...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE