Activate your free membership today | Log-in

Wednesday, August 20th, 2008

Running server side processes via JavaScript with Jaxer

Category: Aptana, JavaScript, Server

<>p>

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

You can see the application running live.

Related Content:

  • Google Chrome shifts architects' equations as V8 powers the browser
    The V8 JavaScript engine in Google's Chrome browser offers the enterprise architect new options for moving server-side functionality to the Web...
  • Diet Ajax, 100% JavaScript free
    The open source Ajax framework ZK 1.0 has been released with its own markup language along with XUL and XHTML components to get around programming in...
  • Ajax (Asynchronous JavaScript and XML)
    Ajax (Asynchronous JavaScript and XML) is a method of building interactive applications for the Web that process user requests immediately. Ajax...
  • Rhino in Spring 1.1 ready to run
    Rhino in Spring, which is designed to integrate the Mozilla Foundation's Rhino JavaScript interpreter for Java with the Spring Framework, has its next...
  • Junk JavaScript?
    Should JavaScript and HTML be replaced with "proper" languages that might give more bang for the buck in rich Internet applications (RIAs)? One reader...

Posted by Dion Almaer at 10:45 am
1 Comment

++++-
4.1 rating from 16 votes

1 Comment »

Comments feed TrackBack URI

Here’s the full article from Tom including the source to the app:
http://www.codegobbler.com/how-execute-server-side-processes-jaxerprocess

Comment by khakman2 — August 20, 2008

Leave a comment

You must be logged in to post a comment.