I've done a lot of experimenting with the Portlet support in the MVC
packages of the sandbox (I guess informally being called Spring Portlet
MVC) through the course of doing other things over the last few months.
The one thing that has bugged me more then any other thing is why are
the two methods of PortletController both called "handleRequest" ?
These two methods roughly equate to the action and render methods of the
Portlet contract. It seems the current trend in the industry to to
avoid overloading, especially where it's confusing. And in this case we
have two very different activities going by the same name. This seems
wrong.
I understand the Web MVC (intended for servlet based applications) has a
single 'handleRequest' method. So the desire to use the same name might
have come from there. But, a servlet based environment does not define
two distinct behaviors of 'action' and 'render'.
I know this code has been out there for a while and many people have
built applications around it. But is this something we should look at
changing? It would seem a framework like Spring, which exists to help
people follow best practices like IoC, should itself, follow good
practices like avoiding confusing use of overloading (see Effective
Java, Item 26, page 130).
---- Cris J H
====
This message and any attachments are confidential. Unauthorized use
or disclosure of this message is strictly prohibited, and this message
must be destroyed immediately if received by an unauthorized recipient.
====
|