You searched for: 'jaxer'

Thursday, January 22nd, 2009

JsMemcached.js: JavaScript Jaxer Client

Category: Aptana, JavaScript

Rakesh Pai has created a Jaxer JavaScript client for Memcached.

Once you load the file you simple configure the main object (change the file rather than calling .config(…) which would make more sense):

javascript

  1. JsMemcached.set("keyName", "Value here, as long as you want");
  2.  
  3. JsMemcached.get("keyName");
  4.  
  5. JsMemcached.close(); // no open() as it is lazily done on your behalf

Posted by Dion Almaer at 4:08 am
3 Comments

++---
2.8 rating from 21 votes

Friday, October 31st, 2008

Aptana Jaxer 1.0 released, brings together the Aptana trinity

Category: Aptana

Paul Colton of Aptana has announced the Jaxer 1.0 release. This comes on the heels of the general availability of Aptana Cloud, and of course their Studio product that ties things together.

First, Jaxer 1.0:

If you’ve already been using Jaxer you’re likely familiar with its database, file system and socket APIs and its ability to not only run JavaScript and process the HTML DOM at the server, but also to expose server-side functions to the Web such that a HTML page can call back to those functions directly from the Web page. Thus Ajax communications could not be any easier with Jaxer: You just write a server-side function, “proxy it” with one line of code, then call it from the Web browser as if that function were part of the web page. Jaxer handles the client/server communications, data transformations, and provides the client-side function with its return value (either synchronously or asynchronously).

Recently we’ve added even more capabilities based on community feedback. These including support for RESTful APIs as well as native support for JSON to supplement the E4X (XML for JavaScript) support that’s been there all along (thank you Mozilla!). The combination of these means you can easily create RESTful services that can be consumed by a wide array of Ajax applications, Web gadgets, Facebook or OpenSocial apps, and even Adobe Flash or Microsoft Silverlight based apps since those support JavaScript too. Plus mobile devices like the Apple iPhone and phones from other manufacturers are nearly all supporting JavaScript and Ajax. As you can imagine we’re excited to see JavaScript become more and more the lingua franca of Web applications. It’s already ubiquitous on the client side and now you can use it confidently on the server side.

We sat down with Paul, Uri Sarid (CTO), and Kevin Hakman (Director of Evangelism) to talk about this release in particular as well as the other recent news and the grand plan.

We have the audio directly available, or you can subscribe to the podcast.

There are a series of nice new screencasts to give you a quick feel for it all. Learn more about Jaxer, Cloud, and Studio.

Posted by Dion Almaer at 1:14 pm
2 Comments

++++-
4.2 rating from 26 votes

Wednesday, October 8th, 2008

Aptana Jaxer 1.0 RC

Category: Aptana

The Jaxer team has released a release candidate for Jaxer 1.0.

Here a synopsis of all the new features and improvements that have gone into this latest release candidate:

  • Jaxer.Sandbox: HTTP-level control; support readyState, toHTML, waitForCompletion
  • Built-in, extensible dispatching for RESTful and RPC service requests
  • Fast, native JSON support
  • Improved APIs for HTTP Request and Response
  • More flexible handling of application configuration
  • Many bug fixes, smaller improvements, and cleanups

They are moving pretty fast, so are looking for feedback before they wrap up a final 1.0 release.

Posted by Dion Almaer at 5:12 am
3 Comments

++++-
4 rating from 33 votes

Wednesday, September 17th, 2008

Aptana Jaxer Benchmarks

Category: Aptana

Jaxer has been out in beta for a while and is nearing its 1.0 release. Many comments on Ajaxian about Jaxer have been about performance benchmarks. Uri Sarid, CTO of Aptana, has compiled some initial benchmarks including comparisons to PHP and Ruby on Rails. (Jaxer comes out in between the two):

We wanted to answer a simple question: how does Jaxer, with its server-side DOM and JavaScript, perform relative to these other popular alternatives?

This was not designed to be an all-encompassing shoot-out, or a detailed study of everything you might want to do in a web app. Instead, we took a few common tasks — making database requests, using JSON, etc. — and implemented them as you might expect in the three platforms. We made enough DB requests and JSON calls and so on to give us a reasonable number of milliseconds to measure. But we also wanted to make the repetitions representative of what you might find on somewhat intensive real-world page, so we’re not making a million DB requests, just a hundred, for instance. And we included one benchmark of serving an almost-static page: the “almost” was to make sure we were measuring the time the platform took to really read through the page, in case it had dynamic content in it. (Otherwise, if the page were truly static, you could always arrange for the web server to serve it without involving the platform.)

The tests include page scraping tests (e.g. mashup work), database performance, file I/O, JSON, and programatical loops.

Posted by Dion Almaer at 8:35 am
3 Comments

++++-
4 rating from 14 votes

Monday, September 8th, 2008

Form access control via jQuery and Jaxer

Category: Aptana

Tom Kirkpatrick has written about writing one form, and using access control to map it to various roles using jQuery and Jaxer.

This is a simple pattern. You never want to use client code to manage access, for obvious reasons. The approach is to use the server to spew out HTML that makes sense, and then parse in the input and check access control.

Using Jaxer, this is all taken care of in JavaScript, and you can use libraries such as jQuery to do work there.

One solution to the roles issue is to manipulate the DOM on the server before it heads to the client. The magic lies in the ‘server-nocache’ directive which tells Jaxer than “the code should only run on the server, and that the code or should not be cached and will therefore not be available during callbacks.”

  1. <script runat="server-nocache">
  2.  
  3. // some kind of authentication to get current users role
  4. role = getRole()
  5.  
  6. // remove private form elements
  7. $((role == 'employer') ? '.employee.private' : '.employer.private')
  8.   .remove();
  9.  
  10. // disable irrelevant form elements
  11. $((role == 'employer') ? '.employee input' : '.employer input')
  12.   .attr('disabled', 'disabled');
  13.  
  14. // no need to inject Jaxer client framework (saves about 20k)
  15. Jaxer.response.setClientFramework();
  16. </script>

Of course, to be safe, you need to always test access control incoming, and not rely on the HTML that you send down.

Posted by Dion Almaer at 7:42 am
3 Comments

+++--
3.6 rating from 17 votes

Wednesday, August 20th, 2008

Running server side processes via JavaScript with Jaxer

Category: Aptana, JavaScript, Server

Tom Kirkpatrick has written about a new API in Jaxer, Jaxer.Process, that allows you to call out to the host operating system. His example has a call out to get the uptime on the machine:

javascript

  1. <script runat="server-proxy">
  2. function runUptime() {
  3.       // run the uptime and return the output from STDOUT
  4.       return Jaxer.Process.exec("/usr/bin/uptime");
  5. }
  6. </script>

You can see the application running live.

Posted by Dion Almaer at 10:45 am
1 Comment

+++--
3.9 rating from 21 votes

Friday, August 1st, 2008

Another Jaxer 1.0 Release Candidate with new APIs

Category: Aptana

Greg Murray has blogged about a new release candidate for Aptana Jaxer that contains a lot of new features.

Kevin Hakman told us about the release:

We’ve had server-side JS database APIs all along, but now handing result sets is even easier. There’s also now full fine grain control and access to the entire communication cycle with APIs for message headers, redirects, content and types. Speaking of types… for the first time with Jaxer, you can return content types other than HTML including JSON, XML, GIF, etc… Yes, even GIFs. Jaxer has a fresh new Image API that among other things can convert Canvas to static images and serve them up. Like, Greg, I too really like the idea of using Jaxer for easily creating JSON data services which is a rapidly growing trend as developers discover the powerful capabilities of JSON more and more. In Jaxer, it’s very cool since it’s all native JavaScript on the client, on the wire, and on the server. There’s even enhanced JSON serialization to make it even easier than before on both client and server. JSON services also open Jaxer to be useful in combination with rich internet clients other than Ajax UIs such as Flash, Flex or even Silverlight since all those support JavaScript on the client and can consume JSON data. For Ajax and RIA developers this is a boon since you can now write your client-side and server-side code in the same language. And if you prefer XML data services Jaxer’s native E4X (ECMAScript for XML) support means you can handle XML docs natively in JS on Jaxer as well.

This release also includes a totally new concept: a secure sandbox which as Greg explains, “lets you load, on the server, pages from other domains and allow their JavaScript to execute without giving them access to the Jaxer API or your own server-side code, but still gives your code access to their window objects and anything inside them”. For anyone who has ever done screenscaping for mashups or other applications, this really helps a lot since Ajax pages have historically thwarted scraping operations. With this feature in Jaxer you can securely get a remote page, execute its functions, and scrape the resulting DOM nodes (yes, you need not do tedious manipulations with strings) and voila!

Here are the features:

  • Application context settings that allowing for easier app configuration, app properties, database settings, etc…
  • Database API enhancements with richer APIs for working with result sets.
  • Server-side image manipulation including server-side canvas support and ability to convert to other image types.
  • Native command execution API so that you can run system commands and handle the output from those.
  • Asynchronous server-side JavaScript processing lets you implement callbacks in your server-side code too.
  • Ability to return custom content types (e.g. json, xml, gif, html, etc…)
  • Full control of the request/response lifecycle including setting redirects, headers, content, etc…
  • Secure sandbox supporting cross domain calls, sandboxed JavaScript execution, META refreshes, …
  • Serialization support for JavaScript objects to and from XML, E4X and JSON.

Uri Sarid has a great post that shows how you can do DOM Scraping with Jaxer, and updates it for this latest release:

There’s a lot of other new goodness in Jaxer 1.0, as well as the official released version of the Mozilla engine found in Firefox 3. So for example getElementsByClassName is natively implemented (see John Resig’s speed comparison), in addition to the other Mozilla features such as built-in XPath functionality and a very robust DOM feature set — just what you need for some serious ‘screen scraping’, mashups, and content repurposing.

Let’s see it in action!

It includes code that shows the Sandbox in action, as well as the DOM work:

javascript

  1. // Gets a fragment of the remote page's HTML, after some cleanup  
  2. function getFragment(title, url, isClassName, identifier, classesToRemove)  
  3. {  
  4.     var sandbox = new Jaxer.Sandbox(url);  
  5.     var contents = sandbox.document[isClassName ? 'getElementsByClassName' : 'getElementById'](identifier);  
  6.     var container = addToPage(title, contents);  
  7.     if (classesToRemove)  
  8.     {  
  9.         if (typeof classesToRemove == "string") classesToRemove = [classesToRemove];  
  10.         classesToRemove.forEach(function(className)  
  11.         {  
  12.             removeNodeList(container.getElementsByClassName(className));  
  13.         });  
  14.     }  
  15.     return container.innerHTML;  
  16. }  
  17. getFragment.proxy = true;

Posted by Dion Almaer at 1:51 pm
7 Comments

++++-
4.2 rating from 32 votes

Monday, July 28th, 2008

Greg Murray, Ryan Johnson join Aptana to work on Jaxer; ORM and MVC are starter projects

Category: Aptana

Paul Colton posted that Aptana has a couple of new recruits in Greg Murray and Ryan Johnson.

Greg Murray was the Ajax guy at Sun, created jMaki, and did a lot of work in organizations such as the Open Ajax Alliance. Ryan Johnson is the creator of the livepipe and object.event Ajax libraries. What are they doing?

Greg’s primary role will be creating increasingly robust application frameworks for Jaxer, Aptana’s open source Ajax server product. Ryan has already been working on MVC concepts for Jaxer and will be collaborating with Greg and the rest of the Jaxer team to drive that and other great concepts for Jaxer forward.

The timing could not be better. Greg and Ryan have joined up just before we get the Jaxer 1.0 release candidate out the door to the whole community (it’s just a matter of days now). This puts us in a great position to start working on some of the next things that’ll be in store for Jaxer in the coming months — and there are some great ideas brewing. For example, Greg and Ryan have already been collaborating with the Jaxer team to create an ActiveRecord-like JavaScript ORM for Jaxer that promises to make working with JavaScript data a pleasure — since it’ll all be native JavaScript!

Posted by Dion Almaer at 10:07 am
8 Comments

+++--
3.5 rating from 26 votes

Friday, July 4th, 2008

Talking to .NET on the server with Jaxer

Category: .NET, Aptana

What does your CEO do? Paul Colton, CEO of Aptana, gets his fingers dirty. He just wrote a post about accessing COM objects from JavaScript with Jaxer.

This is possible as the JavaScript is running on the server, and this server is running on Windows. You can download the source code to check it all out.

  1. <html>
  2.      <body>
  3.          <script runat="server-proxy">
  4.              function rotate(angle)
  5.              {
  6.                  var img = COMObject("ImageProcessor.ImageProcessing");
  7.  
  8.                  img.LoadImage(Jaxer.request.documentRoot + "/photo.jpg");
  9.                  img.RotateImage(angle);
  10.                  img.SaveImage(Jaxer.request.documentRoot + "/new.jpg");
  11.              }
  12.          </script>
  13.          <input id="angle"/>
  14.          <input type="button" value="Rotate"
  15.                        onclick="rotate(document.getElementById('angle').value);
  16.                                document.getElementById('img').src =
  17.                                document.getElementById('img').src + '?' + new Date()"/>
  18.          <br />
  19.          <img id='img' src="new.jpg"/>
  20.      </body>
  21. </html>

Posted by Dion Almaer at 6:56 am
5 Comments

+++--
3.7 rating from 36 votes

Wednesday, June 11th, 2008

Leveraging Ext JS on the Server via Jaxer

Category: Aptana, Sencha

When Aptana released Jaxer, it really excited the community because you could now leverage your client-side skills on the server end of things. Rich Waters of Ext JS talks about how to leverage Ext JS on the server via Jaxer. The code created by Rich creates a Ext JaxerStore which allows you to run queries and directly put them into a Ext Store. This has the benefit of leveraging the same Ext language syntax you’ve become accustomed to for server-side processing by allowing Jaxer to wrap client and server-side communications up allowing either synchronous or asynchronous calls between the client and server.

I asked Rich why would developers do this versus doing a simple Ajax call to a template sitting on a server:

The template bit lets you generate the html before the page is served up so that no extra client side calls are necessary. I think the Ext template system is really slick and easier than even a lot of other existing server side templating systems. More or less it was also just an example to get people thinking about what could be done now that Ext can be run server-side.

The code snippet allows you to make the calls to Jaxer very easily:

javascript

  1. Ext.onReady(function() {
  2.    var store = new Ext.data.JaxerStore({
  3.        table : 'demo',
  4.        fields : [
  5.            {name : 'name'},
  6.            {name : 'phone'},
  7.            {name : 'email'}
  8.        ],
  9.        readerConfig : {
  10.            sortInfo : {
  11.                sort : 'name',
  12.                dir : 'asc'
  13.            }
  14.        }
  15.    });
  16.  
  17.    // create the Grid
  18.    var grid = new Ext.grid.GridPanel({
  19.        store : store,
  20.        columns : [
  21.            {header : "Name", sortable : true, dataIndex : 'name'},
  22.            {header : "Phone #", sortable : true, dataIndex : 'phone'},
  23.            {header : "Email", sortable : true, dataIndex : 'email'}
  24.        ],
  25.        viewConfig : {
  26.            forceFit : true
  27.        },
  28.        stripeRows : true,
  29.        height : 350,
  30.        width : 680,
  31.        title : 'Jaxer Demo Grid',
  32.        renderTo : Ext.getBody()
  33.    });
  34. });

which would then populate a grid control and render it accordingly.

The source code to this new functionality can be downloaded here.

Posted by Rey Bango at 6:00 am
Comment here

++++-
4.2 rating from 79 votes

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:

javascript

  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 Comments

++++-
4.2 rating from 35 votes

Thursday, March 20th, 2008

Multiple File Uploads with Aptana Jaxer

Category: Aptana, Examples, JavaScript

Dealing with file uploads can be a test of a Web framework. I personally long for the input type="file" to be improved with items such as multiple="true" for multiselection, let alone showing the status of the upload (20% complete).

The Jaxer folks have posted on Easy File Uploading using Aptana Jaxer which shows how you can tinker in JavaScript to get everything you need in a very simple way:

To receive the data from the form when submitted we put some Jaxer code into the page the form will be submitted to. The code below should be in script block with a runat = ‘server’ attribute, which makes the code run serverside and doesn’t present it to the client so you don’t expose any serverside filenames or folder structures.

  1. <script type='text/javascript' runat='server'>
  2. var message = "";
  3.  
  4. for (fileCount=0; fileCount < Jaxer.request.files.length; fileCount++){
  5.    var fileInfo = Jaxer.request.files&#91;fileCount&#93;;
  6.    
  7.    var destinationFilePath = Jaxer.Dir.resolvePath(fileInfo.originalFileName);
  8.    fileInfo.save(destinationFilePath);
  9.  
  10.    message += "<br>" + [
  11.         "Saved to : "           + destinationFilePath
  12.     ,   "original filename : "      + fileInfo.originalFileName
  13.     ,   "temp filename : "      + fileInfo.tempFileName
  14.     ,   "contentType : "        + fileInfo.contentType
  15.     ,   "size : "               + fileInfo.fileSize
  16.     ].join("<br />");
  17.    
  18. }
  19. document.write(message);
  20. </script>

Posted by Dion Almaer at 5:52 am
4 Comments

+++--
3.8 rating from 22 votes

Tuesday, March 4th, 2008

Dojo and Django templates on the server side with Jaxer

Category: Aptana, Dojo

Yesterday we posted about Dojo and AIR and how the framework could be well suited for certain desktop applications.

Today we have Kriz Zyp talking about their Jaxer support and how you can use the Django template language, that Dojo recently added, to once again do its thing on the server side.

Kris tells us more:

  1. <script runat="both">
  2. djConfig = {baseUrl:"/dojo/",usePlainJson: true, parseOnLoad: true};
  3. </script>
  4. <script runat="both" type="text/javascript" src="../../../dojo/dojo.js"></script>
  5. <script runat="server">
  6. dojo.require("dojo.jaxer");
  7. ...
  8. </script>

Once this is done, Dojo should load in Jaxer, and you can utilize the library capabilities of the Dojo Toolkit on the server side. In particular, you can now use the DTL renderer as you would on the browser. The DTL renderer can take templates written using Django template language and render the templates based upon JSON data. If you are running Jaxer, you can view a demonstration of DTL rendering on the server by loading /dojox/dtl/demos/demo_Templated_Jaxer.html (make sure the Dojo Toolkit base URL is correct).

By using Jaxer’s capability to allow scripts to execute on both the client and server, we can utilize our Dojo Toolkit in both environments. On the server we can utilize many of the Dojo Toolkit’s features such as functional language features, math libraries, cryptography, dates, encoding, and more to improve development speed and code quality. We can use the same powerful features and idioms in both the browser and the server. An example of a practical way to use the Dojo Toolkit in both environments is to utilize the DTL renderer as described above to generate HTML on the server, and then use the Dojo Toolkit’s Ajax capabilities to dynamically update the page once it’s on the browser. For example: we could use the DTL renderer to display the comments in a blog, dynamically add any new comment the user makes at the end of the list of comments, and then send the comment to the server using Ajax.

It is important to note that Jaxer is not capable of transferring the programatically set event handlers for widgets—it can only send the static HTML to the browser. This means you can use DTL as a templating engine to create HTML on the server, but the Dojo Toolkit client side widgets are still necessary if you want to use interactive widgets on the browser.

Posted by Dion Almaer at 7:58 am
Comment here

+++--
3.8 rating from 21 votes

Monday, February 18th, 2008

Audible Ajax Episode 24: Aptana Jaxer Talk

Category: Aptana, Framework, JavaScript, Podcasts

I had the opportunity to sit down with three fine gents from Aptana to discuss their recent launch of Jaxer, the “server side Ajax framework”.

Paul Colton, Uri Sarid, and Kevin Hakman all sat with me to chat about things. I have already played with Jaxer, and created the Google Gears wrapper which can be used seemlessly for use cases such as “If the user doesn’t have Gears installed, just do it on the server”.

We discussed a lot in the twenty odd minutes including:

  • Where the idea for Jaxer came from
  • The difference between a server side JavaScript framework and Jaxer (since there are many of them!)
  • How Jaxer works (think of a headless Mozilla browser)
  • Side effects of going this direction
  • How developers are using it
  • How does your architecture change if you are using Jaxer?
  • How can you talk to code in Java and other languages?
  • How JavaScript 2 fits into the picture
  • What about deployment?

A lot of good stuff. Thanks to the crew for taking the time to chat with me. What other questions do you have for them?

We have the audio directly available, or you can subscribe to the podcast. We also have the video in high def here, or in normal def right below:

Posted by Dion Almaer at 9:37 am
7 Comments

++++-
4.1 rating from 37 votes

Tuesday, January 22nd, 2008

Aptana releases Jaxer, Ajax server built on Mozilla

Category: Ajax, Aptana, JavaScript, Library, Screencast, Server

Aptana Jaxer

Aptana has been known for its Eclipse based Ajax IDE Aptana Studio. Paul Colton, CEO, has impressed us at The Ajax Experience as he has shown of Studio, and how Aptana is fast to adapt and come out with support for iPhone development, Adobe AIR, and more.

But today Aptana is breaking out of the IDE world, and joining the server market with the release of Jaxer, which they are calling an “Ajax Server”. Jaxer brings JavaScript, the DOM, HTML, CSS, to the server as it tries to unify the development model for developers.

You can think of the server as a Mozilla version of Tomcat. It plugs nicely into Apache (and more in the future), and handles the web application requests for you.

An example: validation

One solid way to understand Jaxer is to look at an example such as validation (screencast). Wouldn’t it be nice to be able to reuse your validation logic on the client and the server? This example shows you how you do just that:

Part 1: Server Proxy

This code shows you how to use runat="server-proxy" to wrap that code in a way that the client can call it, but it gets seamlessly ran on the server:

  1. <script runat="server-proxy">
  2.     // Set the value of the input field 'name'
  3.     // to the initial value
  4.     document.getElementById("name").value =
  5.         Jaxer.File.read("name.txt") || "A Long Entry";
  6.    
  7.     // Function to save the value to a file
  8.     // once validated
  9.     function saveToFile(value) {
  10.         validate(value);
  11.         Jaxer.File.write("name.txt", value);
  12.         return new Date();
  13.     }
  14. </script>

Part 2: Share code with ‘both’

Then you write a simple validator that can be run on both client and server:

  1. <script runat="both">
  2.     // Use the same function to validate on the browser
  3.     // for user feedback and on the server for security
  4.     function validate(name) {
  5.         if (name.length > 5)
  6.             throw new Error("'" + name +
  7.                 "' exceeds 5 characters!");
  8.     }
  9. </script>

Part 3: Client side script

Finally you have the client side code that calls in:

  1. <script>
  2.     // Browser-side script
  3.     function save(){
  4.         // Runs when user clicks save
  5.         var name = document.getElementById("name").value;
  6.        
  7.         try {
  8.             // Validate in browser, if successful
  9.             // save on server
  10.             validate(name);
  11.            
  12.             // Call server-side function 'saveToFile'
  13.             // and get return value
  14.             var savedDate = saveToFile(name);
  15.            
  16.             // Update the confirm DIV browser-side
  17.             document.getElementById("confirm").innerHTML =
  18.                 "Saved on " + savedDate;
  19.         }
  20.         catch (e) { alert(e.message); } // Show any errors to the user
  21.     }
  22. </script>

This is the tip of the iceberg. There are other examples available as part of the download, and as screencasts.

What does this mean?

If you don’t like context switching between the Web world of HTML/CSS/JS/DOM (Ajax) and the server side language of your choice, then this could be the programming model for you.

Unobtrusive Ajax

There are some interesting benefits, such as the ability to do a good job with certain accessibility without much work. If the browser doesn’t have JavaScript turned on, the server can run the code and produce the HTML for you. Obviously, the HTML interface that is returned would be less dynamic.

The execution flow looks like this:

Jaxer Flow

Prototype/jQuery/Dojo/… on the server

You can use your client-side library of choice on the server (e.g. Prototype, Dojo, jQuery, etc). My screencast below in fact does just that. The aim isn’t to create a totally new programming model, but to rather be part of the Web. That being said, they had to add a set of libraries to allow you to do things on the server that you can’t on the client. For example, the file reading in the example above: Jaxer.File.read("name.txt").

Databases

To build server side Web applications you normally need to persist data. Database access is provided via Jaxer.DB.*, and SQLite is built in. As soon as I saw this, I pictured a wrapper for Jaxer that would bridge the Google Gears database API. There is the ability to build some simple syncing, and have the framework do the right thing depending on if you are offline or online, and shifting data between the local and remote SQLite database. Very promising.

Cross domain XHR

Since you can have XHR calls which are really coming from the server, you can talk to any domain. Again, in my example, I proxy through to Twitter, which allows me to do a Greasemonkey type solution that works in all browsers.

JavaScript 1.8

Since the latest Spidermonkey is available on the server, you can write JavaScript 1.8 using new features such as expression closures, generators, and more. You have to be careful here and remember that this will only work for code ONLY running on the server. For all other code, you have to do the usual thing and test it with the various browsers that matter to you.

Rails for JavaScript?

I hope that we do not see a lot of huge pages with runat="server" all over the shop. We did that in the ASP/PHP/JSP of old. I am sure that frameworks will pop up to do MVC nicely with Jaxer. One option would be having Jaxer work nicely with projects such as Trimpath Junction and the project that Steve Yegge often talks about…. which is Rails-like but for JavaScript (using Rhino). Integration will also be an issue for a certain class of applications. I can imagine there being a particularly strong connection for something like Java.

IDE independence

Although Aptana Studio has top notch support for Jaxer (it better!), the product does not depend on any IDE and you are free to use it with anything. To show this, I use the stand alone Jaxer server and write my code using vi.

In fact, let’s check out the video that builds a Twitter proxy in a few lines of code, showing how the beast works.

(I recommend watching the video at Vimeo to make a larger window to see the type).

Posted by Dion Almaer at 3:00 pm
24 Comments

++++-
4 rating from 63 votes

Sunday, March 19th, 2006

NetJaxer: Web-Desktop Integration

Category: Showcase, Usability

NetJaxer is a windows app that integrates the desktop with a number of web apps, like GMail and Writely. You get shortcut icons in the desktop and system tray, and there’s a special NetJaxer browser for interacting with the web apps.

Our program is called NetJaxer http://www.netjaxer.com/ It’s a free and easy way to integrate a users favorite Web 2.0 apps like Gmail, TadaList, Digg, Writely, Kiko, iOutliner, Meebo, financial sites, and other Ajax based web programs right into Windows. They can create desktop, tray, and quick launch icons. These applications can easily be used with our custom browser.

It’s hard to see how NetJaxer is adding a lot of value at this stage (you can achieve similar functionality by dragging website icons to the desktop), but there’s certainly potential in the idea – imagine dragging a document into a GMail icon or having desktop notification that your buddy just logged in to Campfire.

Posted by Michael Mahemoff at 5:47 pm
6 Comments

+++--
3 rating from 34 votes