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.

Running a Web Application

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.

TutorialDescriptionCovered
Running within JEE App ServerWalks 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-aloneDemonstrates how to run WoOF stand-alonemvn woof:run, WoofOfficeFloorSource

Web Pages

The following tutorials cover using dynamic web pages within OfficeFloor for building web applications.

TutorialDescriptionCovered
Dynamic web pageRendering of dynamic content.<!-- section --> , ${property}
Interactive web pageHandling of requests to provide interactive pages.#{link} , @HttpParameters
Navigate between pagesNavigation between pages.@NextTask , @FlowInterface
Session stateStoring state between requests within the HTTP session.@HttpSessionStateful
Exception handlingHandling exceptions.@Parameter

Mobile

The following tutorials cover mobile functionality for OfficeFloor web applications.

TutorialDescriptionCovered
Coming SoonProviding a mobile view of the web page.

GWT integration

The following tutorials cover integration of GWT with WoOF to provide Rich Internet Applications (RIA).

TutorialDescriptionCovered
Generation of client side JavaScriptEasy configuration of GWT to generate JavaScript within the pageEntryPoint
AJAX via GWT RPCProvides easy implementation of both AJAX functionality within the page and servicing by the serverService Async Interface

AJAX push (reverse AJAX, Comet)

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.

TutorialDescriptionCovered
CometShows the ease of using Comet (AJAX push) with WoOFOfficeFloorComet
Server eventsDemonstrates the ease of publishing events@Comet

WoOF running within a JEE Servlet Container

Explans how to make use of WoOF within a JEE Servlet Container.

TutorialDescriptionCovered
Running within Servlet ContainerRunning 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 ContainerUse of Servlet container dependency injection (e.g. making use of EJBs).@EJB

Dependency Injection

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.

TutorialDescription
Dependency injectionWoOF with dependency injection.
Coming SoonQualification of dependencies with same type.
Coming SoonIntegration with Spring.
Coming SoonIntegration with Guice.

Context

The following tutorials cover configuring context for a OfficeFloor web application.

TutorialDescription
Transaction ManagementManaging transactions of an OfficeFloor web application.

Thread Injection

OfficeFloor provides thread injection.

TutorialDescription
Thread InjectionWoOF with thread injection.