WebSphere sMash
| Company type | Software platform |
|---|---|
| Industry | Software development |
| Predecessor | Project Zero |
| Founder | IBM |
| Defunct | 2012 (discontinued for sale) |
| Fate | Discontinued, support ended in 2014 |
| Headquarters | United States |
| Products | Web application development and runtime environment supporting Groovy and PHP |
| Parent | IBM |
WebSphere sMash was an IBM-developed environment designed for both development and runtime, facilitating the creation of dynamic web applications through the use of scripting languages such as Apache Groovy and PHP. Its PHP runtime operated within a Java-based framework. This platform originated from Project Zero, IBM’s innovative software initiative. WebSphere sMash was discontinued for sale in 2012, with official support concluding in 2014.
The platform offered integration with Eclipse and enabled developers to build REST-style services using either Groovy or PHP.
Architecture
The architecture of WebSphere sMash is characterized by several key components:
Event-driven programming model
WebSphere sMash adopted an event-driven programming paradigm, where applications are composed of modular units that communicate through events. Event handlers respond to these events independently of the sender’s implementation details. This model supports application construction from a combination of PHP, Java, Groovy, or Flow language modules.
Global context
To facilitate data sharing among stateless event handlers, WebSphere sMash implemented a Global Context—a hierarchically organized data structure divided into zones that differ in lifespan, attributes, and persistence capabilities.
Repository management system
Dependency management in sMash relied on the Ivy tool. Applications consisted of modules declaring dependencies that Ivy resolved from local or remote repositories. IBM hosted a module repository at projectzero.org, while dependencies could also be sourced through the Maven2 repository.
PHP support
Support for PHP in WebSphere sMash is provided through a Java-based PHP runtime. Here, PHP scripts are compiled into Java bytecode and executed on the Java Virtual Machine (JVM), allowing seamless, same-process interoperability among PHP, Java, and Groovy components for multi-language application development.
In contrast to Quercus, another JVM-hosted PHP implementation, sMash leverages existing PHP extensions from PHP.net by integrating them with the JVM via the Java Native Interface (JNI) alongside an API layer named XAPI-C.
The runtime environment includes a DBGp debugging interface compatible with IDEs supporting DBGp protocols, such as Eclipse’s PDT. It is marketed as the "WebSphere sMash runtime for PHP" without a distinct branding.
By October 2008, WebSphere sMash was capable of running prominent PHP applications on the JVM platform, including SugarCRM, phpBB, WordPress, and MediaWiki.
A tightly coupled Java/Groovy bridge enables PHP scripts to access Java and Groovy libraries through an efficient interoperability layer. This bridge also exposes sophisticated Groovy capabilities like closures and Groovy’s metaobjects directly to PHP code.