Jaxer

Aptana Cloud Early Access Program | Getting Started

Welcome to the Early Access Program for Aptana Cloud.
Just follow the step by step instructions below to get started.

Note: You'll need to have the username and password you were given after registering for the early access program handy.
Do not have those yet? Then register for early access starting here.

OK. Let's get started!

Get the Software

Aptana Cloud's client software is distributed in the context of Aptana Studio 1.2 which by the way also includes release candidates for Aptana Jaxer and Aptana's PHP support. Support for Ruby and Rails in Aptana Cloud is coming soon.

You must have Aptana Studio 1.1 installed to update to 1.2. If you do not already have Aptana Studio 1.1 or later download Aptana Studio 1.1.

On Windows or Linux with Aptana Studio 1.1 or later running:

  1. Navigate to Window > Preferences and select Install/Update
  2. Set the Policy URL to: http://beta.aptana.com/aptanacloud/3.2/policy.xml
  3. Press OK
  4. Navigate to Help -> Check For Aptana Updates Now...
  5. When prompted enter the "Install/Update Policy URL" username and password you received
On Mac with Aptana Studio 1.1 or later running:
  1. Navigate to Aptana Studio > Preferences and select Install/Update
  2. Set the Policy URL to: http://beta.aptana.com/aptanacloud/3.2/policy.xml
  3. Press OK
  4. When prompted enter the "Install/Update Policy URL" username and password you received

Deploy and Manage

Once you have the software, you can deploy and manage multiple apps and sites. You may also want to deploy some of the ready- made samples in Aptana Studio. To do that just select a sample and then press import to create a new project from a sample.

During the early access period credit cards will not be billed. In fact, there's only one test credit card you can use:

Card Type: Visa
Card Number: 4111111111111111
Expiration: 12/2009
CVV2: 123

Later, if you want to keep your sites and apps deployed, you'll have the opportunity to switch over to a real credit card before the end of the early access program.

Help Us Improve Cloud For You!

We want your feedback!!! While we love the praise Aptana Cloud has received so far, your ideas and requests for more and better ways of meeting your needs is what we would love even more. That way we can make the Aptana Cloud even better for you.

Discussion Forums

  • Aptana Cloud
  • Aptana Jaxer
  • Aptana Studio with PHP

    Bug Tracking and Enhancement Requests

  • Aptana Cloud
  • Aptana Jaxer
  • Aptana Studio with PHP

  • What's New in Aptana Studio 1.2?

    Aptana Studio 1.2 adds significant improvements to editing speed in large files, synchronization workflow, database integration and new versions of Jaxer and PHP support

    Faster performance when editing larger files. Typing speed is now greatly improved.
    New Sync Explorer and "Smart Sync" improve sync workflow. Files can be synchronized in the background.
    New integrated database views. Database Explorer allows connecting to both local and remote databases.
    Jaxer RC 1.0. Jaxer contains substantial improvements as part of the 1.0 release.
    PHP RC 1.0. Improved content assist, debugging, local preview and formatting.

    How do I use Jaxer.Dir.grep and Jaxer.Dir.map

    A recent addition to the Jaxer IO capabilities are the grep/map methods, lets look at some use cases to explain the powerful functionality these provide to the developer.

    The signature of the grep method looks like the following

    The path parameter is a directory path to the folder you want to search.

    The options parameter is a Javascript Object that contains some required properties.

    The supported properties are pattern, flags and recursive.
    pattern is a string value representing a javascript regular expression,
    flags contains any regexp flags you want to provide to govern the behavour of the regular expression provided by the pattern parameter,
    recursive is used to indicate whether the search should also scan sub folders.

    Let's look at some examples of this in practice.

    consider the following folder structure

    c:\rootFolder
    ----foo.txt
    ----bar.txt
    ----subFolder1
    --------foo1.txt
    --------foo2.txt
    --------foo3.html (1)
    --------ignore.html
    ----subFolder2
    --------a.js
    --------b.js
    --------c.js
    ----subFolder3
    -------subFolder3a
    ------------deepFOO1.txt (2)
    ------------deepFOO2.txt
    

    example paths

    (1) c:\rootFolder\subFolder1\foo3.html

    (2) c:\rootFolder\subFolder3\subFolder3a\deepFOO1.txt

    Jaxer.Dir.grep

    So given the example folder structure we can use the simplest form of the grep method specifying only the folder to search in.

    which returns an array of file objects representing these files :-

    c:\rootFolder\bar.txt
    c:\rootFolder\foo.txt

    Note that is only files in the specified folder that are returned and no subfolder searching is attempted

    The next example provides a pattern parameter that matches a single file in the top level folder.

    this returns an array containing a single file object representing :-

    c:\rootFolder\foo.txt

    Now we add the recursive property to the invocation

    and this returns an array of file objects that includes matches from the scanned subfolders :-

    c:\rootFolder\foo.txt
    c:\rootFolder\subFolder1\foo1.txt,
    c:\rootFolder\subFolder1\foo2.txt
    c:\rootFolder\subFolder1\foo3.html

    Next we add a flag property to the options object to include case insensitive results.

    which returns an array of file objects including some containing 'FOO' :-

    c:\rootFolder\foo.txt,
    c:\rootFolder\subFolder1\foo1.txt
    c:\rootFolder\subFolder1\foo2.txt
    c:\rootFolder\subFolder1\foo3.html
    c:\rootFolder\subFolder3\subFolder3a\deepFOO1.txt
    c:\rootFolder\subFolder3\subFolder3a\deepFOO2.txt

    You can also provide a string containing the folder path and use an object literal for your options parameter

    which returns an array of file objects :-

    c:\rootFolder\subFolder1\foo1.txt
    c:\rootFolder\subFolder1\foo2.txt
    c:\rootFolder\subFolder3\subFolder3a\deepFOO1.txt
    c:\rootFolder\subFolder3\subFolder3a\deepFOO2.txt

    OK, so you get the idea, you can provide an fairly complex query and get a result set of matched values in an array, and you can do it without a whole lot of scaffolding code to navigate the folder tree.

    Jaxer.Dir.map

    Taking Jaxer.Dir.grep as a given we can now look at the Jaxer.Dir.Map functionality, this has a signature that is extended from the grep method and adds a third parameter of a function to invoke on each matched file object.

    The function can be declared inline or externally and if omitted the map method will behave exactly like the grep method and return an array of Jaxer.File objects.

    Let's look at some examples.

    will write a log entry out for each of the matched files and return an array of matched Jaxer.File objects

    13:55:19 02/20/2008 [  2356] [INFO] [JS Framework] [framework.] c:\rootFolder\subFolder1\foo1.txt
    13:55:19 02/20/2008 [  2356] [INFO] [JS Framework] [framework.] c:\rootFolder\subFolder1\foo2.txt
    13:55:19 02/20/2008 [  2356] [INFO] [JS Framework] [framework.] c:\rootFolder\subFolder3\subFolder3a\deepFOO1.txt
    13:55:19 02/20/2008 [  2356] [INFO] [JS Framework] [framework.] c:\rootFolder\subFolder3\subFolder3a\deepFOO2.txt

    The important point to note here is that the function is defined to expect a parameter containing the matching file object being handled

    this code could be rewritten as

    A more complex example using a decorator function to format the results of the matches

    which outputs the following to the log.
    15:43:05 02/20/2008 [framework.] foo1.txt|0|txt|Tue Feb 19 2008 19:15:04 GMT-0800 (Pacific Standard Time)|c:\rootFolder\subFolder1
    15:43:05 02/20/2008 [framework.] foo2.txt|0|txt|Tue Feb 19 2008 19:15:04 GMT-0800 (Pacific Standard Time)|c:\rootFolder\subFolder1
    15:43:05 02/20/2008 [framework.] deepFOO1.txt|0|txt|Tue Feb 19 2008 19:15:04 GMT-0800 (Pacific Standard Time)|c:\rootFolder\subFolder3\subFolder3a
    15:43:05 02/20/2008 [framework.] deepFOO2.txt|0|txt|Tue Feb 19 2008 19:15:04 GMT-0800 (Pacific Standard Time)|c:\rootFolder\subFolder3\subFolder3a
    

    So as you can see the grep and map methods of the Jaxer.Dir namespace provide you with an excellent utility knife to deal with accessing objects on the file system

    One final note, as these kind of searches can take some time depending on the depth of the nested searching, care needs to be taken when invoking through a callback to ensure that a timeout doesn't occur.

    TwitJax - Jaxer, Twitter, Javascript 1.8 and E4X

    This sample application demonstrates using some of the advanced Javascript language features available out of the box with Jaxer.

    We show how to use the ECMASCRIPT for XML additions to Javascript to pull an XML feed of the latest public twit list remotely and reprocess it inside Jaxer using server-side Javascript.

    fileGrep - Jaxer Filesystem Access Sample

    This sample application demonstrates some of the filesystem access capabilities of the Jaxer Javascript framework.

    You can download a zip of the sample here.

    Running Jaxer with MySQL

    Changing the Database Configuration Settings

    To run Jaxer with the mysql database it is just a matter of making a very simple change, to a single file
    <INSTALL FOLDER>/local_jaxer/config.js

    As shipped this file contains a set of common configuration overrides, but they are all commented out. The file is a simple JS function that updates a set of property values on the Config object. The source for this file is shown below

    uncomment lines 33-43 if you only want to use MYSQL for your application data

    uncomment lines 44-54 if you only want to use MYSQL for the jaxer server metadata

    uncomment lines 33-54 if you want to use MYSQL for both application data and server metadata

    Once you have uncommented the lines you need to provide the connection parameters for your MYSQL instance.

    The Config.DB_CONNECTION_PARAMS / Config.DB_FRAMEWORK_CONNECTION_PARAMS objects have properties for

    HOST : the ip address or uri for the server
    PORT : the port the server is running on (typically 3306 for MYSQL)
    NAME : the name of the database to use
    USER : user name
    PASS : password

    Set these value to match your database. Then restart Jaxer to load the changes, your Jaxer instance will now be running with MYSQL

    After the changes the config file will look something like this.

    Creating a Connection to a MySQL db.

    For many applications you wont want to use the built-in jaxer DB instance definitions and will require a dedicated connection to another instance or perhaps a separate database on the same instance.

    The code below is an example of how to create and use a connection to a database.

    Syndicate content