JavaScript is pretty much everywhere you look these days, reaching far beyond your desktop browser. Adobe AIR lets you use JavaScript to create desktop installed HTML and Ajax apps. Apple uses it in its gadgets and in the iPhone's browser. And Nokia recently announced support for installed, local JavaScript apps on its phones with APIs to the camera, GPS, etc... (Anyone spotting a WebKit trend here?) You can even use JavaScript to create extensions for Aptana Studio and Dreamweaver too! Anyways, with all this JavaScript out there powering so many things we use every day, having great JavaScript debugging capabilities is paramount to development.
That's why today we're pleased to announce a huge step forward in the ease of creating Ajax and HTML apps for Adobe AIR: Today's release of the Adobe AIR Development Plug-in for Aptana Studio (beta) features, you guessed it — JavaScript debugging for Adobe AIR apps along with support for Adobe AIR 1.5 which Adobe announced earlier this week.
We previewed the JavaScript debugger for Adobe AIR apps yesterday to a group at Adobe MAX in San Francisco and got applauded for providing this critical utility to the AIR community. Like with other debugging environments you’re familiar with, just click to set a break point in the gutter, then step through, into and out of lines of code while viewing variables and introspecting objects. We think you'll find it quite useful. Did I mention it was free too?
 
Check out this short screencast for a preview.
Or, if you can't wait here's how to get your hands on it now:
As I mentioned it's a beta, so we're eager to get feedback now so that we can make final changes as well as start to add enhancement requests for future functionality.
Visit www.aptana.com/air for more info, links to forums, bug reporting, enhancement requests, docs and more resources.
"I discovered Aptana Cloud and to say I’m impressed is an understatement," says John Beynon in his blog post regarding Aptana Cloud. "Without any code changes, I right clicked the project containing my blogs WordPress installation and choose to deploy it to the cloud. After a brief sign up for a 21 day trial (no credit card required) and selection of my required service I was good to go and was presented with a synchronise view to send my project up to their servers and a few minutes later my code was all in the ‘cloud’."
Aptana Cloud: Learn More | Watch Screencast
I am excited to announce that the 1.0 version of Jaxer, the free, open source Ajax server, has been released. If you like working with JavaScript and Ajax, you're going to love Jaxer! This 1.0 release of Jaxer is the culmination of three years of work to deliver this first-of-a-kind Ajax server that embeds the Mozilla Firefox browser engine within a server and full JavaScript application framework so that you can use your JavaScript and Ajax skills not just to create web pages but also to create full web applications on the server as well.
If you can't wait, download it now or learn more.
While Jaxer is the brainchild of members of the Aptana team who have been advancing it since Aptana was founded, kudos must also go to the developer community who has actively participated in Jaxer betas since early 2008 and provided much feedback that's guided Jaxer development. Thus in many ways Jaxer is an Ajax server built by web developers for web developers. Jaxer was also created with guidance from members of our technical advisory board including Brendan Eich, creator of JavaScript and Mozilla CTO, who helped us with insights to tune things and deliver initial performance benchmarks for Jaxer in the range of PHP and Ruby on Rails.
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.
This introduction to Jaxer screencast shows you the Jaxer basics with some examples of using Jaxer's
<script runat="server | both | server-proxy" > settings.
Here are more examples of Jaxer in action:
Jaxer 1.0 is dual licensed. It's available to all for free under an open source license or in its Jaxer Pro edition under a commercial license and support agreement from Aptana. Jaxer is available to try in various ways: It is included in Aptana Studio 1.2, can be downloaded standalone, and can be tried for free via Aptana Cloud, our elastically scalable hosting and application lifecycle management service. See http://www.aptana.com/cloud for details.
Jaxer, the Ajax server, can do a lot more than "just" serve pages and handle callbacks (function calls from your browser back to Jaxer). With Jaxer 1.0, you can easily create a variety of web services: RESTful, RPC-based, and almost anything else you can imagine. Hooks are already in place for a generic web service and for automatic RPC-based services. Here I'll demonstrate a simple RESTful service based on the generic web service hook.
You'll need the latest Jaxer (currently release 1.0) and the local_jaxer/conf folder contents that ship with it. If you've upgraded from a previous version of Jaxer or Aptana Studio (which has Jaxer built in) take a look at the Guide page for instructions on updating your local_jaxer configuration to 1.0.
To offer a service through Jaxer, rather than a page, you'll need to put your code where the web server + Jaxer will recognize it as a service. By default, that means somewhere in your docroot where the path to it will contain "jaxer-service" or "jaxer-rpc". In a Studio project, create a folder with one of those names, and put your code in that folder or in a subfolder. For this example, I've created a very simple folder structure, one folder with two files:

This does two things: identifies the JavaScript code to Jaxer as a service, and prevents direct serving of your JavaScript file to a browser.
The service itself is just a JavaScript file that gets loaded (from disk or from cache) and executed every time the service is called. Your code has full access to the information in the request, and needs to set the response as you wish. Here I created a service that simply shows you much of the data available:
The service itself is done. (Of course you can now build an entire services layer, loading other files with Jaxer.load(...).) Now how do we call it? If e.g. the jaxer-service folder is directly under your docroot, just send a request to /jaxer-service/tests (and you can append whatever extra path or query items to this path).
How does this work? Jaxer ships with two default dispatchers, both in the extensions folder of the framework: serviceDispatcher.js and rpcDispatcher.js. The first one is what we'll use here (implicitly): it handles requests of the form /path/to/jaxer-service/path/to/myservice/any/additional/data that have jaxer-service in their path, and tries to find the corresponding file on disk. So it looks in your document root for /path.js, then for /path/to.js, then for /path/to/jaxer-service.js, and so on. In our case it will find /path/to/jaxer-service/path/to/myservice.js (or rather /jaxer-service/tests.js) and load it. How does the dispatcher get invoked? That's set in your configApps.js file, or in one of your other configApps-like peer files. By default Jaxer ships with services.configApps.js and that adds an app entry to Jaxer.Config.apps which knows to look for "jaxer-service" in the path and call Jaxer.Extensions.ServiceDispatcher.findFile(...); if it succeeds, the app entry has a "handler" property that returns the path to the file, which Jaxer then loads and executes. Note that this is all handled for you by the default configuration: all you have to do is follow the folder naming conventions. Of course, you can now modify this to suit your needs.
To test this service, I created a simple front-end page called index.html. The source is shown below. Here's what it looks like, including the output from the service:

You can change the method, see which ones support having a body and which do not, etc. Note that the calls are made using your browser's XHR (XMLHttpRequest) capabilities, wrapped in this simple example by the Jaxer client-side framework for convenience.
Note: if you're trying the above in Aptana Studio, it'll work out of the box. If you're trying it with the standalone Jaxer, remove the leading "/" in the URL of the service: use "jaxer-service/tests" instead. That's because Studio needs to do some "magic" remapping between the effective document root and the filesystem.
Here's the source for the front-end page:
To summarize, all we needed to do to create the service was to create a JavaScript file somewhere in the document root where its path would contain "jaxer-service". The file will be loaded and executed whenever a request is received for that path (without the ".js" extension). You can add other special paths by adding them to your web server configuration — see the *.httpd.conf files that ship by default with the standalone Jaxer, and to configApps.js and its peers.
In a future blog I'll also show an example of an RPC (Remote Procedure Call) service. Jaxer can also easily consume RESTful services server-side, using e.g. Jaxer.Web.get(...), Jaxer.Web.post(...), Jaxer.Web.put(...), Jaxer.Web.del(...), and Jaxer.Web.head(...) — note that the DELETE action is not invoked via delete(...) because "delete" is a reserved identifier in JavaScript.
The Yahoo! User Interface Library, better known as YUI, version 2.6.0 was released earlier this month, and is now supported by Aptana Studio. YUI 2.6.0 includes numerous fixes, enhancements, and optimizations; introduces a new Carousel Control; breaks the Paginator Control out from DataTable; and makes final eight components that were previously designated beta.
In addition, YUI 2.6.0 also includes a huge number of functional examples—all of which are available, along with code assist, code completion, built-in API documentation, and more, when you install the YUI 2.6.0 plugin for Aptana Studio.
To get the YUI 2.6.0 plugin for Aptana Studio:
To get started using YUI 2.6.0 in Aptana Studio, do one of the following:
I'm pleased to announce the release of a major new online service: Aptana Cloud.
Aptana Cloud is the ultimate in ease and efficiency — a suite of online services integrated right into Aptana Studio 1.2 that puts the power of cloud computing to work for you. Cloud's integrated production, staging, source control, application monitoring, threshold and key event notifications systems, stats, logs, server tail views, team management, and tons of other features, streamlines your deployment and development processes and costs far less than doing it yourself.
Users who experienced Aptana Cloud through this summer's early access program have remarked as to how incredibly easy Aptana has made deploying, scaling, developing, and collaborating on hosted sites and applications. It's radically more efficient than anything you've seen or used before (and you can still use SSH and SFTP too). Aptana Cloud currently supports both Jaxer deployments as well as PHP deployments. The short screencast below gives you a good sense of the ease, and you can learn more at http://www.aptana.com/cloud.
Aptana Studio 1.2 also includes new capabilities beyond Aptana Cloud including faster performance, database explorer, bug fixes and UI enhancements all around.
![]() Watch Cloud Screencast |
![]() Watch Studio Screencast |
If you've not yet tried Jaxer, now is a great time. Aptana Studio provides extensive integrated tooling and samples for Jaxer, and Aptana Cloud now lets you deploy instantly to Jaxer servers running on elastic cloud computing infrastructure. Of course you can also download Jaxer and put it on your server for free too. It's free and open source.
If you are already using Jaxer, you'll love all the enhancements.
Here a synopsis of all the new features and improvements that have gone into this latest release candidate:
More specifics on these below...
Sandbox enhancements
The Dojo 1.2 plugin for Aptana Studio provides code completion; code assist for Dojo Core, Dijit, and DojoX; sample code; project wizards; and more to support your Dojo development efforts.
To get the Dojo 1.2 plugin for Aptana Studio:


As of today you can download or update to the latest release candidates of Aptana Studio, Jaxer and Cloud. These are major releases for our company: we're updating Studio to a new version, we're releasing an incredible new service, Aptana Cloud, and we've reached our 1.0 milestone of one of the world's most unique offerings, the first Ajax Server, Aptana Jaxer.
Cloud 1.0 RC makes web app deployment and management almost too easy!
Aptana Cloud is a new service from Aptana that is completely integrated into Aptana Studio enabling you to more easily develop, deploy, and manage your web applications. With PHP, Apache, MySQL and Jaxer servers already running on top of an elastic computing infrastructure, Aptana Cloud is the fastest way to deploy and scale your sites and apps. Even before you go live, Cloud's hosted SVN, SFTP and staging servers combined with the remote file editing, database management, and Cloud configuration tools make site development and management a breeze.
You can see all the features or watch this screencast to check out just how seamless Aptana has made deploying and scaling your apps in the "Cloud".
We wanted to push out a RC (Release Candidate) version prior to final release so that you could give it a try. It's absolutely free right now, so we'd love for you to try it out. Let us know what you think. Let us know if we missed anything or if you'd like to see something done differently. You can get started by downloading Aptana Studio 1.2 RC (which comes bundled with Jaxer 1.0 RC as well as our Cloud RC support), or if you are an existing Studio user, follow these update instructions.
Studio 1.2 RC adds new capabilities and improves upon many core features.
Enhancements include: Updated smart synchronization utility and a brand new set of visual database tools plus numerous bug fixes and UI enhancements with performance improvements throughout. A new Aptana ID system provides single-sign for the bug database (ASAP), Aptana Cloud, and soon the discussion forums and more. And there's a new 'My Aptana' start page with quick links to your recent files and core features.
Jaxer 1.0 RC adds and refines more features for server-side JavaScript and Ajax.
Since Jaxer is the world's first Ajax server, this release candidate is a huge milestone. This next-to-final release of Jaxer has some great performance improvements that make it comparable to Ruby on Rails and PHP, plus includes new APIs for JSON and REST style data services.
If you are not yet familiar, Jaxer lets you use your JavaScript and Ajax skills server-side to create entire apps, or optimized presentation tiers that can complement other back-ends. Aptana Studio 1.2 RC includes the Jaxer 1.0 RC.
As we get ready to release Jaxer 1.0, we put together a few simple benchmarks
to see how it performs
relative to a couple of other web platforms: PHP and Rails.
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 first chart shows how long each platform took to perform the task. For the "static" page, we measured the total time taken to serve the request, as measured by the external web client making the request (over the local network). For the other benchmarks, we measured the time taken to perform the
specific task itself, excluding the overhead of setting up and tearing down the benchmark,
serving the test page, etc. That allowed us to combine these tests and assess what an entire page would take to serve, if it had static content and database requests and some JSON manipulation and so on. Of course your mileage may vary: your app may have less DB requests, more JSON, less IO, whatever. But remember the question we're trying to answer: how does Jaxer perform relative to other accepted platforms for several common tasks? We believe these benchmarks answer that: Jaxer performance is very much comparable to PHP and Rails.
Of course, significant boosts to JavaScript performance are around the corner for Firefox (see Brendan's TraceMonkey article). Since Jaxer is built on the same engine as Firefox, those same improvements will soon be in Jaxer too... With the imminent and massive improvements to JavaScript performance coming to the Mozilla engine.
Now let's take a closer look at these tests below. All were run multiple times on a Macbook Pro (2.5 GHz Intel Core 2 Duo) with 4 GB of RAM.
We grabbed a copy of one of our blog pages (Aptana Acquires Pydev) and saved it locally. We turned it into a .php file with a smidgen of PHP in it; we threw in a short <script runat="server">...<script> for Jaxer; and created a simple view out of it for Rails. Jaxer was the slowest to serve this page, and not surprisingly: it needs to parse and create the entire DOM of the page to allow server-side manipulation. Still, under 20 ms is pretty good, and is usually dwarfed by weightier tasks such as DB queries.
To measure raw iteration speed we created some very simple loops with and without a bit of variable manipulation. This time Jaxer was far faster than PHP or Rails: at least for simple, common for loops, Mozilla's SpiderMonkey JavaScript engine is no slouch.
| PHP | Jaxer | Rails |
Using JavaScript literals as a serialization format predates Ajax, and has become an incredibly prevalent cross-platform data format. We created a simple JSON structure and a more complex one, and measured a variety of encoding and decoding tasks. All three platforms now have native JSON support, so all three performed very well in this benchmark.
To measure typical file I/O performance, we created a 1 KB string and wrote it to a file, then appended a 100 KB string, and read the whole thing back, and repeated it a few times. Jaxer came out somewhat slower than the other platforms: some of this may be due to the extra conversions between JavaScript's native utf8 encoding and the filesystem, but we'll need to go back and dig deeper.
To measure database performance, we tried to level the playing field as much as possible by coding straight SQL statements. We also emphasized SELECTs over DML queries because most apps read much more than they write. Jaxer came out somewhere between PHP and Rails, with half its time spent wrapping the raw MySQL data in easier-to-manipulate JavaScript structures. Of course in real-world apps you're likely to use prepared statements, and very often (esp. in Rails, and soon in Jaxer too) an Object-Relational Mapping such as ActiveRecord to abstract out the SQL calls.
Finally, we included some page scraping tests. Many web apps mash up other content, repurpose it, or extract data from remote sources. In our case we read in the same blog page as in the static example, and navigated it in a variety of ways. PHP was fastest here, with Jaxer slightly behind and Rails a distant third. Looking for a moment beyond performance, Jaxer is the only platform that would allow scraping of true Ajax web pages, for example pages that created their content "client-side" via Ajax calls.
You can download the complete source we used to generate and display these results, and try them yourself. The README file should have the instructions you need. You can grab Apache+Jaxer from the Aptana download site, Apache+PHP+MySQL from several places such as XAMPP, and Ruby and Rails from RubyOnRails.org (if it isn't already on your platform — you'll need Rails 2.1.0, the json Ruby gem, and to run the tests in production mode).
If you'd like to discuss these, I've started a forum thread for this.
The latest update to jQuery, version 1.2.6, includes faster event handling, faster CSS selectors, an overhaul of attr(), improvements to toggle(), support for all the Dimensions plugin methods (the plugin is now part of the core code), and more... and now it's available in Aptana Studio as well!
If your copy of Studio is set to automatically check for updates, you'll be prompted to install the jQuery 1.2.6 plugin with the next check. If you check manually, follow the steps below to get the updated library files, code assist, and local, searchable documentation that come with the jQuery 1.2.6 plugin:
We're happy to announce that we've updated our support for the Ext JS library to the latest version, 2.2. Ext JS 2.2 contains numerous bug fixes and feature enhancements, including full Firefox 3 support, improved checkbox and radio groups, a history component, and a GMapPanel extension that packages Google Maps functionality into an Ext component. It's also fully backwards-compatible, so you should be able to move to this version from 2.0 without difficulty (though you can also install 2.2 into Studio alongside 2.0 if you want).
The Ext JS 2.2 plugin for Aptana Studio provides code completion, code assist, Ext JS 2.2 examples, project wizards and more atop solid javascript coding and Ajax debugging utilities so that you can be as productive as possible with Ext JS.
To get the Ext JS 2.2 plugin for Aptana Studio:


We are very excited to announce that Pydev, the popular Python and Jython IDE, is now part of the Aptana product family and that Pydev creator, Fabio Zadronzy, will head up continued efforts to advance Pydev as part of the Aptana team. Like our products for Ruby on Rails, Ajax, and PHP, Pydev offers code completion, refactoring, code analysis, debugging support, and lots lots more. Pydev's popularity in the Python community and Eclipse ecosystem made it the clear choice for Aptana. The acquisition sets the stage for a full Python suite of products and services ranging from local development to cloud deployment.
Interest in Python has been steadily growing and earlier this year got a big boost when Google announced that Python was the language for Google App Engine.
Dion Almaer, Open Web Advocate for Google recently commented "This has been a great year for the Python developer community with the advent of great frameworks such as Django and deployment solutions such as Google App Engine. Now the tooling is getting better all the time. One of the great tools is Pydev, especially if you are Eclipse-minded. Having Aptana take on Pydev only means progress for that project and Python developers."
Google is also a worldwide licensee of the commercial version of Pydev, Pydev Extensions, which includes even more high-productivity features for Python developers.
Today you can use the products side by side, installing Pydev into Aptana Studio, or plugging both into Eclipse. The combination gives Python developers access to all of Aptana's great tooling for Ajax and current Aptana Studio users access to one of the best Python IDEs out there, and the ease of using both together should increase as we integrate the products more closely over the coming months.
You can learn more about Pydev and Aptana's support for Python at http://www.aptana.com/python, or just go straight to the Pydev and Pydev Extensions sites for downloads and more details.
Please start submitting your ideas for future feature enhancements and how you'd like to see these products come together.
Mozilla CTO Brendan Eich, the creator of JavaScript, in this article by Ryan Paul of Ars Technica, discusses how Mozilla is "'getting ready to take JavaScript performance into the next tier' with a radically innovative optimization tactic called tracing that has already produced performance improvements ranging between 20 and 40 times faster in some cases."
The Mozilla JavaScript engine (SpiderMonkey) is what's inside the Firefox browser and the Aptana Jaxer, Ajax server.
"Eich says that Mozilla wants to 'get people thinking about JavaScript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'"
Tom Kirkpatrick of codegobbler.com has told us he's writing a series of articles on some of the great features in Aptana Jaxer. His most recent article is on the new Jaxer.Process APIs that lets Jaxer interact with the operating system on the server to achieve all kinds of things. (Yes you heard right. That's JavaScript interacting with the operating system).
Tom's simple example, complete with full source calls usr/bin/uptime to get the uptime, then display it in the webpage. There's a full working demo to if you want to see the uptime of codegobbler.com's server too.

Good work Tom! We look forward to more great stuff from codegobbler.com
Mark Perkins, a Senior Web Developer at VGroup has summarized in this blog post the ubuiquity of JavaScript on the Web and how this dynamic language is empowering all kinds of new possibilities in applications. From ECMAScript to ActionScript, Flash to W3C, Google and Yahoo Maps, Apple's Mobile Me, Aptana Jaxer, Rhino, Firefox, Apple Gadgets, Google Gadgets, Yahoo Gadgets, and even Vista Gadgets, and Adobe AIR, (and more), Mark highlights how JavaScript is at the core of the future of the Web not just online, but on the desktop and on mobile devices as well.
Only thing I'd add to Mark's comments is that JavaScript is set to get even faster than the already blazing improvements delivered by Mozilla Firefox and the Webkit engine that powers iPhones and Sarafi. Projects like Tamarin and its convergence with Mozilla's SpiderMonkey (which Aptana Jaxer, the open source Ajax server uses) are slated to provide the equivalent of Just-In-Time (JIT) compliation of JavaScript and open even greater possibilities for greater JavaScript use.
Jaxer 1.0 is packed full of new, exciting stuff and we are proud to announce Jaxer 1.0 Release Candidate B. This is our first pre-release of Jaxer 1.0 to the general public and we are looking forward to more feedback from the Ajax community. Jaxer 1.0 RC B has more features and capabilities than the prior Jaxer betas, and we're calling this a release candidate because the APIs are now pretty much set for what we'll have in the final 1.0 release. So it's a great time to get started with Jaxer 1.0. Aptana Cloud users and nightly build users are still on Jaxer RC A until updates for those are released (soon).
Jaxer 1.0 RC B is available both within Aptana Studio 1.2 (also just released) and as a standalone server. All are open source. The Studio download is suggested if you are new to Jaxer since Studio includes many helpful features to getting started with Jaxer including a fresh batch of Jaxer 1.0 samples.
Download Aptana Studio with Jaxer 1.0 RC B — or — Download Jaxer 1.0 RC B server.
This release contains many new and enhanced features including:
I'm really excited about the ability to return custom content types (json, gif, xml, html, etc...), particularly the JSON type since the server-side is natively JavaScript. What could be easier — especially with the enhanced serialization support for JSON. And with the E4X (native XML for JavaScript) capabilities in Jaxer, returning XML types is now a piece of cake too. This means that you can now easily use Jaxer as a JSON or XML service provider not just to Ajax clients, but also to things like Adobe Flash, Adobe Flex and Microsoft Silverlight which can consume JSON or XML and support JavaScript and XML on the client as well, a technique useful in mashups and all types of social and mobile apps.
The new secure sandbox 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 giving your code access to their window objects and anything inside them. While you can't see these windows (they're on the server) you can use them programmatically whether you're consuming web pages in mashups or generating them to be sent to the browser. Uri Sarid's blog has a nice example using these to do "DOM Scraping" where you actually can execute the JS functions of the page you're consuming on the server, access its DOM and get what you need for your mashup or app. Since Ajax is so prevalent today in web pages, being able to trigger the Ajax events server-side such that the content added via the Ajax calls is available in a server-side DOM is very handy in this case and could be applied for things like search engine optimization and accessible modes for web apps as well.
Get all the details of what's new and what's improved in the Migrating Jaxer Beta to Jaxer 1.0 doc.
Jaxer 1.0 docs are in process, links to which can be found at the Jaxer Developer Center.
We'd love your feedback on this release and your thoughts on where Jaxer should go next via the Jaxer forums.
We're finalizing our Jaxer 1.0 release, and I thought I'd go back to Paul's 'DOM Scraping' example and see what Jaxer 1.0 has to offer.
A main new feature is Jaxer.Sandbox, which lets you open new server-side sandboxed 'windows' and load pages into them. You can GET a page from any url, or even POST some content and load back the response. You can control whether JavaScript is executed in the window, whether it honors meta refreshes, whether it loads synchronously or asynchronously, etc. And, most important, the window and its contents have no access to Jaxer and its APIs nor to your app — but your app has full access to it.
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. First, let's grab the same three pages Paul used and extract some choice content elements into our page before sending it to the browser. We'll reuse the same Jaxer.Sandbox instance three times, each time loading a different page into it and grabbing some content by id or by classname. The page is basically a single script block: containing the following server-side JavaScript: and a single helper function that adds the given contents from the sandbox to the current page:
Here's the resulting page:

That's not too bad, but the timestamps on the News.com section don't look good, and there are a bunch of JavaScript errors on the browser from left-over JavaScript content that was in the original WashingtonPost.com page. We can quickly clean that up with another, tiny DOM helper function that removes any DOM NodeList you pass to it. And while we're at it we'll also remove the reference to the client-side Jaxer framework since we won't be needing it here. The script block becomes:
Now that's much better:

But if you run this example yourself, you'll see it's slow: each of the original servers is a bit slow to load its entire page, and you have to load all three server-side before your page is ready to be sent to the browser. We could load all three in parallel, using the Jaxer.Sandbox's async capabilities and the Jaxer.Thread.waitFor() method to wait for them to load. But even then the user would see nothing in the browser until the slowest one was done loading server-side. So let's load them asynchronously client-side, by creating a server-side function called getFragment that loads a url and returns some of its contents, and setting getFragment.proxy = true so we can call it asynchronously from the client. The page now has two script blocks, one that runs on the browser and one on the server: The client-side code is: and the server-side code is: The result looks the same as the previous screenshot, but the order in which the sections are displayed may vary, depending on which remote server responds first.
We are pleased to announce that Greg Murray (creator of the jMaki Ajax framework, former Ajax architect for Sun Microsystems, Sun NetBeans IDE team member and lead on the Java Servlet 2.5 specification) and Ryan Johnson (creator of the livepipe and object.event Ajax libraries) have joined the Aptana Jaxer team!
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! Dion Almaer and others in the community have been championing this idea as well. Now we're doing it! Of course Greg and Ryan are both deeply involved in the Ajax community in their own ways as well: Greg with the jMaki project and Ryan with Dynamic Reach and his active role in the Prototype community. So be on the lookout for blog posts from Greg and Ryan to keep abreast of all the stuff they'll be up to here at Aptana.
This beta is for two groups: People who want to try Jaxer RC 1.0, and, People using Eclipse 3.4 who want to test updated Studio compatibility.
Existing Studio users:
Use policy file http://beta.aptana.com/php/3.2/policy.xml, then perform a normal update.
Eclipse 3.4 users:
Follow the instructions at Plugging Aptana into an existing Eclipse configuration and use http://beta.aptana.com/php/studio/3.2/ as the update site.
New in Studio
(For more complete list, see Migrating from Jaxer beta.)
I quickly launched my VMWare Fusion into Vista, gulp, and proceeded to run Microsoft's Visual Studio 2008. This posting won't be a tutorial on how to write C#, but i'll just go over some of the basics of setting up a simple C#-based COM object that can be used from within Jaxer.
The first thing to note is that to register COM objects in Vista, you need to be Administrator, so just launch Visual Studio as Administrator using the right-click menu 'Run as Administrator'. Once you have Visual Studio running, start by creating a new 'Class Library' project.
Once you've created the project, right-click on the project and go to the Properties menu, we'll want to make this object a COM-visible one.
In the 'Build' section of the properties, scroll to the bottom and check the 'Register for COM Interop' checkbox. This will make your object visible to other languages as a COM object.
The next thing you'll need to do is open your 'AssemblyInfo.cs' file, which is usually in your Properties folder of your project. Be sure to change the 'false' value to 'true' for the 'ComVisible' setting:
Now that you've done that, you can just create a COM object the 'usual' way. The complete project is attached, so you can take a look there. The image processing code was borrowed from the following online tutorial: http://blog.paranoidferret.com/index.php/2007/06/13/csharp-tutorial-image-editing-rotate/
Once you've got your object compiled, using it from within Jaxer is super-easy! You can just use the COMObject function to create a wrapped instance of the native object and then just use functions and properties on it just as if it were native JavaScript.
So here is the very short HTML file and JavaScript code running server-side via Jaxer that creates the COM object, loads our image, rotates it via the input field in the HTML form, and then saves it back as a new image. The communications from JS to .NET happens very quickly and as you can see, was super-simple to set up.
Here's a screenshot of the image being rotated:
What's really cool is that you can write anything you like in C#/VB.NET and easily access it via JavaScript in Jaxer. Note how in my sample, the onclick event for the button calls the server-side JavaScript function directly, which in turn calls the .NET COM object. That is, you can bind browser-side buttons directly to back-end .NET COM objects, all in JavaScript through Jaxer!
| Attachment | Size |
|---|---|
| MyCOMObject.zip | 15.16 KB |
There are some interesting threads going on in the Aptana Forums about using Aptana Studio with Adobe Flex and Flex Builder. The idea of using Ajax and Flex or Flash together is not new. Google Finance did a great job a few years ago blending the two to provide a very nice user experience with Flash-based interactive charts within an otherwise Ajax UI.
It seems that the Aptana community is uncovering increasing efficiencies in using Aptana Studio and Adobe's Flex Builder together. We've also known that many Adobe AIR users are building their Ajax apps for AIR using Aptana Studio, and have heard from others that using Aptana Jaxer to create JSON data services (written natively in JavaScript) consumable by Flash and Flex apps makes a lot of sense as well. Flash and Flex each have an "Ajax bridge" to expose JavaScript APIs for the embedded objects.
Anyways... It seems Adobe is now actively taking a deeper look at this trend in the hybridization of Ajax and Flash and Flex. I saw that they are offering $75 bucks for an hour phone call to discuss your experience with and thoughts on using these together.
Here's the link if you're interested: http://www.adobe.com/go/RIAintegration_study/. $75 bucks... That's almost the cost of a tank of gas in San Francisco.
We're continuing that philosophy now with our Aptana Cloud offering (currently in beta) as well as our support for Ruby on Rails, PHP and LAMP development, and of course app development with Ajax libraries on the client side and for those that want server-side Ajax, Aptana Jaxer, a first-of its kind open source Ajax server built around the Mozilla browser engine.
"We can see that Jaxer lets developers leverage the hard work which has already been spent building client-side libraries on the server-side. These simple examples show off some of the true potential of utilizing the Ext JS framework on the server-side" says Rich.
The easy to follow example shows off a very simple wrapper around an Ext.data.Store and the corresponding Jaxer server code that returns JSON to a Ext JS datagrid.
A comprehensive guide to using RadRails to develop your Ruby on Rails projects in a professional and productive manner
Aptana RadRails is an Integrated Development Environment for Ruby on Rails projects. Built on top of the well-known Eclipse platform, RadRails provides all the tools you need to create a whole Rails application from a single interface, allowing you to focus on the creative part of the development as your IDE takes care of the mechanics.
This book will show you how to use the tools RadRails provides to improve your productivity:
This book is for Ruby on Rails developers who want to make the most of the framework by using an Integrated Development Environment.
Even though the book explains everything you need to follow the contents, the focus is on how to use the tool and not on the Rails framework itself, so previous working knowledge of Rails is highly advisable. Previous knowledge of Eclipse is not necessary.
--------------------------------------------------------------------------------
Javier Ramírez has been developing Web Applications since before the term Web Application was coined. Born in Zaragoza, Spain, in 1974, he started programming as a hobby around the age of 11 assisted by his older sister. A few years later, he got his first modem and became a regular of BBSes and Newsgroups. His interest in developing server applications that can be accessed remotely comes from those times.
He has learned —and forgotten— many programming languages, including Basic, dBase III, Cobol, Pascal, SQL, C, C++, ASP, TCL, JavaScript, PHP, and Java, the language on which he has focused for most of his career so far. He has held the positions of programmer, analyst, consultant, team leader, post-sales engineer, project manager, and software architect, totaling over 12 years in the IT business.
Having developed projects mainly for banks and other big corporations in Spain, Italy and the US, he co-founded some years ago a small software development shop, which provided him with valuable experience about the difficulties and the joys of entrepreneurship. After two years, he left the company in pursuit of new professional challenges.
For the last two years, he has been proudly working for ASPgems, where he discovered Ruby on Rails, which soon became his framework of choice for developing Web Applications. He is one of the organizers of the Spanish Rails Conference, also participating as a Speaker in the two events held so far.
He has also been an instructor on Robotics, Java, FatWire Content Server, and Ruby on Rails, and a University Lecturer in the subjects of 'Software Engineering' and 'The Java Programming Language', which he currently teaches at Universidad Francisco de Vitoria, in Madrid.
Javier Ramírez holds a B.Sc. in Business Information Systems with First Class Honors and a degree in Ingeniería en Sistemas de Computación.
------------------------------------------------------------------------------------------------
In June, Aptana and ColdFusion enthusiast, Mark Drew will be at CFUnited presenting:
Fresh AIR: Getting to grips with Aptana and AIR appsMark, who has been central to the CFEclipse project, is sure to deliver a great session, so be sure to check it out.
This session will give a nice and fresh introduction to developing AIR applications using Aptana. By using a ColdFusion developer's existing knowledge of HTML and JavaScript (and some quick introductions to JavaScript libraries such as EXT and JQuery), the whole process of developing rich desktop apps will be demystified.
Aptana will build off of its IDE and AJAX success with its new technology. Read the full story.
Learn more about Aptana Cloud, an "Elastic Application Cloud" that's ideal for Web developers who use scripting languages.
Join the early access program.