From: <jm...@us...> - 2005-09-28 16:57:58
|
Update of /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28594/src/documentation/content/xdocs/strutsdialogs Modified Files: index.xml Log Message: Index: index.xml =================================================================== RCS file: /cvsroot/struts/struts-site/src/documentation/content/xdocs/strutsdialogs/index.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** index.xml 28 Sep 2005 01:04:59 -0000 1.15 --- index.xml 28 Sep 2005 16:57:44 -0000 1.16 *************** *** 44,51 **** </ul> ! <p>The Front Controller pattern does not specify exact details of how the state should be managed, ! or how a response should be handled after a view is rendered. Out-of-the-box Struts framework does ! not provide much help on these subjects. Quite contrary, official Struts documentation suggest ! practices that may complicate the matters.</p> </section> --- 44,49 ---- </ul> ! <p>The Front Controller pattern does not specify the exact details of how the state should be managed, ! or how a response should be handled after a view is rendered.</p> </section> *************** *** 58,63 **** where to queue output data to, and where to store information between requests.</p> ! <p>Struts documentation does not specify how exactly to prepare JSP page, and how to handle form ! submission. Struts users came up with idea of pre-action (output action, setup action) and post-action (input action) dispatchers, so actions and JSP pages are interlaced, while action-relevant business data (green oval on the picture below) is located outside of an action:</p> --- 56,60 ---- where to queue output data to, and where to store information between requests.</p> ! <p>Struts users came up with idea of pre-action (output action, setup action) and post-action (input action) dispatchers, so actions and JSP pages are interlaced, while action-relevant business data (green oval on the picture below) is located outside of an action:</p> *************** *** 76,86 **** to one used in ASP.NET framework, while keeping your investments into Struts.</p> ! <p>One of the ASP.NET concepts is a unity of page markup (ASPX) and business-related code (C# or VB). ! A page layout and widgets are defined in the markup, while corresponding class handles ! page lifecycle and incoming events. This concept is especially easy to grasp for programmers of desktop applications:</p> <source> Before page is displayed, the code behind it initializes page data. After page is rendered, activating a widget in the browser window ! generates event, which is dispatched to a handler. </source> --- 73,84 ---- to one used in ASP.NET framework, while keeping your investments into Struts.</p> ! <p>One of the ASP.NET concepts is the unity of page markup (ASPX) and business-related code (C# or VB). ! A page layout and widgets are defined in the markup, while page lifecycle and incoming events are ! handled by corresponding class file. This concept is especially easy to grasp for programmers ! of desktop applications:</p> <source> Before page is displayed, the code behind it initializes page data. After page is rendered, activating a widget in the browser window ! generates event, which is dispatched to a handler. defined in the class. </source> *************** *** 117,139 **** <title>State management</title> ! <p>Struts Dialogs does not introduce new classes to manage application state. Instead, it uses ! the class which already exists in the Struts core, ActionForm. Official Struts guidelines recommend ! using ActionForm with request scope, only to collect input data. This decision entails developers ! to use custom objects to queue output data and to store information between requests.</p> ! ! <p>Struts Dialogs suggests to use session scope for ActionForm. One simple change in the config file ! promotes ActionForm from simple request buffer to stateful input/output object. In JSF terms, ! ActionForm now acts as a backing bean for JSP page. There is nothing groundbreaking in using ! session scope for ActionForm, or in storing output data in it. Online poll shows that about 60% of ! respondents use ActionForm for queueing output data.</p> ! <p>With changing ActionForm scope to session, it is possible now to initialize form bean only once, and to reuse data between requests. This is convenient for form resubmissions, for page reloading or for navigating back to previous resource. Having all resource data in a single ActionForm simplifies JSP page. Struts automatically populates ActionForm ! with submitted data, now you can use this data to render a page without ! additional efforts. Session scope justifies the usage of nested properties within ActionForm, ! which allows to use business objects or DTOs directly, without copying their data to ActionForm ! and from ActionForm.</p> </section> --- 115,134 ---- <title>State management</title> ! <p>Struts Dialogs does not introduce new classes to manage application state. ! Instead, it uses existing ActionForm class as a first-class stateful input/output object. ! In JSF terms, ActionForm now acts as a backing bean for JSP page. There is nothing ! groundbreaking in using session scope for ActionForm, or in storing output data in it. ! Online poll shows that about 60% of respondents use ActionForm for queueing output data.</p> ! <p>With changing ActionForm scope to session, it is possible to initialize form bean only once, and to reuse data between requests. This is convenient for form resubmissions, for page reloading or for navigating back to previous resource. Having all resource data in a single ActionForm simplifies JSP page. Struts automatically populates ActionForm ! with submitted data on input phase, the same data can be used for presentation on render phase ! without additional efforts.</p> ! ! <p>Session scope justifies the usage of nested properties within ActionForm. It is easy and ! convenient to use business objects or DTOs as nested properties instead of copying their ! data to ActionForm and from ActionForm.</p> </section> |