A
asaguden
Hi,
The system I have developed is currently suffering from an
overweight controller (servlet).
After reading some good books on J2EE design patterns, I see that the
Command pattern should suit me just fine to cleanup and separate
responsibility. So far so good.
But after reading some more I learned that it is good practice
to decouple the HttpServletXXX components. That is, pick out the
interesting stuff in the web container (servlet, jsp) and then
continue processing.
But Command pattern just redirect HttpServletRequest to the Command
class.
Q: Shall I decouple the HttpServletRequest before calling the command
OR is the Command part of the web container...?
/ Peter
The system I have developed is currently suffering from an
overweight controller (servlet).
After reading some good books on J2EE design patterns, I see that the
Command pattern should suit me just fine to cleanup and separate
responsibility. So far so good.
But after reading some more I learned that it is good practice
to decouple the HttpServletXXX components. That is, pick out the
interesting stuff in the web container (servlet, jsp) and then
continue processing.
But Command pattern just redirect HttpServletRequest to the Command
class.
Q: Shall I decouple the HttpServletRequest before calling the command
OR is the Command part of the web container...?
/ Peter