Project Avatar

1.0-ea

Installation

Project Avatar requires JDK 8. If you have not already installed it, please do so from here.
The following assumes that you have a pre-existing GlassFish Server 4.0 installation.

The following also assumes that you have expanded the avatar-1.0-ea.zip file into the glassfish directory of the GlassFish Server installation. For Ex.

    unzip -d <workspace>glassfish4/glassfish avatar-1.0-ea.zip

Quick Start

To create and run a simple example in the current directory, execute the following commands (assumes that installation is complete):

avatar new --example=hello

This will create the hello directory. Edit hello/avatar.properties file and add the option debug=true

Start the Glassfish application server and deploy the newly created `hello` application.

asadmin start-domain
asadmin deploy hello

Now, point your browser to http://localhost:8080/hello.

If you edit the hello/view/src/hello.html file while the server is running, Project Avatar will re-compile it on the next request. This feature enables very rapid iteration during development of the application. The debug property in the hello/avatar.properties file can be set to false in production mode, which both disables this feature and causes all .js and .css files to be minimized.

To stop the server, use 'asadmin stop-domain'.

If you want to look under the hood, we recommend the Chrome developer tools which allow you to step through JavaScript, inspect the DOM, css and more.

The examples application can be deployed as follows, and accessed at http://localhost:8080/examples:

asadmin deploy $AVATAR_HOME/Project-Avatar-examples/examples.ear

The examples app is large, so to reduce startup time it is a good idea to undeploy it when no longer needed:

asadmin undeploy examples

Exploring Project Avatar