IBM WebSphere sMash concepts

IBM® WebSphere® sMash has an event-driven architecture and utilizes Representational State Transfer (REST) concepts that are reflected in its programming model. This section describes how to build Groovy, PHP, or Java™ based handlers. It also describes the application directory layout and the concept of virtualized directories that allow seamless integration of the application with its dependencies.

Global context
The global context provides a central construct for applications to store and retrieve environment information.
Event processing
Events in the WebSphere sMash platform orchestrate behavior in the form of loosely-coupled event handlers. WebSphere sMash fires a fixed set of events for HTTP request processing and stages of the application life cycle. As a developer, you can add other event types.
Application directory layout
WebSphere sMash applications have a particular layout for their directory structure. The layout provides both organization around the parts that make up your application and convention around how your application works. Follow the conventions and structure defined by WebSphere sMash to easily construct and maintain your application. By doing so, you also provide less configuration information.
Virtualized directories
WebSphere sMash uses a dependency management utility called Ivy to ensure that your module is using the right versions of the libraries you declare as dependencies. In Ivy, these libraries are called modules, and they are located through a process called dependency resolution. See the section on Dependency Management for more information. WebSphere sMash provides seamless integration of script directories across an application and its dependencies, while maintaining each as separate entities. For example, while processing a request for GET /index.html, WebSphere sMash searches for the public/index.html file in the application directory, then within each resolved dependency. The first occurrence of the file is served. WebSphere sMash applications run as if the contents of the public directories, from application to dependencies, are merged with a first-one-wins precedence. This notion of a virtualized directory describes all the script directories, including public, app/errors, app/resources, app/scripts, and app/views.

Version 1.1.0.0.21442