OfficeFloor Tutorials
The tutorials below providing working examples and explanations of the features of OfficeFloor.
The acronym WoOF stands for Web on OfficeFloor. OfficeFloor at its core is actually a true inversion of control engine as it inverts control of dependencies, threads and the order methods are executed. The OfficeFloor web functionality is supported through plug-ins, which is why OfficeFloor is flexible to run anywhere - the API stays consistant but differing implementations can be used to adapt to the particular environment. Please see OfficeFloor's architecture for more details.
The source code for each tutorial can be downloaded and run with Maven. To view and run the tutorials within an IDE use the appropriate Maven setup for the IDE (for example run mvn eclipse:eclipse to use within Eclipse). Also installing the OfficeFloor Eclipse Plug-in will allow viewing and editing the graphical configuration.
The tutorials in the table below provide a step by step guide to setting up an OfficeFloor web application. If you are familar with Eclipse and Maven these tutorials can be skipped. Return to them later when ready to start running an OfficeFloor web application.
| Tutorial | Description | Covered |
|---|---|---|
| Running within JEE App Server | Walks through the simple steps to run WoOF within a JEE Application Server. Anyone familiar with Eclipse and Maven can skip this tutorial. | Eclipse and Maven |
| Running stand-alone | Demonstrates how to run WoOF stand-alone | mvn woof:run, WoofOfficeFloorSource |
The following tutorials cover using dynamic web pages within OfficeFloor for building web applications.
| Tutorial | Description | Covered |
|---|---|---|
| Dynamic web page | Rendering of dynamic content. | <!-- section --> , ${property} |
| Interactive web page | Handling of requests to provide interactive pages. | #{link} , @HttpParameters |
| Navigate between pages | Navigation between pages. | @NextTask , @FlowInterface |
| Session state | Storing state between requests within the HTTP session. | @HttpSessionStateful |
| Exception handling | Handling exceptions. | @Parameter |
The following tutorials cover mobile functionality for OfficeFloor web applications.
| Tutorial | Description | Covered |
|---|---|---|
| Coming Soon | Providing a mobile view of the web page. |
The following tutorials cover integration of GWT with WoOF to provide Rich Internet Applications (RIA).
| Tutorial | Description | Covered |
|---|---|---|
| Generation of client side JavaScript | Easy configuration of GWT to generate JavaScript within the page | EntryPoint |
| AJAX via GWT RPC | Provides easy implementation of both AJAX functionality within the page and servicing by the server | Service Async Interface |
OfficeFloor is a multi-threaded container allowing methods to be executed by different threads. As OfficeFloor is not limited by the Thread-per-Request architecture, it makes implementing AJAX push applications significantly easier. The following tutorials show the ease in which events can be pushed out to web clients.
| Tutorial | Description | Covered |
|---|---|---|
| Comet | Shows the ease of using Comet (AJAX push) with WoOF | OfficeFloorComet |
| Server events | Demonstrates the ease of publishing events | @Comet |
Explans how to make use of WoOF within a JEE Servlet Container.
| Tutorial | Description | Covered |
|---|---|---|
| Running within Servlet Container | Running the above web functionality within a JEE Servlet container. | WoofServletFilter |
| Integration with a Java Server Page (JSP) | Enables re-use of an existing JSP by providing it the necessary beans. | @HttpApplicationStateful, @HttpSessionStateful, @HttpRequestStateful |
| Utilising dependency injection of the Servlet Container | Use of Servlet container dependency injection (e.g. making use of EJBs). | @EJB |
Previous tutorials have covered the built in objects for WoOF's dependency injection. The following tutorials focus extending the web applications functionality by adding further objects for dependency injection.
| Tutorial | Description |
|---|---|
| Dependency injection | WoOF with dependency injection. |
| Coming Soon | Qualification of dependencies with same type. |
| Coming Soon | Integration with Spring. |
| Coming Soon | Integration with Guice. |
The following tutorials cover configuring context for a OfficeFloor web application.
| Tutorial | Description |
|---|---|
| Transaction Management | Managing transactions of an OfficeFloor web application. |
OfficeFloor provides thread injection.
| Tutorial | Description |
|---|---|
| Thread Injection | WoOF with thread injection. |