One option to consider would generating "static" files for features etc
....which could be included by jsp
Create publisher bean create the static pages and clean up file etc ..

Of course prevents you from personalization. If you wanted to create a
"really" dynamic EShop.jsp page (using this example / model ) then your
entry point should be a initial servlet , which create variable , vectors
whatever  and then display a jsp to display the details...

In reality it might be better just to do your <jsp:sql ---

Of course that is just an opinion,  I'll watch with interest :-)



Justin

PS: If you are interested in design ideas , I'd recommend the book Design
Patterns, (if you haven't read it).
I believe there a book contain Java implementations of the patterns, anyone
read it ? good?


>-----Original Message-----
>From: Ralph Fiol [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 10, 2001 3:26 PM
>To: JRun-Talk
>Subject: Good Example of Model 2 Architecture
>
>
>I've been trying to find a "great" example of a Model 2 Architecture
>implementation.  So far, I've not had much luck.  This article from
>JavaWorld comes pretty close, but lacks some important implementation
>details.  The article is:
>
>http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc_p.html
>
>What the article fails to describe is how to best architect a *real-world*
>e-commerce application.  If you look at the EShop.jsp file in the example,
>the author has hard-coded the catalog list, rather than pulling that
>information from a database.  While it is easy enough to throw in a
><jrun:sql> tag, that would violate the Model 2 design.  And in a real-world
>e-commerce application, the home page would most likely also contain
>additional database content such as featured products, a product category
>list, and maybe top-sellers.
>
>The article goes on to say that Servlets should act as the
>controller, using
>beans to model the data, then forward to JSP pages to display results (act
>as views).  That makes good sense, but the example he presents uses the
>servlet only to respond to events such as FORM posts and URL links.  The
>home page is just a simple JSP page.  So, if we we're to update
>ESHop.jsp to
>generate the content from a database, how would we do that?
>
>- Use a bean to get the data from a database?  Maybe have a SiteBean that
>returns a vector of ProductBeans (for featured products)?
>
>- Call a servlet from within the JSP page?
>
>Has anyone come across a good example of how to do this?  Or, does anyone
>have any suggestions on how to modify the example?
>
>
>
>
>
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to