Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

One servlet/use case or command pattern?  RSS feed

Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
expectation is the root of all heartache - shakespeare. tiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!