Monday, April 14th, 2008

Server-side jQuery, E4X, and more with Jaxer

Category: Aptana, Articles, JavaScript, Server

Davey Waterson of the Aptana Jaxer team has posted an article on using jQuery on the server-side with E4X and more that shows an example of server-side Ajax with a popular framework.

The article describes a polling application that features:

  • Using jQuery server-side to manipulate a DOM before it’s sent to the client
  • Doing some database / SQL interactions, server-side in javascript of course
  • User sessions in javascript (Jaxer.session.set(‘status’, status);)
  • Using E4X on the server-side.

There are fun little features such as nuking portions of the page if the permissions call for it:


  1. $((status == 'voter') ? '.nonvoter' : '.voter').remove();

Since the application delivers no JavaScript itself, this would all work even if the user has JavaScript turned off, on a simple mobile phone, etc.

Posted by Dion Almaer at 8:45 am

4.2 rating from 35 votes


Comments feed TrackBack URI

Hey, who are the crazies voting this post down? Although setting up a poll is pretty basic, the implications are huge! Look how easy this was done in one language:
* No need for a backend script to work the SQL
* Proper FULLY FEATURED server-side DOM manipulation without having to write or learn a backend DOM wrapper…
* Practically built-in templating, since you’re working directly with the DOM and JavaScript
MOD ARTICLE UP! Keep rockin, Jaxer Team!

Comment by doublerebel — April 14, 2008

Jaxer Team, as I wrote days ago in my blog, everything is cool, but not enough … please add a simple Java / Python / PHP / Ruby or “whatever you want” bridge, to perform tasks not implemented yet.

After them, it will be truly powerful and extremely extendible (As Rhino integrated in cocoon is, thanks to Java)

Best Regards

Comment by Andrea Giammarchi — April 14, 2008


You’ve pretty much summed up our plans.

Re: Java … we’ve announced that DWR will be way in which Jaxer will provide Java to/from JavaScript access. DWR rocks! Joe Walker how created DWR has written the hooks already, and we’ll be doing some internal testing and docs first before we put that into the nightly/weekly Jaxer builds.

We’ve got support for Ruby and PHP in Aptana Studio already as you probably know. And today (though we’ve not provided tutorials for this yet) you can use Jaxer to process HTML DOMs generated by Runy or PHP (or JSP, or ASP, or etc…) processes to do things like graft in richer controls, customize or personalize GUIs, implement role-baed entitlements for forms, and more.

But let me ask — what would be the key characterisitcs and authoring experience you’d like to see for PHP or Ruby or Python “bridges”?


Comment by khakman2 — April 14, 2008

Great information regarding to server site.

Comment by BeijingOlympic2008 — April 19, 2008

Leave a comment

You must be logged in to post a comment.