[cvs] expresso/expresso-web/expresso/doc usersguide.html

JCorporate Ltd jcorp at jcorp2.servlets.net
Sat May 8 22:04:10 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/expresso/doc
In directory jcorp2.servlets.net:/tmp/cvs-serv16742/expresso-web/expresso/doc

Modified Files:
	usersguide.html 
Log Message:
now uses css 


Index: usersguide.html
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/expresso/doc/usersguide.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** usersguide.html	16 Mar 2004 07:13:46 -0000	1.17
--- usersguide.html	9 May 2004 05:04:08 -0000	1.18
***************
*** 2,6 ****
  <HTML>
  <HEAD>
- <META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.2 for Windows">
  <META http-equiv="Content-Style-Type" content="text/css">
  <BASE target="main">
--- 2,5 ----
***************
*** 10,457 ****
  <META name="Description" content="Expresso Architectural Framework Users Guide">
  <META name="KeyWords" content="Expresso Application Framework, Users Guide">
  </HEAD>
! <BODY vlink="#0000FF" alink="#000000" bgcolor="#FFFFFF" text="#000000" link="#0000FF">
  <DIV align="left">
! <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
!   <TBODY>
!     <TR>
!       <TD>
!       <H2 align="center"><FONT face="Arial, Helvetica, Verdana"><A name="Top">Expresso Users Guide</A></FONT></H2>
!       <H4><FONT face="Arial, Helvetica, Verdana">Developing a web application entirely from scratch can be a massive overkill.
!       There just isn�t enough time/money in the world to reinvent the wheel every
!       time for each web application. It is better to leverage an open-sourced
!       framework and toolkit, like the Expresso because it has far more virtual
!       Internet resources to help debug and maintain it - thus more robust, productive,
!       and efficient than �going it alone�. Expresso is maintained and supported
!       by many developers and users - in fact the largest framework community
!       globally. There is the standard open source argument that OS projects are
!       better because there are many people working on it.</FONT></H4>
!       <H4><FONT face="Arial, Helvetica, Verdana">Most people who develop the next generation of web software prefer to build
!       on something that already works out of the box. So now that you have completed
!       the installation process, this document describes the Getting Started process
!       for Expresso. Many thanks to Geeta Ramani for her ideas to this resource
!       document. </FONT></H4>
!       <TABLE border="0" width="100%">
!         <TBODY>
!           <TR>
!             <TD valign="top">
!             <H4><FONT face="Arial, Helvetica, Verdana"><B>Version:</B></FONT></H4>
!             </TD>
!             <TD valign="top">
!             <P><FONT face="Arial, Helvetica, Verdana">Expresso 5.0</FONT></P>
!             </TD>
!             <TD valign="top">
!             <H4> <FONT face="Arial, Helvetica, Verdana"><B>Author:</B></FONT></H4>
!             </TD>
!             <TD valign="top">
!             <P><FONT face="Arial, Helvetica, Verdana"><A href="mailto:scann at jcorporate.com?Subject=Expresso Users Guide documentation">Sandra Cann</A>, </FONT><A href="mailto:geeta.ramani at cmpco.com?Subject=Expresso Users Guide Documentation"><FONT face="Arial, Helvetica, Verdana">Geeta Ramani</FONT></A></P>
!             </TD>
!           </TR>
!         </TBODY>
!       </TABLE>
!       <H3><A name="Introduction"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Introduction</FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Many clever developers realized that JavaServer Pages *and* servlets could
!       be used <B>together</B> to deploy web applications which became known as Model 2. It is now commonplace to use the terms Model 
!         2 and MVC (Model-View-Controller) interchangeably. The servlets help with the control-flow, and the JSPs focus on the 
!     business of writing HTML. With the release of 4.0, Expresso is now integrated with Struts, which provides a standard MVC 
! framework to the Java community. For an introduction to Struts please read the 
! <A href="http://jakarta.apache.org/struts/userGuide/index.html" target="_blank">Struts Users Guide</A>. <BR>
!       <BR>
!       The ready-made web application is on the horizon, where you as a software
!       developer, professional or otherwise, will look in distaste if you had
!       to code your own security, database persistence layers, session management,
!       controller, actions, input and output, validation, and user profiling entirely
!       from scratch.
!       Many users are thrilled to find Expresso because
!       of all the complexities and tedium it solves, and because of its rapid
!       development capabilities. But the next question is finding the way out
!       from the basic starting point. This document describes the process of taking that next step with Expresso. <BR>
!       <BR>
!       By now it is recommended that you have read the <A href="http://www.jcorporate.com/expresso/doc/prereq.html">Expresso Pre-requisites</A> and started the <A href="http://www.jcorporate.com/expresso/doc/expressocomplete.html">installation</A>.  There are no &quot;post-install&quot; steps to Expresso other than connecting
!       to an alternate database or beginning development.  <BR>
!       <BR>
!       Topics we will cover include the following:</FONT></P>
!       <UL>
!         <LI><A href="#What is a Framework?"><FONT face="Arial, Helvetica, Verdana" size="2">What is a Framework?</FONT></A>
!         <LI><A href="#What Can I do with Expresso?"><FONT face="Arial, Helvetica, Verdana" size="2">What Can I do with the Expresso Framework?</FONT></A>
!         <LI><A href="#Getting Started User Questions"><FONT face="Arial, Helvetica, Verdana" size="2">Getting Started User Questions</FONT></A>
!         <LI><A href="#Where is the Root of My Application Supposed to Be?"><FONT face="Arial, Helvetica, Verdana" size="2">Where is the Root of My Application Supposed to Be?</FONT></A>
!         <LI><A href="#Best Practice with the Expresso Framework"><FONT face="Arial, Helvetica, Verdana" size="2">Best Practice with Expresso Framework</FONT></A>
!         <LI><A href="#DBMaint: A Step by Step How to Example"><FONT face="Arial, Helvetica, Verdana" size="2">DBMaint: A Step by Step How to Example</FONT></A>
!         <LI><A href="#Sample Applications"><FONT face="Arial, Helvetica, Verdana" size="2">Sample Applications</FONT></A>
!         <LI><A href="#Developing Applications with Expresso"><FONT face="Arial, Helvetica, Verdana" size="2">Developing Applications with Expresso</FONT></A>
!         <LI><A href="#Setting up Different Database and/or Servlet Engine"><FONT face="Arial, Helvetica, Verdana" size="2">Setting up Different Database and/or Servlet Engine</FONT></A>
!         <LI><A href="#Using an IDE"><FONT color="#0000FF" face="Arial, Helvetica, Verdana" size="2">Using an IDE</FONT></A>
!         <LI><A href="#Troubleshooting Resources"><FONT face="Arial, Helvetica, Verdana" size="2">Troubleshooting Resources</FONT></A>
!       </UL>
!       <H3><A name="What is a Framework?"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">What is a Framework?</FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size=2><FONT face="Arial, Helvetica, Verdana" size="2">
!         A framework is a set of prefabricated software building blocks that programmers can use, extend, or customize to suit 
!         their application. With frameworks. developers don't have to start from scratch each time they build an application:
!         both tile design and the code of a framework may be reused. A Java web development framework is a collection of tools 
!         and API's that enhance Sun's standard Java APIs by providing:</FONT>
!       </FONT>
!       
!       <UL>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Structure to web development</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Generic services that are needed on most
!         projects (logging, persistence, etc...)</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Tools and methods that simplify and accelerate
!         web development.</FONT>
!       </UL>
!       <P><FONT face="Arial, Helvetica, Verdana" size=2>Frameworks capture the programming expertise and best practices necessary
!       to solve a particular class of problems and make them pervasive. In this case, it is the web centric,
!       multi-tiered, enterprise environment that the Expresso application framework
!       addresses. Programmers purchase or reuse frameworks to obtain such problem
!       solving expertise without having to reinvent the wheel. </FONT></P>
!       <H3><A name="What Can I do with Expresso?"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">What Can I do with the Expresso Framework?</FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Based on feedback from some newbies, the main question a newbie asks is:
!       &quot;what can i do with Expresso&quot;? And many newbies say that though
!       Expresso seems to be a *wonderful* application, the amount of stuff is
!       certainly overwhelming. So we're going to try to make it a little easier.</FONT><BR>
!       <BR>
!       <FONT face="Arial, Helvetica, Verdana" size="2">Expresso is a good, powerful, flexible framework which
!       provides a number of services that assist in building web applications.
!       The major areas that these services are used are:</FONT></P>
        <UL>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides Application Organization and Configuration</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides Database access and Database Objects toolkit</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Support MVC Architecture and provides package of components for creating
!         several types of &quot;Controller&quot; objects</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides Job Queueing/Handling</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides a means for easily and quickly creating useful servlets and JSP
!         pages</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides a mechanism for defining &quot;events&quot; that occur within the
!         web application.</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">Provides a number of other userful utilities.</FONT>
        </UL>
-       <H3><A name="Getting Started User Questions"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Getting Started User Questions</FONT></A></H3>
-       <P><FONT face="Arial, Helvetica, Verdana" size="2">Before tackling the Expresso Developers Guide (EDG) as a reference document,
-       here are some questions/answers and reference material as suggested by
-       some newbies getting started withe Expresso:<BR>
-       </FONT></P>
-       <OL>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Why would I choose Expresso over developing my own framework?</B>
-         <BR>
-         Expresso is maintained and supported by many developers and users. Thus the standard open source argument  certainly holds:
-         OS projects are better than homegrown because there are many people working on it and
-         using it in a huge diversity of environments. Thus Expresso evolves and reflects
-         the huge real world experiences of its users. Further, since Expresso is open source,
-         code can be modified to fit individual needs. Although, a better/easier approach
-         would be to extend the framework which, happily, is pretty easy. Moreover, many developers
-         are already familiar with Expresso and/or Struts so new team members may
-         not need training as in a proprietary framework. Struts and Expresso are
-         becoming so popular that it's darn near a standard in Java web development.
-         </FONT><BR>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>What does a person need to know about Struts before (s)he works with Expresso?</b>
-         <br>
-         It would probably be wishful thinking to assume that you could pick up Struts along the way as you catch up with Expresso.
-         Struts is a wonderful and powerful framework in its own right, and well worth study. The good news is that since Expresso
-         is now tightly integrated with Struts, learning Struts is a good first step to learning Expresso. Further,
-         Struts has a gentle learning curve, is <A href="http://jakarta.apache.org/struts/userGuide/index.html" target="_blank">well documented</a>, and has an active and friendly list serve.
-         </FONT>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>What does Struts do for Expresso?</B>
-         <BR>
-         Struts is open source framework which implements a Model 2, JSP web application
-         architecture for building web applications in Java Servlets
-         and JavaServer Pages. This approach is characterised by using a Servlet as a command
-         request dispatcher. Further, Struts unifies Java Beans and JSPs through the using
-         custom action tag libraries. It is particularly strong in coupling business
-         logic and views without excessive cohesion. There is a clear separation
-         of business logic and presentation with the library if the edicts are followed.
-         The rich custom action tag libraries, use of XML technology, and for some
-         people whose natural language is not English, built-in in support for internationalisation,
-         means that Struts is clear popular winner across the world.</FONT> Please refer to the <A href="http://www.jcorporate.com/expresso/doc/struts.html">Struts_Integration</A> document for more information, as well as the diagram of the <A href="http://www.jcorporate.com/expresso/doc/struts1.pdf">Struts /Controller execution in Expresso</A> for a graphical representation.<BR>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>What is the difference between Tomcat, JBoss and Expresso?</B>
-         <BR>
-         Tomcat is a servlet/JSP container, and JBoss is an EJB container. Thus, Tomcat doesn't know what to do with EJBs as JBoss doesn't know
-         what to do with servlets and JSPs. Moreover, there is a JBoss bundle that
-         comes with Tomcat set up to run with it. JBoss is not an alternative to
-         Expresso either, but, again, they can work together if you really need
-         EJBs. Otherwise, Expresso's DBObjects and controllers can make the deal.</FONT>.<BR>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>How loosely coupled are the services/components in the Expresso Framework</b></FONT>
-         The question can be rephrased as folows: If you have already developed internally some framework 
-         you'd like to continue using, could you still supplement with Expresso services?
-         <LI><BR>
-         <FONT color="#000000"><FONT face="Arial, Helvetica, Verdana">About the only parts of Expresso you can't get away from are:</FONT></FONT>
-         <UL>
-           <li><FONT color="#000000"><FONT face="Arial, Helvetica, Verdana" size="2">DBObjects and Derivatives</font></FONT></li>
-           <li><FONT color="#000000"><FONT face="Arial, Helvetica, Verdana" size="2">Expresso Configuration,</font></FONT></li>
-           <li><FONT color="#000000"><FONT face="Arial, Helvetica, Verdana" size="2">and Expresso Logging system.</font></FONT></li>
-         </UL>
-         <FONT color="#000000"><FONT face="Arial, Helvetica, Verdana" size="2"><FONT color="#000000"><BR>
-         Without these, pretty much none of the services will work. After that you
-         can start picking and choosing... for example, we talked to a guy on the
-         Struts list one time that JUST used DBObjects and skipped the whole controller
-         stuff, and was just using Struts for the controller. I've found for myself
-         that it was easier extending 4.0 to do things just the way I wanted it
-         rather than building my own custom services from scratch and then using
-         Expresso for the other things.</FONT></FONT><BR>
-         <BR>
-         </FONT>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Where is the &quot;servlet stuff&quot; hidden?</B><BR>
-         Most of us are used to dealing with servlets and so on but Expresso treats
-         even HttpRequest/HttpResponse objects are too &quot;core&quot; for an app
-         writer to have to deal with and so are hidden from view. An explanation
-         of how this is achieved in Expresso as well (as how an app writer should
-         infact take advantage of this) would be great. Does anyone have any tips on how to debug Expresso apps and what tools
-         are used to do this?</FONT><BR>
-         <LI><B><FONT face="Arial, Helvetica, Verdana" size="2">Is there an Expresso &quot;tutorial&quot;?</FONT></B><BR>
-         <FONT face="Arial, Helvetica, Verdana" size="2">Check out the <A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=807" target="_blank">Location Example</A> and the <A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=808" target="_blank">Contacts Example</A>. The latter example is also used by the How To document and may be referenced
-         throughout other documentation as the reference for learning.</FONT><BR>
-         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Does anyone have any tips on how to debug Expresso apps and what tools
-         are used to do this?</B><BR>
-         You can use Expresso's own log4j implementation, which is documented on
-         the site. It is quite easy to use, and can be
-         turned on and off in each area, with ease. It has been a very powerful
-         approach for many users. You can use your IDE too. For example the setup for use Forte's
-         IDE with standard breakpoints is documented in detail at <a href="http://Expresso.badfw.org/">http://Expresso.badfw.org/</a>.
-         IBM's VisualAge for Java also works very well, which in addition to the interactive
-         debugger, has the advantage of incremental compilation making the debug, edit, test
-         cycle very quick. You could also use the JUnit implementation within Expresso to
-         utilize standardized testing regimens. You will find many such tests sprinkled
-         throughout the Expresso class structure. IDE specific notes can alsobe found in the main 
-         <a href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default">Documentation page</a>.</FONT>
-       </OL>
-       <H3><A name="Where is the Root of My Application Supposed to Be?"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Where is the Root of My Application Supposed to Be?</FONT></A></H3>
-       <P><FONT face="Arial, Helvetica, Verdana" size="2">Based on feedback from Newbies, another prominent question is: &quot;Where
-       is the root of My applications supposed to be&quot;? So we want to give
-       an explanation of the suggested directory structure.</FONT> <FONT face="Arial, Helvetica, Verdana" size="2">First you might want to review the <A href="http://www.jcorporate.com/expresso/doc/expressoMap.html">package and file organization</A> of Expresso. All Expresso apps fall under the same context as Expresso
-       (so the apps can use Expresso's classes).<BR>
        <BR>
!       First, a brief review of the notion of &quot;contexts&quot; in your servlet/JSP
!       container.</FONT></P>
!       <H4><FONT face="Arial, Helvetica, Verdana">Contexts</FONT></H4>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Your JSP container (for the sake of simplicity let say it is TOMCAT), defines
!       a directory for web applications as it needs to know about all the contexts
!       you have defined. This is because, when Tomcat receives a request to serve
!       a web page, it checks the &quot;context&quot; of the request URI. For example,
!       if the URI is http://www.mycompany.com/myapp/index.jsp, then the &quot;context&quot;
!       is &quot;myapp&quot;, and so it looks for the &quot;myapp&quot; context.</FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Contexts are defined in two ways: either explicitly via a definition in the 
! container's "server.xml" or due to the presence of subdirectories within a 
! special subdirectory called "webapps" present in the root of $TOMCAT_HOME: 
! $TOMCAT_HOME/webapps. For example, the "default web app" is the one stored in 
! the "ROOT" subdirectory, and is accessed via the URI 
! "http://www.mycompany.com/". Standalone Tomcat installations usually create this 
! default context/subdirectory as well as an "examples" context/subdirectory. 
! </FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">In particular, Tomcat can run multiple web applications because each web 
! application which is a subdirectory under the "webapps" directories defines a 
! distinct context (and can be accessed via a distinct URI). 
! </FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Expresso Framework is one web application when it is properly installed:
!       there is a subdirectory called &quot;Expresso&quot; in &quot;webapps&quot;:
!       $TOMCAT_HOME/webapps/Expresso. Thus the URI &quot;http://www.mycompany.com/Expresso&quot;
!       can be considered the front page for web application, Expresso.</FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">In keeping with this &quot;usual&quot; scenario, earlier versions of Expresso
!       Framework created an &quot;Expresso&quot; context/subdirectory, and stored
!       its root &quot;frame.jsp&quot; page in the this context (eg. in $TOMCAT_HOME/webapps/Expresso/frame.jsp
!       for Unix) which translates to a URI of &quot;http://www.mycompany.com/Expresso/frame.jsp&quot;.
!       However, in later versions, the root frame page was moved to a directory
!       further down - into another subdirectory, also called &quot;Expresso&quot;:
!       So for example, for Unix systems, this is in $TOMCAT_HOME/webapps/Expresso/Expresso/frame.jsp,
!       accessible via an URI: http://www.mycompany.com/Expresso/Expresso/frame.jsp</FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Due to this change, you can now insert your own customised welcome page
!       (accessed via &quot;http://www.mycompany.com/Expresso/frame.jsp&quot; and
!       stored in $TOMCAT_HOME/webapps/Expresso/frame.jsp for Unix) while the Expresso
!       pages, which may in fact be thought of as the &quot;Administration&quot;
!       directory no longer &quot;takes over&quot; your site.</FONT>
!       
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Next, we move to the question of where to put your own web apps. Since
!       each JSP container allocates a unique class loader for each context, there
!       are two possible ways of incorporating the Expresso Framework with your
!       preexisting applications. We describe them both below:</FONT>
!       
!       <OL>
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">Install the Expresso Framework for <B>each</B> of your web applications in 
! separate contexts. For example, if you have three web applications, alpha, beta, 
! and gamma, you could have the following set up, with three separate 
! installations of the Expresso Framework:
! </FONT>
!         <UL>
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">[( Class loader for "alpha" created/defined as 
! follows:]<BR>webapps/alpha<BR>
!           webapps/alpha/Expresso/</FONT> 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">[( Class loader for "beta" created/defined as 
! follows:]<BR>webapps/beta<BR>
!           webapps/beta/Expresso/</FONT> 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">[( Class loader for "gamma created/defined as 
! follows:]<BR>webapps/gamma<BR>
!           webapps/gamma/Expresso/</FONT></LI>
!         </UL>
! 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">On the other hand, you can have more than one application with in the
!         Expresso framework. It is just a matter
!         of organising the directory structures. The way to achieve this is to install just one instance
!         of the Expresso Framework . Divide and reorganise the context to whatever
!         you feel your architecture requires so all your applications (or more properly
!         &quot;sub-applications&quot;) belong to the *same* context as does &quot;Expresso&quot;.
!         For example, you could have the following subdirectories:</FONT>
!         <UL>
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">webapps/Expresso/Expresso</FONT> 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">webapps/Expresso/alpha</FONT> 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">webapps/Expresso/beta</FONT> 
! <LI><FONT face="Arial, Helvetica, Verdana" size="2">webapps/Expresso/gamma</FONT></LI>
!         </UL>
!         </LI>
!       </OL>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Each approach has its advantages and disadvantages. <FONT face="Arial, Helvetica, Verdana" size="2">The individual requirements of your applications should dictate which 
! approach you take. </FONT></FONT></P>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">In the first case, you will have three separate &amp; different installations 
! of the Expresso Framework! However, the three web applications will belong to 
! three distinct contexts and therfore are completely independent (and ignorant ) 
! of each other. In particular, they can never share any application code or 
! sessions etc. 
! </FONT> <FONT face="Arial, Helvetica, Verdana" size="2">When you publicize your web application on the Internet you probably dont
!       want to broadcast that Expresso is being used until you have secured the
!       application. You can rename the `Expresso' sub directory to the `Expresso235'
!       and then change the set up value `%Expresso%' in the database. So can secure
!       the admin site of your site. Lastly you should leave the java classes in `%context%/WEB-INF/classes'
!       because Java has packages and readily support namespaces. Just call them
!       different eg. `com.acme.work.webapp.*' and it won't interference with Expresso's
!       `com.jcorporate.*'.<BR>
!       Put your custom tag library descriptors in `WEB-INF/tlds' and your libraries jar files in `WEB-INF/lib'. See the spec at </FONT><A href="http://java.sun.com/products/jsp/" target="_blank"><FONT face="Arial, Helvetica, Verdana" size="2">http://java.sun.com/products/jsp/</FONT></A>.
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">On the other hand, in the second case, all three of your sub-applications 
! share the same context and can therfore share sessions, code, state, database 
! pooling etc. For example, in the example above, sub-application beta can 
! seamlessly switch over to sub-application gamma. Further, session data stored by 
! sub-application beta can be picked up by sub-application gamma. 
! </FONT> <FONT face="Arial, Helvetica, Verdana" size="2"><BR>
!       <BR>
!       The JSP Container (Tomcat) can run multiple web applications because each
!       one is a subdirectory under the 'webapps' directories. With standalone Tomcat
!       there is at least two delivered out of the box 'ROOT' and 'examples'. The
!       ROOT subdirectory is special because that is the default web applicationthat
!       you see when you type in 'http://localhost:8080/' on your web browser.
!       The 'examples' subdirectory is another web application with example
!       servlets and JSPs. The java classes for each web application are loaded
!       with its own class loader so that they don't interfere with one another.
!       <BR>
!       </FONT></P>
!       <H3><A name="Best Practice with the Expresso Framework"><FONT color="#0000FF" face="Arial, Helvetica, Verdana"><B>Best Practice with the Expresso Framework</B></FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">
!       Please review the &quot;<A href="http://www.theserverside.com/resources/article.jsp?l=Expresso" target="_blank">Best Practice with Expresso Framework: Using a framework to create a web
!       application</A>&quot; written by Peter Pilgrim, who is currently working for Deutsche
!       Bank (UK) AG OTC Derivatives IT . Expresso Framework is a large toolkit
!       of classes. Getting started can be overwhelming because there are so many
!       classes [well over 200] to look at. This document directs a newbie's focus
!       to the &quot;important&quot; classes so that is really helpful. The document
!       also divides the framework classes into four types and discusses the roles
!       of each of these types of classes:</FONT></P>
!       <UL>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">schemas </FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">database object persistence</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">controller design</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2">and the rest of the kit, which involves job control, utilities, et</FONT>c
!       </UL>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">It is essential that you understand the first three parts. Expresso Framework
!       is also very much database-driven. That is, you will need to use a reliable,
!       scalable relational database to make full use of the kit. Mysql, Sybase,
!       Oracle, DB2, and Postgres are all suitable candidates. The document demosnstrates best practices by describing a simple 
!       stock trading program that displays
!       stocks trades, and allows the user to buy and sell stocks.
!       Hopefully, you can take this �best of� practice, using a framework, custom
!       tag action libraries, JSP�s, and Servlets, elsewhere and make it a success
!       in your web applications. </FONT><FONT face="Arial, Helvetica, Verdana"><FONT size="2"><BR>
        <BR>
!       </FONT></FONT></P>
!       <H3><A name="Sample Applications"><FONT color="#0000FF" face="Arial, Helvetica, Verdana"><B>Example 5.0 Applications</B></FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2"><FONT face="Arial, Helvetica, Verdana" size="2">To make it easier to get rolling with Expresso, <B>"Example" applications</B> are now included with the 4.0 release with Example documentation explaining
!       how to access the demo applications and how to use them as a basis for
!       developing your own applications with Expresso. You might begin with a
!       sample application such as:</FONT></FONT></P>
        <UL>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=807" target="_blank"><FONT face="Arial, Helvetica, Verdana" size="2">Location Example</FONT></A></FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=808" target="_blank">Contacts Example</A></FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><A href="http://www.xenonsoft.demon.co.uk/products/java.html" target="_blank"><FONT face="Arial, Helvetica, Verdana" size="2">Orange Trader Example Web Application</FONT></A> <FONT face="Arial, Helvetica, Verdana" size="2">and <A href="http://www.theserverside.com/resources/article.jsp?l=Expresso-Struts" target="_blank">related article</A>.</FONT></FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><A href="http://datafundamentals.com/appwriter/docs/samples.html" target="_blank"><FONT face="Arial, Helvetica, Verdana" size="2">Datafundamentals Examples</FONT></A></FONT>
        </UL>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">
!       <FONT face="Arial, Helvetica, Verdana" size="2">There is a Contacts example download available (which was written for 4.0
!       and updated for 5.0) under the Expresso Examples Project. Also under the
!       Examples project there is also an effort community underway onsite to develop
!       an <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&db=default&resource=767" target="_blank">Expresso J2EE Pet Shop example</A> application. This example will illustrate Sun's Java BluePrints guidelines
!       and patterns implemented using the Expresso Framework. This sample application, when completed,
!       will show how to use the capabilities of the J2EE 1.3 platform to develop
!       flexible, scalable, cross-platform enterprise applications based on the
!       Expresso Framework.</FONT>
!       </FONT></P>
!       <H3><A name="DBMaint: A Step by Step How to Example"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">
!        <B>DBMaint: A Step by Step How to Example</B></FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana"><FONT size="2">
!     Please review the &quot;<A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=635">DBMaint: A Step-by-Step Example</A>&quot; written by Geeta Ramani. 
!         This is an exercise which can be completed by
!       a newbie fairly easily and I think there's always something to be said
!       about actually getting something to work! It illustrates the writing of
!       a simple application which allows maintenance of a customer database, complete
!       with security. The application can be used as a beginning
!       for a more sophisticated sales tracking application. Also, the author follows
!       the directory structure which is discussed in this document, so that will
!       help.</FONT></FONT></P>
!       <H3><A name="Developing Applications with Expresso"><FONT color="#0000FF" face="Arial, Helvetica, Verdana"><B>Developing Applications with Expresso</B></FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Here are some commonly asked questions about next steps and where to do
!       from here:<BR>
!       <BR>
!       The next step after installing Expresso is to <A href="http://www.jcorporate.com/expresso/doc/installapp.html" target="_blank">install other applications</A>, such as eForum or begin development. Here are some references for beginning
!       to develop your own application:</FONT></P>
        <UL>
!         <LI><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=552" target="_blank"><FONT face="Arial, Helvetica, Verdana" size="2">Expresso Developer's Guide</FONT></A>
        </UL>
!       <P>
!       <FONT face="Arial, Helvetica, Verdana" size="2">If you get a bug that has you hung up, it will likely get fixed very quickly
!       with the community collaboration in which case you will want to download
!       the daily -dev download.</FONT><BR>
!       </P>
!       <H3><A name="Setting up Different Database and/or Servlet Engine"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Setting up Different Database and/or Servlet Engine</FONT></A></H3>
!       <P class=prText><FONT face="Arial, Helvetica, Verdana" size="2">There are different database and Servlet engine specific installation notes
!       onsite under the Documentation link. </FONT>
!       
!       <H3><A name="Using an IDE"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Using an IDE</FONT></A></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">Expresso can be used with any of the IDEs on the market. <FONT face="Arial, Helvetica, Verdana" size="2">There are notes onsite for specific IDEs under the &quot; IDE-specific
!       Installation Notes&quot; section of the Expresso Documentation.</FONT><BR>
!       </FONT>
!       
!       <H3><FONT face="Arial, Helvetica, Verdana"><A name="Troubleshooting Resources"><FONT color="#0000FF" face="Arial, Helvetica, Verdana">Troubleshooting Resources</FONT></A></FONT></H3>
!       <P><FONT face="Arial, Helvetica, Verdana" size="2">If you get stuck along the way there are a number of resources available
!       to help you:</FONT></P>
!       <OL>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>FAQ</B></FONT><BR>
!         <FONT face="Arial, Helvetica, Verdana" size="2">A good starting place for getting questions answered is found on the <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default" target="_blank">Expresso project page</A>, choose the FAQ link in the left column.</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Opensource Listserv and its archives</B><BR>
!         We recommend that you <A href="http://mailman.jcorporate.com/pipermail/opensource/" target="_blank">view its recent archives</A> for answers to your questions. You can also post your question with the
!         community of Expresso developers on the opensource listserv. When you registered
!         you may have selected to join the listserv at that time. You can post to
!         the listserv by sending a message to : <A href="mailto:opensource at jcorporate.com?Subject=Troubleshooting question....">opensource at jcorporate.com</A>. This is a tremendous community resource as there are several thousand
!         members on this listserv. If you are not already a member you can <A href="http://mailman.jcorporate.com/mailman/listinfo/opensource" target="_blank">join the listserv</A>.</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Expresso Forums</B><BR>You can find them on the <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default" target="_blank">Expresso project page</A>, 
!         choose the Forums link in the top menu bar. There are users and developer
!         forums available to post your questions and suggestions. By using the community
!         process your question is freely answered and also benefits other community
!         members who may have the same question. Forums are available to registered
!         users.</FONT>
!         <LI><FONT face="Arial, Helvetica, Verdana" size="2"><B>Premium Support</B><BR>
!         Many corporations have tight project constraints and wish the security of
!         guaranteed prompt responses beyond that of the community resources and/or
!         dedicated support personnel - so we encourage these companies to purchase
!         Premium Support for Expresso or any of our other products: please email
!         us at <A href="mailto:sales at jcorporate.com?Subject=Premium Support">sales at jcorporate.com</A>.</FONT>
!       </OL>
!       <H3><A name="Conclusion"><FONT face="Arial, Helvetica, Verdana" color="#0000ff"><FONT face="Arial, Helvetica, Verdana">Conclusion</FONT></FONT></A></H3>
!       <P><FONT size="2" face="Arial, Helvetica, Verdana">Please send your comments on the usefulness of this document and suggestions for improvement to <A href="mailto:support at jcorporate.com?Subject=Users Guide Documentation">support at jcorporate.com</A> or to the authors of the document.</FONT><BR>
!       </P>
!       </TD>
!     </TR>
!   </TBODY>
! </TABLE>
  </DIV>
- <P><FONT color="#666666" size="2" face="Arial, Helvetica, Verdana"><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"><FONT size="2" face="Arial, Helvetica, Verdana" color="#000000"><FONT color="#000000">Copyright � 2001-2002</FONT> <A href="http://www.jcorporate.com/" target="_blank">Jcorporate Ltd</A>. All rights reserved.</FONT><FONT size="2" face="Arial, Helvetica, Verdana"><FONT color="#ffcc33"> <A href="http://www.jcorporate.com/html/aboutus/copyright.htm">Copyright</A> <A href="http://www.jcorporate.com/html/aboutus/privacy.htm">Privacy</A></FONT></FONT></FONT></FONT><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"><FONT size="2" face="Arial, Helvetica, Verdana"><FONT color="#ffcc33"><A href="http://www.jcorporate.com/html/aboutus/privacy.htm"><BR>
- </A></FONT></FONT><FONT face="Arial, Helvetica, Verdana" color="#666666" size="1"><BR>
- Last Modified: 08-Oct-02 11:25:39 AM</FONT></FONT></FONT></P>
  </BODY>
  </HTML>
--- 9,452 ----
  <META name="Description" content="Expresso Architectural Framework Users Guide">
  <META name="KeyWords" content="Expresso Application Framework, Users Guide">
+ <link href="/style/default.css" rel="stylesheet" type="text/css">
  </HEAD>
! <BODY vlink="#0000FF" alink="#000000" bgcolor="#FFFFFF" text="#000000" link="#0000FF" class="jc-default">
  <DIV align="left">
!   <h1 align="center"><A name="Top"></A>Expresso
!     Users Guide</h1>
!   <p><span class="jc-explanation">Developing
!       a web application entirely from scratch can be a massive overkill. There
!       just isn't enough time/money in the world to reinvent the wheel every time
!       for each web application. It is better to leverage an open-sourced framework
!       and toolkit, like the Expresso because it has far more virtual Internet
!       resources to help debug and maintain it - thus more robust, productive,
!       and efficient than 'going it alone'. </span></p>
!   <p><span class="jc-explanation">Expresso
!       is maintained and supported by many developers and users - in fact the
!       largest framework community
!         globally. There is the standard open source argument that OS projects
!       are better because there are many people working on it.Most people who
!       develop
!         the next generation of web software prefer to build on something that
!       already works out of the box. So now that you have completed the installation
!       process,
!         this document describes the Getting Started process for Expresso. Many
!         thanks to Geeta Ramani for her ideas to this resource document. </span> </p>
!   <TABLE border="0" width="100%">
!     <TBODY>
!       <TR>
!         <TD valign="top">
!           <H4>Version:</H4>
!         </TD>
!         <TD valign="top">
!           <P>Expresso 5.0</P>
!         </TD>
!         <TD valign="top">
!           <H4>Maintainers:</H4>
!         </TD>
!         <TD valign="top">
!           <P><A href="mailto:scann at jcorporate.com?Subject=Expresso Users Guide documentation">Sandra
!               Cann</A>, <A href="mailto:geeta.ramani at cmpco.com?Subject=Expresso Users Guide Documentation">Geeta Ramani</A></P>
!         </TD>
!       </TR>
!     </TBODY>
!   </TABLE>
!   <h2><A name="Introduction"></A>Introduction</h2>
!   <P>Many clever developers realized that JavaServer Pages *and* servlets
!     could be used <B>together</B> to deploy web applications which became known as Model 2. It is now commonplace
!     to use the terms Model 2 and MVC (Model-View-Controller) interchangeably.
!     The servlets help with the control-flow, and the JSPs focus on the business
!     of writing HTML. With the release of 4.0, Expresso is now integrated with
!     Struts, which provides a standard MVC framework to the Java community. For
!     an introduction to Struts please read the <A href="http://jakarta.apache.org/struts/userGuide/index.html" target="_blank">Struts Users Guide</A>. <BR>
!     <BR>
!     The ready-made web application is on the horizon, where you as a software
!     developer, professional or otherwise, will look in distaste if you had to
!     code your own security, database persistence layers, session management,
!     controller, actions, input and output, validation, and user profiling entirely
!     from scratch. Many users are thrilled to find Expresso because of all the
!     complexities and tedium it solves, and because of its rapid development capabilities.
!     But the next question is finding the way out from the basic starting point.
!     This document describes the process of taking that next step with Expresso. <BR>
!     <BR>
!     By now it is recommended that you have read the <A href="http://www.jcorporate.com/expresso/doc/prereq.html">Expresso
!     Pre-requisites</A> and started the <A href="http://www.jcorporate.com/expresso/doc/expressocomplete.html">installation</A>. There are no &quot;post-install&quot; steps to Expresso other than connecting to an alternate database or beginning
!     development. <BR>
!     <BR>
!     Topics we will cover include the following:</P>
!   <UL>
!     <LI><A href="#What is a Framework?">What
!         is a Framework?</A>
!     <LI><A href="#What Can I do with Expresso?">What
!         Can I do with the Expresso Framework?</A>
!     <LI><A href="#Getting Started User Questions">Getting
!         Started User Questions</A>
!     <LI><A href="#Where is the Root of My Application Supposed to Be?">Where
!         is the Root of My Application Supposed to Be?</A>
!     <LI><A href="#Best Practice with the Expresso Framework">Best
!         Practice with Expresso Framework</A>
!     <LI><A href="#DBMaint: A Step by Step How to Example">DBMaint:
!         A Step by Step How to Example</A>
!     <LI><A href="#Sample Applications">Sample
!         Applications</A>
!     <LI><A href="#Developing Applications with Expresso">Developing
!         Applications with Expresso</A>
!     <LI><A href="#Setting up Different Database and/or Servlet Engine">Setting
!         up Different Database and/or Servlet Engine</A>
!     <LI><A href="#Using an IDE">Using an IDE</A>
!     <LI><A href="#Troubleshooting Resources">Troubleshooting
!         Resources</A>
!   </UL>
!   <h2><A name="What is a Framework?"></A>What
!     is a Framework?</h2>
!   <P> A framework is a set of prefabricated software building blocks that
!     programmers can use, extend, or customize to suit their application. With
!     frameworks. developers don't have to start from scratch each time they build
!     an application: both tile design and the code of a framework may be reused.
!     A Java web development framework is a collection of tools and API's that
!     enhance Sun's standard Java APIs by providing:
!   <UL>
!     <LI>Structure to web development
!     <LI>Generic services that are needed on most projects (logging, persistence, etc...)
!     <LI>Tools and methods that simplify and accelerate web development.
!   </UL>
!   <P>Frameworks capture the programming expertise and best practices necessary
!     to solve a particular class of problems and make them pervasive. In this
!     case, it is the web centric, multi-tiered, enterprise environment that the
!     Expresso application framework addresses. Programmers purchase or reuse frameworks
!     to obtain such problem solving expertise without having to reinvent the wheel. </P>
!   <h2><A name="What Can I do with Expresso?"></A>What
!     Can I do with the Expresso Framework?</h2>
!   <P>Based on feedback from some newbies, the main question a newbie asks
!     is: &quot;what can i do with Expresso&quot;? And many newbies say that though Expresso seems to be a *wonderful* application,
!     the amount of stuff is certainly overwhelming. So we're going to try to make
!     it a little easier.<BR>
!     <BR>
!     Expresso is a good, powerful, flexible framework which provides a number
!     of services that assist in building web applications. The major areas that
!     these services are used are:</P>
!   <UL>
!     <LI>Provides Application Organization and Configuration
!     <LI>Provides Database access and Database Objects toolkit
!     <LI>Support MVC Architecture and provides package of components for creating several
!       types of &quot;Controller&quot; objects
!     <LI>Provides Job Queueing/Handling
!     <LI>Provides a means for easily and quickly creating useful servlets and JSP pages
!     <LI>Provides a mechanism for defining &quot;events&quot; that occur within the web application.
!     <LI>Provides a number of other userful utilities.
!   </UL>
!   <h2><A name="Getting Started User Questions"></A>Getting
!     Started User Questions</h2>
!   <P>Before tackling the Expresso Developers Guide (EDG) as a reference
!     document, here are some questions/answers and reference material as suggested
!     by some newbies getting started withe Expresso:</P>
!   <OL>
!     <LI><B>Why would I choose Expresso over developing my own framework?</B> <BR>
!       Expresso is maintained and supported by many developers and users. Thus
!         the standard open source argument certainly holds: OS projects are better
!         than homegrown because there are many people working on it and using
!         it in a huge diversity of environments. Thus Expresso evolves and reflects
!         the huge real world experiences of its users. Further, since Expresso
!         is open source, code can be modified to fit individual needs. Although,
!         a better/easier approach would be to extend the framework which, happily,
!         is pretty easy. Moreover, many developers are already familiar with Expresso
!         and/or Struts so new team members may not need training as in a proprietary
!         framework. Struts and Expresso are becoming so popular that it's darn
!         near a standard in Java web development. <BR>
!     <LI><B>What does a person need to know about Struts before (s)he
!         works with Expresso?</b> <br>
!       It would probably be wishful thinking to assume that you could pick up
!       Struts along the way as you catch up with Expresso. Struts is a wonderful
!       and powerful framework in its own right, and well worth study. The good
!       news is that since Expresso is now tightly integrated with Struts, learning
!       Struts is a good first step to learning Expresso. Further, Struts has a
!       gentle learning curve, is <A href="http://jakarta.apache.org/struts/userGuide/index.html" target="_blank">well
!       documented</a>, and has an active and friendly list serve.
!     <LI><B>What does Struts do for Expresso?</B> <BR>
!       Struts is open source framework which implements a Model 2, JSP web application
!         architecture for building web applications in Java Servlets and JavaServer
!         Pages. This approach is characterised by using a Servlet as a command
!         request dispatcher. Further, Struts unifies Java Beans and JSPs through
!         the using custom action tag libraries. It is particularly strong in coupling
!         business logic and views without excessive cohesion. There is a clear
!         separation of business logic and presentation with the library if the
!         edicts are followed. The rich custom action tag libraries, use of XML
!         technology, and for some people whose natural language is not English,
!         built-in in support for internationalisation, means that Struts is clear
!         popular winner across the world. Please refer to the <A href="http://www.jcorporate.com/expresso/doc/struts.html">Struts_Integration</A> document
!         for more information, as well as the diagram of the <A href="http://www.jcorporate.com/expresso/doc/struts1.pdf">Struts /Controller execution in Expresso</A> for a graphical representation.<BR>
!     <LI><B>What is the difference between Tomcat, JBoss and Expresso?</B> <BR>
!       Tomcat is a servlet/JSP container, and JBoss is an EJB container. Thus,
!         Tomcat doesn't know what to do with EJBs as JBoss doesn't know what to
!         do with servlets and JSPs. Moreover, there is a JBoss bundle that comes
!         with Tomcat set up to run with it. JBoss is not an alternative to Expresso
!         either, but, again, they can work together if you really need EJBs. Otherwise,
!         Expresso's DBObjects and controllers can make the deal..<BR>
!     <LI><B>How loosely coupled are the services/components in the
!         Expresso Framework</b> The question can be rephrased as folows: If you have already developed internally
!         some framework you'd like to continue using, could you still supplement
!         with Expresso services?
!     <LI><BR>
!       About the only parts of Expresso you can't get away from are:
        <UL>
!         <li>DBObjects and Derivatives</li>
!         <li>Expresso Configuration,</li>
!         <li>and Expresso Logging system.</li>
        </UL>
        <BR>
!       Without these, pretty much none of the services will work. After that you
!       can start picking and choosing... for example, we talked to a guy on the
!       Struts list one time that JUST used DBObjects and skipped the whole controller
!       stuff, and was just using Struts for the controller. I've found for myself
!       that it was easier extending 4.0 to do things just the way I wanted it
!       rather than building my own custom services from scratch and then using
!       Expresso for the other things.<BR>
        <BR>
!     <LI><B>Where is the &quot;servlet stuff&quot; hidden?</B><BR>
!       Most of us are used to dealing with servlets and so on but Expresso treats
!         even HttpRequest/HttpResponse objects are too &quot;core&quot; for
!         an app writer to have to deal with and so are hidden from view. An explanation
!         of how this is achieved in Expresso as well (as how an app writer should
!         infact take advantage of this) would be great. Does anyone have any tips
!         on how to debug Expresso apps and what tools are used to do this?<BR>
!     <LI><B>Is there an Expresso &quot;tutorial&quot;?</B><BR>
!       Check out the <A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=807" target="_blank">Location
!       Example</A> and the <A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=808" target="_blank">Contacts Example</A>. The latter example is also used by the How To document and may be referenced
!       throughout other documentation as the reference for learning.<BR>
!     <LI><B>Does anyone have any tips on how to debug Expresso apps
!         and what tools are used to do this?</B><BR>
!       You can use Expresso's own log4j implementation, which is documented on
!       the site. It is quite easy to use, and can be turned on and off in each
!       area, with ease. It has been a very powerful approach for many users. You
!       can use your IDE too. For example the setup for use Forte's IDE with standard
!       breakpoints is documented in detail at <a href="http://Expresso.badfw.org/">http://Expresso.badfw.org/</a>.
!       IBM's VisualAge for Java also works very well, which in addition to the
!       interactive debugger, has the advantage of incremental compilation making
!       the debug, edit, test cycle very quick. You could also use the JUnit implementation
!       within Expresso to utilize standardized testing regimens. You will find
!       many such tests sprinkled throughout the Expresso class structure. IDE
!       specific notes can alsobe found in the main <a href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default">Documentation page</a>.
!   </OL>
!   <h2><A name="Where is the Root of My Application Supposed to Be?"></A>Where
!     is the Root of My Application Supposed to Be?</h2>
!   <P>Based on feedback from Newbies, another prominent question is: &quot;Where
!     is the root of My applications supposed to be&quot;? So we want to give an explanation of the suggested directory structure. First
!     you might want to review the <A href="http://www.jcorporate.com/expresso/doc/expressoMap.html">package and file organization</A> of Expresso. All Expresso apps fall under the same context as Expresso (so the
!     apps can use Expresso's classes).<BR>
!     <BR>
!     First, a brief review of the notion of &quot;contexts&quot; in
!     your servlet/JSP container.</P>
!   <h3>Contexts</h3>
!   <P>Your JSP container (for the sake of simplicity let say it is TOMCAT),
!     defines a directory for web applications as it needs to know about all the
!     contexts you have defined. This is because, when Tomcat receives a request
!     to serve a web page, it checks the &quot;context&quot; of the request URI. For example, if the URI is http://www.mycompany.com/myapp/index.jsp,
!     then the &quot;context&quot; is &quot;myapp&quot;, and so it looks for the &quot;myapp&quot; context.
!   <P>Contexts are defined in two ways: either explicitly via a definition in the container's "server.xml" or due to the presence of subdirectories within a special subdirectory called "webapps" present in the root of $TOMCAT_HOME: $TOMCAT_HOME/webapps. For example, the "default web app" is the one stored in the "ROOT" subdirectory, and is accessed via the URI "http://www.mycompany.com/". Standalone Tomcat installations usually create this default context/subdirectory
!     as well as an "examples" context/subdirectory.
!   <P>In particular, Tomcat can run multiple web applications because each web application
!     which is a subdirectory under the "webapps" directories defines a distinct context (and can be accessed via a distinct URI).
!   <P>Expresso Framework is one web application when it is properly installed: there
!     is a subdirectory called &quot;Expresso&quot; in &quot;webapps&quot;: $TOMCAT_HOME/webapps/Expresso. Thus the URI &quot;http://www.mycompany.com/Expresso&quot; can be considered the front page for web application, Expresso.
!   <P>In keeping with this &quot;usual&quot; scenario, earlier versions of Expresso Framework created an &quot;Expresso&quot; context/subdirectory, and stored its root &quot;frame.jsp&quot; page in the this context (eg. in $TOMCAT_HOME/webapps/Expresso/frame.jsp for
!     Unix) which translates to a URI of &quot;http://www.mycompany.com/Expresso/frame.jsp&quot;. However, in later versions, the root frame page was moved to a directory further
!     down - into another subdirectory, also called &quot;Expresso&quot;: So for example, for Unix systems, this is in $TOMCAT_HOME/webapps/Expresso/Expresso/frame.jsp,
!     accessible via an URI: http://www.mycompany.com/Expresso/Expresso/frame.jsp
!   <P>Due to this change, you can now insert your own customised welcome page (accessed
!     via &quot;http://www.mycompany.com/Expresso/frame.jsp&quot; and stored in $TOMCAT_HOME/webapps/Expresso/frame.jsp for Unix) while the Expresso
!     pages, which may in fact be thought of as the &quot;Administration&quot; directory no longer &quot;takes over&quot; your site.
!   <P>Next, we move to the question of where to put your own web apps. Since each JSP
!     container allocates a unique class loader for each context, there are two
!     possible ways of incorporating the Expresso Framework with your preexisting
!     applications. We describe them both below:
!   <OL>
!     <LI>Install the Expresso Framework for <B>each</B> of
!       your web applications in separate contexts. For example, if you have three
!       web applications, alpha, beta, and gamma, you could have the following
!       set up, with three separate installations of the Expresso Framework:
        <UL>
!         <LI>[( Class loader for "alpha" created/defined
!           as follows:]<BR>
!           webapps/alpha<BR>
!           webapps/alpha/Expresso/
!         <LI>[(
!           Class loader for "beta" created/defined as follows:]<BR>
!           webapps/beta<BR>
!           webapps/beta/Expresso/
!         <LI>[(
!           Class loader for "gamma created/defined as follows:]<BR>
!           webapps/gamma<BR>
!           webapps/gamma/Expresso/</LI>
        </UL>
!     <LI>On the other hand, you can have more than one application with
!       in the Expresso framework. It is just a matter of organising the directory
!       structures. The way to achieve this is to install just one instance of
!       the Expresso Framework . Divide and reorganise the context to whatever
!       you feel your architecture requires so all your applications (or more properly &quot;sub-applications&quot;) belong to the *same* context as does &quot;Expresso&quot;. For example, you could have the following subdirectories:
        <UL>
!         <LI>webapps/Expresso/Expresso
!         <LI>webapps/Expresso/alpha
!         <LI>webapps/Expresso/beta
!         <LI>webapps/Expresso/gamma</LI>
        </UL>
!     </LI>
!   </OL>
!   <P>Each approach has its advantages and disadvantages. The individual
!     requirements of your applications should dictate which approach you take. </P>
!   <P>In the first case, you will have three separate &amp; different
!     installations of the Expresso Framework! However, the three web applications
!     will belong to three distinct contexts and therfore are completely independent
!     (and ignorant ) of each other. In particular, they can never share any application
!     code or sessions etc. When you publicize your web application on the Internet
!     you probably dont want to broadcast that Expresso is being used until you
!     have secured the application. You can rename the `Expresso' sub directory
!     to the `Expresso235' and then change the set up value `%Expresso%' in the
!     database. So can secure the admin site of your site. Lastly you should leave
!     the java classes in `%context%/WEB-INF/classes' because Java has packages
!     and readily support namespaces. Just call them different eg. `com.acme.work.webapp.*'
!     and it won't interference with Expresso's `com.jcorporate.*'.<BR>
!     Put your custom tag library descriptors in `WEB-INF/tlds' and your libraries
!     jar files in `WEB-INF/lib'. See the spec at <A href="http://java.sun.com/products/jsp/" target="_blank">http://java.sun.com/products/jsp/</A>.
!   <P>On the other hand, in the second case, all three of your sub-applications share
!     the same context and can therfore share sessions, code, state, database pooling
!     etc. For example, in the example above, sub-application beta can seamlessly
!     switch over to sub-application gamma. Further, session data stored by sub-application
!     beta can be picked up by sub-application gamma. <BR>
!     <BR>
!     The JSP Container (Tomcat) can run multiple web applications because each
!     one is a subdirectory under the 'webapps' directories. With standalone Tomcat
!     there is at least two delivered out of the box 'ROOT' and 'examples'. The
!     ROOT subdirectory is special because that is the default web applicationthat
!     you see when you type in 'http://localhost:8080/' on your web browser. The
!     'examples' subdirectory is another web application with example servlets
!     and JSPs. The java classes for each web application are loaded with its own
!     class loader so that they don't interfere with one another. <BR>
!   </P>
!   <h2><A name="Best Practice with the Expresso Framework"></A>Best
!     Practice with the Expresso Framework</h2>
!   <P> Please review the &quot;<A href="http://www.theserverside.com/resources/article.jsp?l=Expresso" target="_blank">Best
!       Practice with Expresso Framework: Using a framework to create a web application</A>&quot; written by Peter Pilgrim, who is currently working for Deutsche Bank (UK) AG
!       OTC Derivatives IT . Expresso Framework is a large toolkit of classes.
!       Getting started can be overwhelming because there are so many classes [well
!       over 200] to look at. This document directs a newbie's focus to the &quot;important&quot; classes so that is really helpful. The document also divides the framework classes
!       into four types and discusses the roles of each of these types of classes:</P>
!   <UL>
!     <LI>schemas
!     <LI>database object persistence
!     <LI>controller design
!     <LI>and the rest of the kit, which involves job control, utilities, etc
!   </UL>
!   <P>It is essential that you understand the first three parts. Expresso
!     Framework is also very much database-driven. That is, you will need to use
!     a reliable, scalable relational database to make full use of the kit. Mysql,
!     Sybase, Oracle, DB2, and Postgres are all suitable candidates. The document
!     demosnstrates best practices by describing a simple stock trading program
!     that displays stocks trades, and allows the user to buy and sell stocks.
!     Hopefully, you can take this best of practice, using a framework, custom
!     tag action libraries, JSP's, and Servlets, elsewhere and make it a success
!   in your web applications. </P>
!   <h2><A name="Sample Applications"></A>Example
!     5.5 Applications</h2>
!   <P>To make it easier to get rolling with Expresso, <B>"Example" applications</B> are
!     now included with the 4.0 release with Example documentation explaining how
!     to access the demo applications and how to use them as a basis for developing
!     your own applications with Expresso. You might begin with a sample application
!     such as:</P>
!   <UL>
!     <LI><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=807" target="_blank">Location
!         Example</A>
!     <LI><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=808" target="_blank">Contacts
!         Example</A>
!     <LI><A href="http://www.xenonsoft.demon.co.uk/products/java.html" target="_blank">Orange
!         Trader Example Web Application</A> and <A href="http://www.theserverside.com/resources/article.jsp?l=Expresso-Struts" target="_blank">related article</A>.
!     <LI><A href="http://datafundamentals.com/appwriter/docs/samples.html" target="_blank">Datafundamentals Examples</A>
!   </UL>
!   <P> There is a Contacts example download available (which was written
!     for 4.0 and updated for 5.0) under the Expresso Examples Project. Also under
!     the Examples project there is also an effort community underway onsite to
!     develop an <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&db=default&resource=767" target="_blank">Expresso J2EE Pet Shop example</A> application. This example will illustrate Sun's Java BluePrints guidelines and
!     patterns implemented using the Expresso Framework. This sample application,
!     when completed, will show how to use the capabilities of the J2EE 1.3 platform
!     to develop flexible, scalable, cross-platform enterprise applications based
!     on the Expresso Framework. </P>
!   <h2><A name="DBMaint: A Step by Step How to Example"></A>DBMaint:
!     A Step by Step How to Example</h2>
!   <P> Please review the &quot;DBMaint:
!       A Step-by-Step Example&quot; written by Geeta Ramani which is in the EDG DBMaint Chapter. This is an exercise
!       which can be completed by a newbie fairly easily and I think there's always
!       something
!       to be said
!       about
!       actually
!       getting something to work! It illustrates the writing of a simple application
!       which allows maintenance of a customer database, complete with security.
!       The application can be used as a beginning for a more sophisticated sales
!       tracking application. Also, the author follows the directory structure
!       which is discussed in this document, so that will help.</P>
!   <h2><A name="Developing Applications with Expresso"></A>Developing
!         Applications with Expresso</h2>
!   <P>Here are some commonly asked questions about next steps and where
!     to do from here:<BR>
!     <BR>
!     The next step after installing Expresso is to <A href="http://www.jcorporate.com/expresso/doc/installapp.html" target="_blank">install
!     other applications</A>, such as eForum or begin development. Here are some references for beginning
!     to develop your own application:</P>
!   <UL>
!     <LI><A href="http://www.jcorporate.com/econtent/Content.do?state=resource&resource=552" target="_blank">Expresso
!         Developer's Guide</A>
!   </UL>
!   <P> If you get a bug that has you hung up, it will likely get fixed very
!     quickly with the community collaboration in which case you will want to download
!     the daily -dev download.<BR>
!   </P>
!   <h2><A name="Setting up Different Database and/or Servlet Engine"></A>Setting
!       up Different Database and/or Servlet Engine</h2>
!   <P class=prText>There are different database and Servlet
!     engine specific installation notes onsite under the Documentation link.
!   <h2><A name="Using an IDE"></A>Using an IDE</h2>
!   <P>Expresso can be used with any of the IDEs on the market. There are
!   notes onsite for specific IDEs under the &quot; IDE-specific Installation Notes&quot; section of the Expresso Documentation.  
!   <h2><A name="Troubleshooting Resources"></A>Troubleshooting Resources</h2>
!   <P>If you get stuck along the way there are a number of resources available
!     to help you:</P>
!   <OL>
!     <LI><B>FAQ</B><BR>
!       A good starting place for getting questions answered is found on the <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default" target="_blank">Expresso
!       project page</A>, choose the FAQ link in the left column.
!     <LI><B>Opensource Listserv and its archives</B><BR>
!       We recommend that you <A href="http://mailman.jcorporate.com/pipermail/opensource/" target="_blank">view
!       its recent archives</A> for answers to your questions. You can also post your question with the community
!       of Expresso developers on the opensource listserv. When you registered
!       you may have selected to join the listserv at that time. You can post to
!       the listserv by sending a message to : <A href="mailto:opensource at jcorporate.com?Subject=Troubleshooting question....">opensource at jcorporate.com</A>. This is a tremendous community resource as there are several thousand members
!       on this listserv. If you are not already a member you can <A href="http://mailman.jcorporate.com/mailman/listinfo/opensource" target="_blank">join the listserv</A>.
!     <LI><B>Expresso Forums</B><BR>
!       You can find them on the <A href="http://www.jcorporate.com/econtent/Content.do?state=template&template=2&resource=636&db=default" target="_blank">Expresso
!       project page</A>, choose the Forums link in the top menu bar. There are users and developer forums
!       available to post your questions and suggestions. By using the community
!       process your question is freely answered and also benefits other community
!       members who may have the same question. Forums are available to registered
!       users.
!     <LI><B>Premium Support</B><BR>
!       Many corporations have tight project constraints and wish the security
!         of guaranteed prompt responses beyond that of the community resources
!         and/or dedicated support personnel - so we encourage these companies
!         to purchase Premium Support for Expresso or any of our other products:
!         please email us at <A href="mailto:sales at jcorporate.com?Subject=Premium Support">sales at jcorporate.com</A>.
!   </OL>
!   <h2><A name="Conclusion"></A>Conclusion</h2>
!   <P>Please send your comments on the usefulness of this document and suggestions
!     for improvement to <A href="mailto:support at jcorporate.com?Subject=Users Guide Documentation">support at jcorporate.com</A> or to the authors of the document.</P>
!   <DIV align="left">
!     <hr>
!   </DIV>
!   <P><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"><FONT size="2" face="Arial, Helvetica, Verdana" color="#000000"><FONT color="#000000">Copyright
!           © 2002-2004</FONT> <A href="http://www.jcorporate.com/" target="_blank">Jcorporate Ltd.</A> All rights reserved.</FONT><FONT color="#ffcc33" size="2" face="Arial, Helvetica, Verdana"> <A href="http://www.jcorporate.com/html/aboutus/copyright.htm">Copyright</A> <A href="http://www.jcorporate.com/html/aboutus/privacy.htm">Privacy</A></FONT></FONT><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"><FONT color="#ffcc33" size="2" face="Arial, Helvetica, Verdana"><A href="http://www.jcorporate.com/html/aboutus/privacy.htm"><BR>
!                             </A></FONT><BR>
!     Last Modified:
!     <!-- #BeginDate format:En2 -->09-May-2004<!-- #EndDate -->
!     </FONT></P>
!   <p>&nbsp;</p>
  </DIV>
  </BODY>
  </HTML>



More information about the cvs mailing list