Author: steveh Date: Tue Jan 4 11:49:25 2005 New Revision: 124147 URL: http://svn.apache.org/viewcvs?view=rev&rev=124147 Log: A fix for BEEHIVE-79: Page Flow Overview - login flow could be improved Added: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia (contents, props changed) incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png (contents, props changed) Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.dia incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.png incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png
Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml?view=diff&rev=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml&r2=124147 ============================================================================== --- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml (original) +++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml Tue Jan 4 11:49:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd"> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> <document> <header> <title>Page Flow Controllers</title> @@ -10,7 +10,7 @@ <title>Introduction</title> <p> - As introduced in the <link href="pageflow_overview.html">Page Flow Overview</link>, the + As introduced in the <a href="pageflow_overview.html">Page Flow Overview</a>, the following model will be used. </p> @@ -308,7 +308,11 @@ } } </source> - + <p> + Now that we have a method (<code>myPage()</code>) with two possible navigation outcomes, the flow diagram + appears as follows. Notice the two named arrows exiting the <code>myPage()</code> method. + </p> + <p><img src="images/impl-flow-1-conditional-forward.png" alt="conditional forwards"/></p> <p> You may notice that the body of <code>myPage()</code> has no particular logic regarding the user's "My Page" itself. It simply operates in terms of authentication and generically @@ -316,9 +320,7 @@ with other controller methods that are concerned with authentication. For more ideas along these lines, please see <!--<link href="controller_patterns.html">-->Controller Patterns [todo: forthcoming document]<!--</link>-->. </p> - </section> - <section id="handling_forms"> <title>Handling Forms</title> @@ -490,7 +492,7 @@ </p> <ul> - <li><link href="pageflow_jsp.html">Page Flow JSP</link></li> + <li><a href="pageflow_jsp.html">Page Flow JSP</a></li> </ul> </section> 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=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r2=124147 ============================================================================== --- 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 Tue Jan 4 11:49:25 2005 @@ -1,11 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://forrest.apache.org/dtd/document-v12.dtd"> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> <document> <header> <title>Page Flow Overview</title> </header> <body> - <section id="introduction"> <title>Introduction</title> @@ -18,7 +17,7 @@ </p> </section> -<section> +<section id="Page_Flow_Features"> <title>Page Flow Features</title> <p>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.</p> <p><strong>Declarative Programming</strong></p> @@ -27,7 +26,7 @@ <p><strong>Page Flows are Stateful</strong></p> <p>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. </p> <p><strong>Page Flows are Modular</strong></p> -<p>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 <link href="../jpetstore.html">Petstore Sample</link>, which has different Page Flows for browsing the Petstore, buying products, and handling user accounts.</p> +<p>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 <a class="fork" href="../jpetstore.html">Petstore Sample</a>, which has different Page Flows for browsing the Petstore, buying products, and handling user accounts.</p> <p>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.</p> <p><strong>Struts Integration</strong></p> <p>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.</p> @@ -151,7 +150,7 @@ </ul> <p> - When using JPFs, pages and controller methods are interleaved, transparently. + When using JPFs, pages and controller methods are interweaved, transparently. </p> <ul> @@ -168,12 +167,20 @@ </p> <p> - Now it is apparent that to navigation from <code>index.jsp</code> to <code>mypage.jsp</code>, + Now it is apparent that to navigate from <code>index.jsp</code> to <code>mypage.jsp</code>, the user traverses across the <code>myPage()</code> method. This method performs the necessary check to determine if the user has already been authenticated. If the user has logged in already, - it will direct the user straight to <code>mypage.jsp</code>, otherwise, it displays <code>login.jsp</code>. + it will direct the user straight to <code>mypage.jsp</code>. </p> - + <p> + But what if the user hasn't logged in already? A natural design choice would be to have the + <code>myPage()</code> method throw an exception and handle the exception in someway. + The following diagram shows how you can interweave exception handling into the page flow to + further refine the paths through the flow. + </p> + <p> + <img src="images/impl-flow-1-exception-handling.png" alt="page flow exception handling"/> + </p> </section> <section id="next"> <title>Next...</title> @@ -183,7 +190,7 @@ </p> <ul> - <li><link href="pageflow_controllers.html">Page Flow Controller</link></li> + <li><a class="jump" href="pageflow_controllers.html">Page Flow Controller</a></li> </ul> </section> Added: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia?view=auto&rev=124147 ============================================================================== Binary file. No diff available. Added: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png?view=auto&rev=124147 ============================================================================== Binary file. No diff available. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.dia Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.dia?view=diff&rev=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.dia&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.dia&r2=124147 ============================================================================== Binary files. No diff available. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.png Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.png?view=diff&rev=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.png&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-exception-handling.png&r2=124147 ============================================================================== Binary files. No diff available. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia?view=diff&rev=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia&r2=124147 ============================================================================== Binary files. No diff available. Modified: incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png?view=diff&rev=124147&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png&r1=124146&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png&r2=124147 ============================================================================== Binary files. No diff available.
