| By Kevin Hakman, Davey Waterson | Article Rating: |
|
| September 4, 2008 03:43 PM EDT | Reads: |
1,867 |
Aptana Jaxer is a new open source application server built especially for AJAX application development in JavaScript. To say that "Jaxer lets you do JavaScript on the server-side" would be accurate, but an understatement. The core concept of Jaxer is that it provides a parity of environments at the client and the server to simplify the creation of rich AJAX pages, apps, and gadgets - and by so doing, gives the Web developer a unified runtime at both the client and server tiers.
How does Jaxer achieve this parity of environments? The main engine in Jaxer is the Mozilla engine - the same Mozilla engine you find in the Firefox Web browser. This means that besides JavaScript on the server, you also have the full spectrum of AJAX technologies available to you including DOM manipulations, CSS, and XHR plus other goodies that Mozilla implements like native XML support for JavaScript (E4X).
All of Jaxer's APIs are implemented in JavaScript and accessed via the Jaxer object. Using Jaxer, JavaScript developers can do all kinds of server-side coding that would have been the envy of their Java, .NET, PHP, Perl, Python, or Ruby peers. Jaxer.Session, for example, can create and manage user sessions; Jaxer.DB facilitates SQL database access; Jaxer.File lets you read/write files, and Jaxer.web lets you communicate across network sockets.
However, some of the most unique capabilities of Jaxer include the server-side manipulation of the HTML DOM and the ability to use AJAX libraries of your choice on the server side as well. Let's take a look at a simple example that puts these principles to work - in this case a simple survey application.
Building a Simple Voting Application
Let's vote...
In this example, we're going to build a simple voting tool using a single page of DHTML. The implementation is quite basic but covers a few good examples of how to use many of Aptana Jaxer's capabilities including:
- Executing JavaScript on the server
- Using AJAX libraries on the sever (jQuery in this example)
- Creating and accessing a database
- Server-side DOM manipulation
- Storing and retrieving session data
- E4X (native XML support for ECMAScript) as a templating mechanism
- Handling form data
Published September 4, 2008 Reads 1,867
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Kevin Hakman
Kevin Hakman is Director of Evangelism for Aptana, Inc., makers of the popular Aptana Studio web development suite. As early as 2001 Kevin was pioneering AJAX web applications via General Interface, a full AJAX development and GUI toolkit which he co-founded, and later sold to TIBCO Software in 2004. Kevin is a contributor to AJAXWorld Magazine, and has spoken at numerous AJAX industry events.
More Stories By Davey Waterson
Davey Waterson is a JavaScript architect at Aptana. He started out with Cobol coded on punch cards running on a Burroughs B1700 through to a DHTML Web UI using xhtmlRequest and Async Java. Davey has more than 20 years or experience as a code junky technophile and has worked in the industry in both Europe and North America.
- The Four "Quantum States" of AJAX
- A Simple Streaming AJAX App with OpenAjax Hub, TIBCO GI, and DWR 2.0
- From Enriched HTML to Client/SOA: The Four Quantum States of AJAX
- Get Smart
- The Big Shift with AJAX and Web Service Bus Architectures
- Corporate Mashups: Composite Applications Simplified Through AJAX and SOA
- Real-World AJAX Book Preview: Use of Dummy Data in These Exercises
- New Eclipse Plugin Adds Cloud Hosting for Java, PHP and Rails Applications
- Aptana Unveils Cloud Integration for Java and Eclipse
- JavaScript Powers Up the Server Side
- Aptana RadRails 1.2 Release Adds Rails Deployment and Cloud Hosting Ease































