aspose file tools*
The moose likes Java in General and the fly likes Best Design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Best Design" Watch "Best Design" New topic
Author

Best Design

YuenLian Wu
Ranch Hand

Joined: Nov 16, 2005
Posts: 73
Hi,

I have some web applicationd design question to ask. My web application basically provide add, modify and delete customer information. My program flow is :

add customer information jsp page -- > Server side Java Validator to check the input parameter from the jsp form --> forward to the original customer information jsp page if any errors occurred --> forward to the confirmation page when no errors --> invoke the adaptor if the inputed information is ok --> return to the jsp page if any information need to be changed

so in term of java, it's : jsp --> validator --> adaptor to insert data to db, or I need a form bean to store the form data ?

any better ideas ?

THanks for your advises

Transistor
[ April 25, 2006: Message edited by: YuenLian Wu ]
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
Typically you'd go JSP->Servlet->{whatever else, maybe EJB, other servlets, other services}->Servlet->JSP.

The first and last Servlet could be the same one, and there might be nothing in between them (but usually there is).

More generic:
View->Dispatcher(controller)->Businesslogic->Dispatcher->View


42
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

To expand on what Jeroen said: our own Bear Bibeault wrote a nice article on this topic in the last issue of the JavaRanch Journal. Give it a read -- I guarantee you'll find it useful!


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Best Design