my dog learned polymorphism*
The moose likes Servlets and the fly likes One servlet/use case or command pattern? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "One servlet/use case or command pattern?" Watch "One servlet/use case or command pattern?" New topic
Author

One servlet/use case or command pattern?

Tonny Tssagovic
Ranch Hand

Joined: Dec 30, 2003
Posts: 226
Hello guys,
What are the impacts of having a Servlet for each Use case, and is thus simply delegating thin clients calls to the EJB and it is the client�s responsibility to choose which Servlet to call depending on required functionality and when is it more appropriate to have a controller Servlet with a conditional statement (or command pattern) deciding which EJB/Object function to call depending on parameters passed by the client? What are the consequences of choosing one of these solutions to another? Is there a performance benefit of choosing one instead of the other? (Having a big pool of big do-it-all servlets of many small pools of different servlets with different tasks).
PS: I know that the controller pattern decouples the client from the server, and thus is a good thingy, but I don�t think in this case (just few use cases) it matters anyway
- I have seen "prof" code using both strategies, and want to know Pros/Cons
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: One servlet/use case or command pattern?
 
Similar Threads
Delegating requestes to different servlets based on the submission.
I'm new to sevlets help
DAO Pattern & Head First Series
Design help!
Chapter 2 (HFSJ) notes , may be useful for anyone