2 Replies Latest reply on Aug 15, 2008 1:14 AM by Dr. Fred Mbogo

    Server Side AIR application

      I have an AIR application that I need to run on a Linux server that doesn't use a GUI. I found instructions on unpacking the .air file and launching it with adl. But is there a way to run the AIR application without the Window requirements? When I try to run the application it errors because the OS doesn't have a GUI layer. I couldn't find any info on this in the LiveDocs.

      Anyone have any experience with this?
        • 1. Re: Server Side AIR application
          Oliver Goldman Adobe Employee
          This isn't supported. AIR is intended for GUI applications only.

          • 2. Re: Server Side AIR application
            Dr. Fred Mbogo Level 1
            If you're just looking for server-side ECMAScript, take a look at Aptana Jaxer. It comes as either an all-in-one server with a bundled Apache listening on port 8000 for ease of setup, or you can get a separate mod_jaxer for integration into an existing Apache setup with a little work.

            Jaxer also comes bundled with their Aptana Studio product, which, like Flex Builder, is available as either a standalone Eclipse derivative, or as a plugin for an existing Eclipse setup. Flex Builder and Aptana Studio co-exist reasonably well as plugins. This makes testing Jaxer based sites easy, since you don't have to configure anything to get started. You get live previews in the IDE, complete with database access. (Yes, Jaxer has SQLlite and MySQL database support.) Working with a local Jaxer server also makes things like server-side debugging easier.

            Jaxer is free, open source software. There is a Professional version of Studio, but honestly, I've never used any of its features. I bought a copy anyway because I think Jaxer's worth money, but they don't ask for it.

            Jaxer is based on Mozilla JavaScript interpreter, using the same code base as in Firefox 3. This means you get much of the benefit of a post-ECMAScript 3 interpreter today: E4X, more functional Array class, generators, iterators... It's not as advanced as ActionScript 3, but then, it's looking like the rest of the world isn't going to adopt all of that anyway. It's easy to ignore these advanced features of Firefox's JavaScript interpreter because you can't count on them on the web because they aren't yet universal, but in Jaxer, you always know you've got that advanced interpreter available.

            Although not quite released as 1.0 yet, Jaxer is quite usable and stable today. Has been for months, in fact. They're just putting the last bit of polish on it right now.

            Being ECMAScript 3+, it can work very nicely with a client-side ActionScript app, using either JSON or XML (E4X) as the serialization mechanism. Jaxer has parsers and generators for both built in. Or, you can use AIR to serve HTML from a Jaxer server in a sub-window. As yet, there's no way to directly call a server-side function from the client side -- more accurately, no one's ported the technology to make it happen to ActionScript -- but the traditional REST web service model works well enough.