App Builder

App Builder is a non-GA Web-based tool for developing IBM® WebSphere® sMash applications.

Why non-GA? Timeliness of new features. We want to be able to quickly drop new features into WebSphere sMash (both run time and tooling). Of course developers always have access to all the new features in the "latest" driver, but a stable release of the run time is required for developers targeting production deployments. We found that attempting stable co-releases of the run time and tools tended to slow the overall process because the tool support lags the new run-time features. So we had a choice: (1) Delay the release of new run-time features until the tools are ready or (2) release the run time as it's ready and allow the tools to evolve in real time. We've gone with the latter.

About App Builder

App Builder is itself a WebSphere sMash application. If you dig into it, you'll see an AJAX client (implemented in Dojo) interacting with RESTful resource handlers running in a backend application. There's a core set of functionality (zero.appbuilder.core (client) and zero.appbuilder.core.resources (backend)) with extensions packaged as WebSphere sMash modules and registered via configuration (e.g. zero.appbuilder.pageeditor). Finally, App Builder is acquired, started, and updated like any other WebSphere sMash application, although you might not see the details since we provide shell scripts that recast the application as a tool.

Pre-requisites

  • WebSphere sMash DE or "latest" command-line interface
  • Firefox versions 2 and 3

Running App Builder

The installed CLI contains the appbuilder shell script, which is used to start and stop App Builder:

appbuilder open
Starts App Builder and launches Firefox to http://localhost:8070/. This is the easiest way to get started.
appbuilder start
Performs a subset of the appbuilder open command: Starts the App Builder application without launching a browser. This is useful when running App Builder remotely or when trying a browser other than Firefox. (Although Firefox is the supported browser, we are working to also support other mainstream browsers. See the list of known browser-specific problems for details.)
appbuilder stop
Stop the App Builder application. Browsers are not closed.

Note that the first invocation might take about 30 seconds to complete (depending on your network connectivity) because the App Builder dependencies are downloaded and your linked copy of App Builder is created. Subsequent invocations complete within seconds since they operate on the linked copy.

Important note for WebSphere sMash DE users: The appbuilder script is currently available only in the "latest" CLI. For now, WebSphere sMash DE users must use the older scripts as follows:

  • Invoke startAppBuilder in place of appbuilder open
  • Invoke stopAppBuilder in place of appbuilder stop

Common tasks

Details about common user tasks for the App Builder are found under separate topics:

Updates

You can update your installed version of App Builder by invoking the standard update commands through the appbuilder script:

  1. Stop App Builder (execute appbuilder stop)
  2. Update the module group with which App Builder is associated (execute appbuilder modulegroup update)
  3. Update App Builder to the latest versions (execute appbuilder update)

App Builder is now updated to the latest version. You can restart App Builder by executing appbuilder start.

WebSphere sMash users: You must update the installed App Builder manually:

  1. Stop App Builder (execute stopAppBuilder)
  2. Change directory to App Builder's home directory (ZERO_HOME/appbuilder, where ZERO_HOME is the directory where the WebSphere sMash DE CLI was installed)
  3. Execute zero modulegroup update
  4. Execute zero update

App Builder is now updated to the latest version. You can restart App Builder by executing startAppBuilder.

Configuration

The default configuration is sufficient to use App Builder in a common environment. However, there are a few changes you might need to make for your specific environment. This section describes what changes are available and how to make them.

HTTP port

By default, App Builder runs on port 8070. You can change this by editing ZERO_HOME/installed/appbuilder/config/zero.config (WebSphere sMash DE users: use ZERO_HOME/appbuilder/config/zero.config). For example, the following line would configure App Builder for port 8060:

/config/http/port = 8060

You must stop App Builder before you change the port. So, the steps would be:

  1. Stop App Builder (execute appbuilder stop).
  2. Edit App Builder's zero.config file, as needed.
  3. Start App Builder (execute appbuilder start).

Hidden-file filter

App Builder is configured to show only "interesting" files in the File Editor tab. The other files ("hidden") are filtered out by a configurable setting, which consists of a list of regular-expression patterns. The default setting is:

/config/ide/hiddenFiles = ["^/classes/(.*)",
                           "^/logs/(.*)",
                           "^/reports/(.*)",
                           "^(.*)\\.dat",
                           "^(.*)\\.log",
                           "^(.*)\\.gif",
                           "^(.*)/\\.(.*)"]

You can override the default by specifying your own list of patterns in ZERO_HOME/installed/appbuilder/config/zero.config (WebSphere sMash DE users: use ZERO_HOME/appbuilder/config/zero.config). You must restart App Builder to pick-up the changes.

Current limitations

  • Single user
  • localhost (can be configured for remote operation, if desired)

Remote operation

App Builder is configured for localhost operations, which means localhost users don't need user ids and passwords and there is no security risk from remote users.

You can enable remote operation by disabling the localhost setting and configuring security rules. (The security rules are optional, but recommended. Without security rules, there would be no protection against anonymous users using the full functionality of App Builder, which includes writing and running code on your server.)

Following is a sample configuration snippet to enable remote operations with Basic authentication. This snippet, or similar, must be added to ZERO_HOME/installed/appbuilder/config/zero.config (WebSphere sMash DE users: use ZERO_HOME/appbuilder/config/zero.config). You must restart App Builder to pick-up the change.

# Disable localhost restriction
/config/appbuilder/requireLocalhost=false

# Protect access to App Builder; here, using Basic authentication.
#
# "yourname" must be a valid username for your application, e.g. set
# with the "zero user" command.
@include "security/rule.config"{
   "conditions" : "/request/path =~ (/.*)?",
   "authType" : "Basic",
   "users" : ["yourname"]
}

For other security options, see Security considerations in the Developer's Guide.

Version 1.1.0.0.21442