Overview

A variety of utilities are available to develop IBM® WebSphere® sMash applications. This topic provides an introduction to help you pick the one that's right for you.

Command-line interface

The command-line interface (CLI) is an integral component of WebSphere sMash. It provides basic support for developing and running WebSphere sMash applications.

Most developers will use the CLI commands to complement the other tools. That is, most will use App Builder or the plug-ins for Eclipse for common development activities of create, edit, and debug. CLI commands are then used for special-purpose activities, such as creating database tables from a Zero Resource Model model definition (zero model sync).

The CLI is also extensible, meaning that your applications can add commands that may be invoked via the CLI.

App Builder

App Builder is a non-released Web-based development tool designed for building WebSphere sMash applications. App Builder includes visual editors (for example, for HTML pages, forms, and flows) along with source editors tailored for script development. App Builder also provides simple debug support for Groovy scripts (also works for Java™ classes).

App Builder is available with sMash DE and the latest builds of our next release. Use sMash DE to develop applications for the released WebSphere sMash runtime.

CLI commands may be invoked for an application via the Command Prompt, found within the Run tab.

Plug-ins for Eclipse

Non-released plug-ins for Eclipse are available for Java/Groovy and PHP developers. These plug-ins are intended for platform developers (that is, developers creating extensions for the WebSphere sMash platform).

The plug-ins integrate common operations into the Eclipse workspace, including creating and running WebSphere sMash application; editing dependencies; automatic resolves; and managing your local repository. You'll also have access to Eclipse features, such as code completion and extensive debug support. But the visual editors from the App Builder (for HTML pages, forms, flows, etc.) are not available in the plug-ins.

CLI commands can be invoked for an application, but doing so requires that you manually edit the Eclipse Run configuration corresponding to your application: Change the argument from run to the desired command. The following screen capture shows an example: To run zero model sync, enter model sync as the argument.

Program arguments on the Arguments tab is set to model sync.

Mixing App Builder and Eclipse

App Builder and the WebSphere sMash plug-ins for Eclipse both use an installed WebSphere sMash CLI, which means developers can seamlessly use both of these tools on the same application. This mixed mode might be useful for applications that contain user-interface components and scripting (focus of App Builder) as well as extensive Java code.

There are two keys to ensure a consistent development experience with mixed App Builder and Eclipse:

  1. Both App Builder and the WebSphere sMash plug-ins for Eclipse must use the same installed CLI. For example, if you're launching App Builder by running the script zerohome>/appbuilder, then your plug-in should be configured with Zero home set to the same zerohome>.
  2. The plug-in must be configured for the same module group to which the application is resolved. This will already be the case for most sMash DE users, because the stable module group is the default.

If you find yourself using both App Builder and Eclipse on one application, you might also consider whether the application should be refactored into multiple modules (for example, user-interface components and scripting into one module; the extensive Java code in another). In some cases, such refactoring might promote better reuse and team development.

Version 2.0.30111