IBM WebSphere sMash Developer's Guide
IBM WebSphere sMash Developer's Guide
The IBM® WebSphere® sMash Developer's Guide describes the components that form the programming model for building WebSphere sMash applications. It includes an overview of the conventions and configuration for WebSphere sMash applications.
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 virtual directories that allow seamless
integration of the application with its dependencies.
Global context
The Global context provides applications a uniform mechanism to store and retrieve environment information.
Event processing
IBM® WebSphere® sMash applications can define, fire and handle events to interact with the various handlers within the WebSphere sMash platform.
Dependency management
This topic contains a reference about the dependency management support in IBM® WebSphere® sMash.
Dependency management allows a module to declare dependencies on other modules, and also ensures that
the correct revisions of those dependencies are used.
Application directory layout
IBM® WebSphere® sMash applications have a particular layout for their directory structure. This layout provides both organization around the parts that make up your application and convention around how your application works.
Virtual directories
The virtual directory function creates a flattened view, to both Web clients and application developers, of all files available within an application and of modules on which the application depends.
Command-line interface
The command-line interface is the starting point for developing IBM® WebSphere® sMash modules.
Runtime management
All IBM® WebSphere® sMash applications include the necessary components to allow a running server to be managed
and to manage other WebSphere sMash applications. Examples of some of the types of management functions all
applications have embedded within them include starting, stopping, recycling, monitoring, statistics and
configuring other applications.
Zero socket opener (ZSO) management extensions
The Zero socket opener (ZSO) extension enables the Java™ runtime that is hosting an IBM® WebSphere® sMash application to be started on demand when a client connects to the application.
Configuration
You can specify the properties and behavior of a IBM® WebSphere® sMash application in configuration files.
HTTP configuration
HTTP is the main method through which applications receive requests. The following section describes how to configure HTTP for a IBM® WebSphere® sMash application.
SSL configuration
This topic describes how to how to configure an IBM® WebSphere® sMash application
to accept requests from clients using HTTPS.
JVM configuration
IBM® WebSphere® sMash Applications can be tuned by adjusting the JVM configuration.
Proxy configuration
You can configure an Apache Web server as a reverse proxy server for routing to multiple IBM® WebSphere® sMash applications. This allows multiple WebSphere sMash applications to be accessed using a namespace at a single Web server address.
Security
IBM® WebSphere® sMash implements system-level authentication and authorization. Applications can take advantage of WebSphere sMash security
by defining security rules that determine which resources are protected, and how they are protected.
Authentication and authorization
IBM® WebSphere® sMash authentication is based on the Java™ Authentication and Authorization Service (JAAS), which allows various types of login modules to be
added to the programming model without changing the authentication model.
Advanced authorization
IBM® WebSphere® sMash provides advanced authorization support based on security roles and URIs. This topic explores configuring roles as well as configuring URI based authorization rules.
Security considerations
This topic provides security considerations when leveraging IBM® WebSphere® sMash. It includes best practices ranging from configuring security rules to requiring SSL for a set of resources to how not to cache secured resources.
OpenID authentication
OpenID consumer based authentication provides end users with a single digital identity that they can use across the internet. It proves that an end user owns an identity URL without externalizing their password or email address.
Security tokens
IBM® WebSphere® sMash authentication provides the pluggable token support for various types of security tokens.
Secret key encryption
This topic describes how to generate a secret key that is leveraged by the IBM® WebSphere® sMash security
runtime when generating tokens.
User service
User service is a library that provides access to user registries.
File-based user service
IBM® WebSphere® sMash provides a file based user service, a library that provides access to the user registry, as a
convenience for WebSphere sMash applications to leverage simple file based security.
LDAP user service
In addition to the default file based user service, IBM® WebSphere® sMash also provides
support for using an Lightweight Directory Access Protocol (LDAP) server as a user service.
Extending security
IBM® WebSphere® sMash security leverages the flexible event-based system to make it easy to add your own security implementations. With this enhanced flexibility, you can implement your own request processing event handler for secure, authenticate and authorize events
as well as registering preauthenticate handlers for security related tasks that do not fit neatly with the authenticate and authorize events.
Extending token support
IBM® WebSphere® sMash's authentication provides a pluggable token handling framework to support custom token implementations.
Extending user service
The IBM® WebSphere® sMash user service leverages the Global Context
to make it easy to add your own user service implementation.
Leveraging Trust Association Interceptors (TAIs)
Trust Association enables the integration of IBM® WebSphere® sMash security and third-party security servers. More specifically, a
reverse proxy server, such as IBM® Tivoli Access Manager - WebSEAL®, can act as a front-end authentication server while WebSphere sMash
applies its own authorization policy onto the resulting credentials passed by the proxy server.
Security migration
This topic describes the features that have been migrated in IBM® WebSphere® sMash security.
File serving
Static files, scripts, templates, and directory listings can be invoked and served directly out of the public folder. Files that implement REST conventions should, instead, be placed in the app/resources folder.
Deployment recommendations
Before deploying a IBM® WebSphere® sMash application into production, there are several steps that are recommended
to secure and protect your application.
Troubleshooting Core
Consult this documentation to troubleshoot problems starting and running an IBM® WebSphere® sMash application
Troubleshooting the command-line
This article provides tips and workarounds when using the command-line interface.
Programming
Writing Java handlers
Java™ can be used to implement handlers within IBM® WebSphere® sMash applications.
Writing Groovy handlers
Groovy can be used to implement handlers within IBM® WebSphere® sMash applications.
Writing PHP handlers
PHP can be used to implement handlers within IBM® WebSphere® sMash applications.
Resource (REST) programming model and conventions
IBM® WebSphere® sMash simplifies the task of creating applications using the Representational State Transfer (REST) architectural style.
Accessing global context
The global context is available from all parts of a IBM® WebSphere® sMash application. How you access the global context varies depending on the language of the artifact.
Response rendering
An HTTP response body can be generated using direct APIs or indirect rendering. In either case, you should set status and headers before writing any output.
HTTP error handling
When problems occur on a Web site, error pages should be returned to the client.
You can use the rendering capabilities to provide custom error pages.
HTTP validation support
HTTP supports validation of cached content using validators that include entity tags (ETags) and last modified dates. The HTTP Validation model is also used to ensure that a client's representation of a resource is not stale as part of a RESTful interaction. This section describes the high-level support for validation available in IBM® WebSphere® sMash.
Using the connection infrastructure
The Connection API
provides a flexible way to make REST-style requests to resources using a variety of protocols.
Using the Connection API
Use the Connection API to send a request to a remote resource using the connection infrastructure and obtain a response.
Working with HTTP or HTTPS services
A common use of the Connection API is to work with REST services over HTTP or HTTPS.
Sending an e-mail using EmailConnection
The EmailConnection class provides a simple way to send an
e-mail, including an e-mail that contain attachments, in IBM® WebSphere® sMash applications.
Configuring destinations
Use a destination configuration to specify how interactions with a resource made using the
Connection API are handled.
Configuring protocols
Requests that are made using the Connection API have a collection of protocol
configuration properties associated with them. The protocol configuration properties are used to send the request to the resource.
Configuring connection handlers
A connection handler is a small piece of logic that you can configure for a destination.
The connection infrastructure invokes a configured connection handler before sending a request, and again when receiving the response.
Creating a connection handler
Use the Handler interface to create a new connection handler.
Simple logging connection handlers
Two logging connection handlers are included with the connection infrastructure. The handlers are designed for simple scenarios and
as aids to problem determination when using the Connection API to work with a remote service.
Creating a custom protocol transport
This topic describes how to write a custom protocol implementation which can be used with the Connection API.
HTTP and HTTPS protocols
These protocols communicate with remote resources using HTTP or HTTPS.
SMTP protocol
This protocol sends an email with optional attachments.
File protocol
This protocol allows the application to read or write a file on the local filing system.
FTP protocol
This protocol allows the application to read or write a file using the file transfer protocol (ftp).
Event protocol
This protocol allows a connection destination to be implemented by local handler for the transmit event.
Reference
Module commands
This topic describes the commands that are always available through the command-line interface to all modules.
Management commands
This topic contains an alphabetical list of the management commands that can be performed on
any WebSphere sMash application. To issue these commands, your working directory should be the root
directory of the application, or any directory below the root directory of the application.
Global context reference
This topic contains reference tables that show the defined paths to available attributes in the global context zones.
JSON support
The zero.core package includes support for JavaScript™ Object Notation (JSON) data structures.
Leveraging XOREncoding
IBM® WebSphere® sMash provides an XOREncoder library with a simple encoding API so applications do not have to store passwords in clear text. Depending on whether your library supports encoding of a property in zero.config, you can use the command line or Eclipse to encode the password using XOREncoding.
URIUtils APIs
URIUtils is a set of APIs for constructing relative and absolute URIs within an IBM® WebSphere® sMash application. These APIs are helpful when constructing URIs for many purposes, including hyperlinks, images, and CSS links.
XML encoder API
XMLEncoder is an API for XML entity encoding. This utility can be used to escape parts of the response that may have untrusted active content.
Firing events
Events, in the IBM® WebSphere® sMash platform, organize loosely coupled handlers. Although this feature is not generally required for most application developers, it enables advanced developers to build custom extensions to WebSphere sMash.
Extending the global context
You can extend the global context with additional zone and type handlers. Zone handlers store the data and are responsible for scope and lifetime of that data. Type handlers handle value "pathing".
Extending the command-line
This topic contains information about extending the command-line by providing additional commands.
Nested resources in IBM WebSphere sMash
WebSphere sMash provides configuration access to nested resources.
Creating a shared repository
This topic contains information about hosting a shared repository created with the command-line.
PHP support
IBM® WebSphere® sMash enables developers to build applications in the PHP programming language.
PHP integration and WebSphere sMash specific PHP features
The articles in this section provide information on WebSphere smash specific PHP extensions and features.
Libraries and dependency resolution
Including PHP scripts using include and require from libraries resolved using Ivy.
PHP string encoding
This section describes important information about the handling of
PHP strings in IBM® WebSphere® sMash.
PHP setlocale
This section describes the use of the PHP setlocale function.
PHP to Java bridge
The PHP Java™ Bridge in WebSphere sMash can be used to interact with Java Objects,
implement Java™ Interfaces and instantiate and extend Java™ classes.
XML handling in PHP
The Extensible Markup Language (XML) is a general purpose markup language that is commonly used to
transfer data/information between two cooperating entities such as applications, servers or clients.
The PHP support in IBM® WebSphere® sMash supports rendering PHP variables as XML and manipulation of XML
strings as PHP variables.
PHP Language support
A summary of the PHP language support provided in IBM® WebSphere® sMash.
Core PHP functions
This section lists the PHP library functions and shows which PHP functions are currently supported by Project Zero.
Php.ini configuration
A number of configuration directives are supported in the config/php.ini file which can be
set to alter the behavior when executing PHP scripts.
Php Logging configuration
The P8 engine supports a number of different logging behaviors, these are defaulted to
correct settings for development and debug, and should be altered for production
systems.
PHP Superglobals
PHP supports the concept of auto globals or superglobals. These are variables that are available in any scope and are described in detail at PHP.NET superglobals documentation. The PHP support in IBM® WebSphere® sMash
enables a subset of these superglobals for use by PHP script developers.
Debugging PHP scripts
The instructions on this page explain how to debug PHP scripts running inside a IBM® WebSphere® sMash application.
Extending PHP
IBM® WebSphere® sMash application developers can choose to build extensions to PHP that provide access to functionality that was built
using Java™. This guide summarizes the steps for creating such an extension to the platform. For the purpose of this
guide, it is assumed that the developer uses the Eclipse
development environment to build the extension.
Creating a simple PHP extension
This article provides the steps necessary to create a sample
extension that allows manipulation of BigDecimals.
Passing variables to a PHP extension by reference
Any variable can be passed to a PHP extension by reference. This differs from Java™ where scalar
types and object references are always passed by value. This tutorial extends the big decimal
extension by adding a new extension function that negates the value passed. The negated value is
passed by reference.
Sending output to the browser
The PHP runtime provides an output stream for sending data back to the Web browser.
This tutorial shows how to access the output stream and write data into it.
The output stream is provided as a Java™ PrintStream object.
Accessing variables in the runtime
The PHP runtime allows an extension to create, read, update and delete local,
global and super global variables. This tutorial extends the big
decimal extension to add an extension function that accesses global variables.
The function checks whether a global variable exists, and if it does, whether it
contains a string that can be converted into a BigDecimal.
Configuring an extension
The PHP runtime allows an extension to load configuration information that is stored
in php.ini. This tutorial shows how to get configuration information
at runtime. It extends the big decimal extension by adding a new extension function
that does division of BigDecimal values.
Parsing function arguments
This tutorial shows how to parse arguments passed to an extension function.
Raising runtime errors
Errors and warnings are easy to raise in the PHP runtime. This tutorial shows how to raise
an error by passing a ResourceBundle that contains the error message to the PHP runtime.
Calling functions in the runtime
The PHP runtime allows an extension to invoke functions in the runtime. The
functions can be other extension functions or script defined
functions. This tutorial shows how to invoke the var_dump function in
the runtime and pass it an argument by value.
Accessing PHP arrays in an extension
The PHP runtime allows an extension to receive an Array as a parameter
and provides several interfaces to access and update the elements of
that array. New arrays can also be created. This tutorial shows how to
create an extension function which takes two arrays as parameters and
returns an array containing the bigdecimal sum of elements in the two
arrays which have the same integer key. Elements without integer keys or
with keys which do not appear in the other array are ignored.
Using PHP resources in an extension
You can use PHP resources, like files, database connections and network sockets, in an extension.
Extensions can then create resource types and register with the runtime.
Registering for object callbacks
This article provides an example showing how you can register a Java™
extension using the XAPIObjectCallbacks interface. The Java extension
is called back when events it has registered for are invoked on the object.
Debugging a PHP extension in Eclipse
You can debug PHP Extensions written in Java™ using the debugging
features of Eclipse.
Conversion of types between PHP and Java
Explains how PHP types are converted to and from Java™ Types by XAPI.
Overview of PHP runtime services
The PHP runtime provides many services to extensions such as error handling and class
registration. These services are available as interfaces named after the general category
of service they provide (for example, ErrorService). All the service interfaces
can be obtained through the RuntimeServices interface.
Source code for the big decimal extension
Here is the source code for all the tutorials in one file.
Troubleshooting
This article provides some of the common issues with getting your
applications to work as designed.
Running PHP Applications
The instructions on this page explain how to run existing PHP applications on IBM® WebSphere® sMash and list the PHP applications that already run.
Unit testing
Automated testing is an extremely useful tool to find and prevent bugs and guide
the overall development of your application.
Application administration
The zero.admin package provides the ability to perform administrative tasks
for IBM® WebSphere® sMash applications.
Getting started with database access
Data access has use cases that range from very simple to very complex.
zero.data provides an easy-to-use data access interface to get to your
data. zero.data is an API that is flexible enough to handle complex
situations without making simple tasks cumbersome.
Command Line Interface (CLI) for database access
Use the command-line interface to run statements against configured databases.
Database connection configuration
Configures database connection properties using the application's
zero.config file.
Database access API
Convenience API to accomplish common database query patterns.
Database transactions
The zero.data module supports transactions. A transaction is an operation
or set of operations that either succeeds completely, or fails completely.
An application can perform multiple operations in a single transaction using
Groovy closures or implementing a Java™ interface and passing either of these
to the Manager.inTransaction() method.
Extending database access
Open API to extend zero.data to access your data.
PHP data access
The zero.data for PHP feature provides a
data access layer for PHP. The initial goal is to wrap the existing
zero.data Java APIs with an XAPI-J extension. The APIs map very closely
to the Java counterparts, but with a PHP flavor.
Troubleshooting database access
Configuration tips and workarounds if you run into problems using
zero.data.
Zero Resource Model
The Zero Resource Model (ZRM) provides a simplified way to create
RESTful resource handlers with a data store. Developers need provide only
simple "model" definitions of resources; ZRM uses the model definitions to
create the data store and support full create/read/update/delete semantics.
In addition, ZRM supports a variety of content formats, including JSON and
Atom Publishing Protocols.
Zero Resource Model CLI tasks
The zero.resource component contributes several commands for the
lifecycle development of Zero Resource Model (ZRM) data models.
Configuring the Zero Resource Model
An application using the Zero Resource Model consists of the database
configuration, resource model declaration, and the resource event handler.
Zero Resource Model declaration
The resource model is the single, definitive source of metadata about your
data. It contains declarations about the essential fields and behaviors of
the data in your application.
Zero Resource Model API
The Model API accesses resources programmatically using collection-like
constructs.
PHP Zero Resource Model API
The Model API accesses resources programmatically using collection-like
constructs.
Zero Resource Model Transactions
The Model API supports transactions. A transaction is an operation or set of
operations that either succeeds completely, or fails completely. An
application can perform multiple operations in a single transaction using
Groovy closures, PHP callbacks, or implementing a Java™ interface and passing
any of these to the collection.inTransaction() method.
Zero Resource Model HTTP REST API
When a model has been declared, HTTP REST access to your modeled resources
can be enabled in just one simple step. This document shows how to enable
the HTTP REST API for your declared resource models and shows how the
Model API and queries are performed in HTTP.
Troubleshooting the Zero Resource Model
Known issues and workarounds to troubleshoot the Zero Resource Model.
Client programming with Dojo
IBM® WebSphere® sMash includes the Dojo toolkit for developing AJAX-based clients. Although AJAX and Dojo are not required for WebSphere sMash applications, the combination can result in compelling Web applications.
Using Dojo with the Zero Resource Model
The Zero Resource Model has a Dojo extension that simplifies
interaction with RESTful data from JavaScript™ and Dojo widgets.
Using iWidgets with WebSphere sMash
Use the zero.iwidgets package to build and test iWidgets with IBM® WebSphere® sMash.
Active content filtering (ACF)
The active content filtering (ACF) component removes potentially malicious active content from application content that is displayed in a browser.
Active content filtering
IBM® WebSphere® sMash provides support for removing and handling untrusted active content in requests and responses.
Active content filtering examples
The active content filtering (ACF) component removes potentially malicious active content from application content
that is displayed in a browser. This article explores situations in which active content can be leveraged to prevent
malicious content from running on the client.
Active Content Filtering: Default HTML filters
The zero.acf package provides a default active content filtering (ACF) HTML filter.
Active Content Filtering: Custom HTML filters
You can develop your own custom filter. Using the steps described in this article, you can create and use a new filter.
Protection against Cross-Site Request Forgery (CSRF) attacks
Cross-site request forgery (CSRF/XSRF) attacks are powerful and
straight-forward attacks that can totally subvert the security of Web
applications.
These attacks can target both the integrity (causing changes on the
server without users approval) and the confidentiality (leaking
private data) of Web applications.
Atom support
The Atom support component (zero.atom) provides the application developer with
convienient mechanisms for reading and writing XML documents in
Atom Syndication Format
This component consists of the Atom Renderer and the Atom APIs and some Atom configuration options.
This article describes how to use these functions.
RSS support
Use the zero.rss package to publish and consume Really Simple Syndication (RSS) feeds with IBM® WebSphere® sMash.
Using the Assemble flow
IBM® WebSphere® sMash Assemble flow provides the capability to access different services and assemble them into a WebSphere sMash application.
Getting started with Assemble flow
This section is for Assemble flow beginners. It provides tutorials to help you to create a simple flow quickly.
Creating a simple feed flow
This article provides a brief introduction and shows how to create a feed flow. You can also see the Creating a simple Assemble flow tutorial to create a project with Assemble flow support.
Creating a simple Assemble flow
This article provides a brief introduction to starting with simple Assemble flow.
Creating a simple extension activity
This article provides a a brief introduction to creating an extension activity in Assemble flow.
Using flows
The functionality for constructing applications that produce feeds or conversational applications is provided through Assemble flow. This is an optimized and highly specialized flow engine for processing data feeds, and coordinating interactions with other services.
A Flow language example
This section provides a step-by-step introduction to the language and its usage, illustrated with examples.
Creating and running a new flow
This article describes creating, deploying and running flows.
Persistent flow instance
Assemble flow provides the simple and extensible persistence mechanism to store the flow instances.
In current Assemble flow, the developer can chose to store the flow context in GlobalContext or the relational database.
Flow instance cleanup
Long running flow instances can be automatically cleaned up in the runtime to release available resources.
Flow activities
Activities are the individual steps in running a flow. There are, generally, the following types of activities in Assemble flow:
Writing extension activities
You can create extension activities in Java using the Assemble flow language.
Writing extension activities in Groovy
This article discusses using Groovy to implement an extension activity for an Assemble flow.
Writing extension activities in PHP
This article discusses using PHP to implement an extension activity for an Assemble flow.
Activity Validation
This article describes the validation rules for all the activities that are built in to the flow language.
Invoking the REST service in Assemble flow
Assemble flow provides a declarative way to describe and invoke the REST service.
Simple collaboration in Assemble flow
Assemble flow provides the webUI activity to support a simple collaboration flow with a REST interaction pattern.
Flow language reference
The flow language is a Web-based composition language made up of two main constructs: activities that define units of work and links that define dependencies between these activities.
Flow language behavior and syntax
This article provides detailed information about the flow language behavior and syntax.
Running processes and activities
This article provides information about running processes and activities.
Built-in activities reference
This article provides a collection of activities that are immediately available.
Extension activities reference
This article provides a collection of activities that are useful in common cases.
Feed operators reference
This article provides information about a collection of activities that are immediately available for manipulation of a feed.
XML operators reference
This article provides information about a collection of activities that are immediately available for manipulation of XML.
Assemble flow management
Assemble flow management provides features for accessing flow definition files and monitoring flow instance status, including a REST style API for managing flow definition files and a Web based interface to list runtime information of flow instances.
Troubleshooting Assemble flow
Consult this article if you encounter problems using Assemble flow.
Feed manipulation by scripting
By leveraging Assemble flow's capabilities, "zero.feed" module provides the server-side and browser-side script APIs to simplify the feed processing for scripting developer.
Java/Groovy feed API
The Java/Groovy feed API provide the simplified way for feed manipulation. The developers can use a few line of code to access, aggregate, filter and query feeds.
AJAX feed API
Assemble flow provides AJAX feed API for Javascript developer to simplify the accessing and manipulation of feeds.
REST to SOAP extension
The REST to SOAP extension, zero.connection.soap,
enables a REST-style request to an external SOAP service using the Connection API.
Protocol extension for JMS
The protocol extension for JMS, zero.connection.jms,
allows an application to use the Connection API to send
and receive messages to and from destinations managed by an external Java™ Message Service (JMS) provider,
such as IBM® WebSphere® MQ or IBM WebSphere Application Server.
Configuring the connection to the JMS provider
The protocol extension for JMS requires that the application configuration defines
the necessary information to establish connections to an external Java™ Message Service (JMS) provider.
Working with javax.jms.Message objects
The zero.connection.jms dependency includes a TypeHandler implementation
for working with javax.jms.Message instances in the global context. The type handler
allows applications to use the GlobalContext or Connection APIs to read the contents
of the message without using the javax.jms.Message APIs directly.
Sending a JMS message from within a flow
The POSTJMSMessage activity can be used within a flow to send a message to a
JMS destination.
An example scenario using the protocol extension for JMS
In this example scenario, the protocol extension for JMS is used to communicate with
enterprise applications using either IBM® WebSphere® MQ or IBM WebSphere Application Server.
Connection jms protocol reference
The jms protocol allows an application to use the Connection API to send and
receive messages to and from destinations managed by an external Java™ Message Service (JMS) provider.
Protocol extension for SFTP
This article contains a description of the zero.connection.sftp protocol extension for SSH File Transfer Protocol,
also known as Secure File Transfer Protocol, or SFTP. An application can use the Connection API with this protocol
implementation to PUT, GET and DELETE files held by an external SFTP server.
SFTP protocol reference
The sftp protocol allows the application to interact with a remote SFTP server.
Using timers
The timer support module, zero.timer, allows tasks to be scheduled to execute repeatedly on a fixed delay.
Kicker support
The kicker support module, zero.kicker, notifies, or kicks, a REST endpoint to make it aware of some information or change.
The kicker uses an HTTP POST message to send the notification and manages the process of retrying over increasing intervals if the notification fails.
Mail kicker and receiver
The mail kicker and receiver modules allow an application to be notified when an e-mail message arrives
in a POP3 mail store folder. The application can process the contents of the message by providing a handler
for the mailMessage event.
Configuring a POP3 mail store connection
A mail store configuration contains the properties used by the mail kicker and
mail receiver to connect to a POP3 server.
Using the mail kicker
The mail kicker monitors mail store folders for new e-mail messages and notifies a mail receiver
when a message arrives.
Using the mail receiver
When notified that a mail store folder contains an e-mail message, the mail receiver reads the message
and fires a mailMessage event to allow the application to process the message.
File kicker and receiver
This topic describes the file kicker and receiver modules that allow an application to be notified of changes to a specified file or directory.
Office File Format Support
Use the zero.office.integration package to read and write Microsoft® Office® file formats with IBM® WebSphere® sMash.
Developer Web tools
The zero.core.webtools package provides a set of useful utility
functions for Zero application developers to use when building applications.
SERVICES
Excel services
IBM® WebSphere® sMash includes support for Microsoft® Excel file formats and provides services to integrate Excel data in to WebSphere sMash applications.
SAMPLES
Overview of tutorials, samples, and demos
After finishing the tutorials in the Getting Started guide, try out these additional tutorials, samples, and demos to help you learn how to use IBM® WebSphere® sMash.
HelloDojo - dojo demo
This tutorial (zero.hellodojo.demo) provides a starting point for users who are new to Dojo. It presents the basics of creating a Dojo application within App Builder using
pre-built Dojo widgets, simple Dojo dijit form elements, and Dojo's event model.
Developing a suggestion box application with WebSphere sMash
This section provides tutorials that introduce the Zero Resource Model (ZRM)
and the dojo libraries that make it easy to build Web applications that read and write
data.
Using the command-line interface
This tutorial provides an introduction to the Zero Resource Model (ZRM)
and the JavaScript™ library and includes developing zero.suggest.demo with
the WebSphere sMash CLI.
Using the App Builder
Develop the suggestion box application using the App Builder
Sample using Employee Data
The employee data sample is a RESTful application that demonstrates many capabilities
of IBM® WebSphere® sMash. It provides an interface for managing employee
data, including listing, creating, editing and deleting employee records.
PHP employee data demo
The PHP based employee data demo (zero.phpemployee.demo) is a RESTful application developed using the PHP programming language that
demonstrates many of IBM® WebSphere® sMash's capabilities. It provides an interface for managing employee
, including listing, creating, editing and deleting employee records.
Connection API demonstration application
The zero.connection.demo sample application contains example uses of the Connection
API and connection handlers, including invoking a REST service and sending an e-mail.
Kicker and Receiver Sample
The zero.kicker.demo sample application demonstrates how to
implement a kicker and receiver to process messages from a simple queue
resource.
Atom application
This application (zero.atom.demo) demonstrates Atom support availble in the zero.atom extension and ibm_atom Dojo
extension.
Using the flow samples
There are some basic flow demos (zero.flow.demo) that you can install and use to verify your flow runtime installation,
and to demonstrate a few of the basic features of the flow language.
Office Monitor demo: A rich PHP application
The Office Monitor (zero.officemonitor.demo) is a situational mashup application developed in PHP to demonstrate RESTful principles
and wiring multiple RESTful resources to rich Dojo constructs such as Drag and Drop and
context menus.
OpenID demo application
This application (zero.openid.demo) demonstrates various features of IBM® WebSphere® sMash Security and illustrates how to leverage
OpenID authentication, how to define security rules for the application, and how to extend a user registry.
Developing an iWidget application (zero.iwidgets.demo)
This tutorial (zero.iwidgets.demo) walks you through building two separate iWidgets with IBM®
WebSphere® sMash, wiring them together, testing them, and then publishing those
iWidgets to IBM InfoSphere™ MashupHub.
Flickr based sMash Application
IBM® WebSphere® sMash allows developers to build server-side mashup applications that enhance end-user experience by aggregating and manipulating content from different providers.
We describe a simple Flickr based mashup applicati