Return-Path: Delivered-To: apmail-incubator-beehive-commits-archive@www.apache.org Received: (qmail 67536 invoked from network); 5 Jan 2005 22:53:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jan 2005 22:53:58 -0000 Received: (qmail 1106 invoked by uid 500); 5 Jan 2005 22:53:58 -0000 Delivered-To: apmail-incubator-beehive-commits-archive@incubator.apache.org Received: (qmail 1069 invoked by uid 500); 5 Jan 2005 22:53:58 -0000 Mailing-List: contact beehive-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Dev" Delivered-To: mailing list beehive-commits@incubator.apache.org Received: (qmail 1051 invoked by uid 500); 5 Jan 2005 22:53:58 -0000 Delivered-To: apmail-incubator-beehive-cvs@incubator.apache.org Received: (qmail 1046 invoked by uid 99); 5 Jan 2005 22:53:58 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 05 Jan 2005 14:53:56 -0800 Received: (qmail 67507 invoked by uid 65534); 5 Jan 2005 22:53:55 -0000 Date: 5 Jan 2005 22:53:55 -0000 Message-ID: <20050105225355.67503.qmail@minotaur.apache.org> From: steveh@apache.org To: beehive-cvs@incubator.apache.org Subject: svn commit: r124293 - /incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml /incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: steveh Date: Wed Jan 5 14:53:53 2005 New Revision: 124293 URL: http://svn.apache.org/viewcvs?view=rev&rev=124293 Log: Fix for BEEHIVE-75: Page Flow Overview - additional reasons/motivations for using Page Flow. Adding content about nested page flows. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml?view=diff&rev=124293&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r1=124292&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml&r2=124293 ============================================================================== --- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml (original) +++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml Wed Jan 5 14:53:53 2005 @@ -62,10 +62,12 @@
Make a Project Folder -

In this task you will make a project folder that contains web application resourcs. You +

In this task you will make a web application project folder. Control development + will take place within this web application. You might be asking yourself, Why would I need web application resources in a control tutorial? The answer is that developing your control within a web app - makes it much easier to test your control as you go.

+ makes it much easier to test your control as you go. The web application will form + the testing ground for your control.

On your C: drive, create a directory called beehive_projects.

Copy the folder BEEHIVE_HOME/samples/netui-blank into C:/beehive_projects.

Rename the folder C:/beehive_projects/netui-blank to the name @@ -74,6 +76,8 @@ C: beehive_projects control_tutorial + +

To Add Beehive Runtime JARs to Your Project Folder

In this step you will assemble the runtime resources for your Control. @@ -85,8 +89,7 @@ -Dwebapp.dir=C:\beehive_projects\control_tutorial deploy.beehive.webapp.runtime -

- +
To Create the Control's Implementation File

In this step you will create the implementation file for your Beehive Control. This is a Java class (although it has the JCS file extension) that contains the bulk of your Control's working code.

Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml?view=diff&rev=124293&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r1=124292&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r2=124293 ============================================================================== --- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml (original) +++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml Wed Jan 5 14:53:53 2005 @@ -19,18 +19,60 @@
Page Flow Features -

Page Flows make building Java web applications easy and intuitive. When programming with Page Flows, the developer writes JAVA classes and JSP pages--that's it. There is very little occasion to work with configuration files, or other components. Page Flow programming also excels at separating presentation logic from data processing logic, resulting in uncluttered JSP code which is easy to understand and edit. Data processing and the web application configurables are handled in a single Java class using a simple declarative programming model.

+

Page Flows make building Java web applications easy and intuitive. + When programming with Page Flows, the developer writes JAVA classes and JSP pages--that's it. + There is very little occasion to work with configuration files, or other components. + Page Flow programming also excels at separating presentation logic from data processing + logic, resulting in uncluttered JSP code which is easy to understand and edit. + Data processing and the web application configurables are handled in a single Java + class using a simple declarative programming model.

Declarative Programming

-

Many common web app programming tasks are accomplished through a declarative programming model using JSR 175 metadata annotations, a new feature in JKD5. JSR 175 metadata annotations, "annotations" for short, are property setters for Java classes and methods, aliviating the need for independent configuration files. Navigation, exception handling, validation, and other tasks become configurable properties of a single Java class, the "controller" class that drives the web application.

+

Many common web app programming tasks are accomplished through a declarative programming model using + JSR 175 metadata annotations, a new feature in JKD5. JSR 175 metadata annotations, "annotations" + for short, are property setters for Java classes and methods, aliviating the need for independent + configuration files. Navigation, exception handling, validation, and other tasks become configurable + properties of a single Java class, the "controller" class that drives the web application.

Page Flows are Stateful

-

When a user enters a Page Flow (by calling an URL in the Page Flow's URL space), an instance of the Page Flow's controller class is created. While the user is in the Page Flow, the controller class stores the accumulated session and user state. The methods within the class have access to the accumulated state, making for easy state management within the web application. For example, suppose your web application calls for a multi-page registration, where the user moves from page to page filling out a user profile. The controller class stores the user data as the user progresses through the registration and has access to the profile data as session state. When the user leaves the Page Flow, the state is automatically cleaned up.

+

When a user enters a Page Flow (by calling an URL in the Page Flow's URL space), an instance of the + Page Flow's controller class is created. While the user is in the Page Flow, the controller class + stores the accumulated session and user state. The methods within the class have access to the + accumulated state, making for easy state management within the web application. For example, + suppose your web application calls for a multi-page registration, where the user moves from page to + page filling out a user profile. The controller class stores the user data as the user progresses + through the registration and has access to the profile data as session state. When the user leaves + the Page Flow, the state is automatically cleaned up.

Page Flows are Modular

-

A single web application can have multiple Page Flows within it, allowing you to break up the application into separate, self-contained chunks of functionality. For an example, see the Petstore Sample, which has different Page Flows for browsing the Petstore, buying products, and handling user accounts.

-

Page Flow web applications also contain a global Page Flow, called the "shared flow", which is both a fallback handler for unhandled actions and exceptions and a place to store session state. An instance of the shared flow class is stored in the user session upon the first request to any Page Flow and remains until the session ends. When an action is raised in a Page Flow, and that action is not handled by the Page Flow, the shared flow gets a chance to handle it. The same is true for an exception raised within a Page Flow: if it is unhandled in the Page Flow, the shared flow gets a chance to handle it.

-

Struts Integration

-

Page Flows are built on top of Apache Struts 1.1. Each Page Flow is compiled into a Struts module. As a result, Page Flow and Struts applications can work closely together.

-

Struts and Page Flow apps can co-habitate and interact with one another inside a web app. To forward from a Page Flow to a (pure) Struts module, simply reference the desired action within the Struts module. The same goes for the reverse direction: from a Struts module, simply configure an action to point to the desired method in the Page Flow.

+

A single web application can have multiple Page Flows within it, allowing you to break up the application + into separate, self-contained chunks of functionality. For an example, see the + Petstore Sample, which has different Page Flows + for browsing the Petstore, buying products, and handling user accounts.

+

Page Flow web applications also contain a global Page Flow, called the "shared flow", which is both + a fallback handler for unhandled actions and exceptions and a place to store session state. An instance + of the shared flow class is stored in the user session upon the first request to any Page Flow and + remains until the session ends. When an action is raised in a Page Flow, and that action is not handled + by the Page Flow, the shared flow gets a chance to handle it. The same is true for an exception raised + within a Page Flow: if it is unhandled in the Page Flow, the shared flow gets a chance to handle it.

+

Page Flows are Nestable

+

Page flow nesting gives you an even greater ability to break up your project into separate, + self-contained bits of functionality. At its heart, it is a way of pushing aside the current + page flow temporarily and transferring control to another (nested) page flow with the intention of coming back + to the original (nesting) one.

+

So when would you use this? Nesting is useful when you want to do one of the following tasks:

+
    +
  • gather data from the user, for use in the current page flow
  • +
  • allow the user to correct errors or supply additional information en route to executing a desired action
  • +
  • show an alternate view of data represented in the current page flow
  • +
  • show the user information that will be useful in the current page flow (e.g., help screens can be easily implemented as nested page flows)
  • +
+

Struts Integration

+

Page Flows are built on top of Apache Struts 1.1. Each Page Flow is compiled into a Struts module. + As a result, Page Flow and Struts applications can work closely together.

+

Struts and Page Flow apps can co-habitate and interact with one another inside a web app. To forward + from a Page Flow to a (pure) Struts module, simply reference the desired action within the Struts module. + The same goes for the reverse direction: from a Struts module, simply configure an action to point to + the desired method in the Page Flow. +

You can use many advanced Struts features within a Page Flow, for example, the StrutsValidatorPlugIn, which allows you to declare validation rules inside an XML file. Page Flows do not directly support the plug-in, but you can refer your data to a Struts app that does support the plug-in by using the Struts merge feature of Page Flows.