File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "One servlet/use case or command pattern?" Watch "One servlet/use case or command pattern?" New topic

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:
subject: One servlet/use case or command pattern?
It's not a secret anymore!