|
From: J.Enrique Ruiz-V. <er...@di...> - 2005-05-12 07:00:35
|
+1 for Portlet MVC integration > I agree that a refactoring of the code is the best permanent solution. > Hopefully we can take this track when we really start working on > getting the Portlet MVC framework integrated into Spring. > > Rob Butler wrote: > >> Why not refactor the OpenSessionInViewInterceptor to >> a new class called CommonOpenSessionInViewInterceptor >> and have it operate on a set of new interfaces called >> CommonRequest and CommonResponse. >> >> Then have two separate implementations. One is called >> OpenSessionInViewInterceptor (to replace the original >> and remain backward compatible with existing code). The other is >> PortletOpenSessionInViewInterceptor. These classes can then wrap (not >> extend) the >> CommonOpenSessionInViewInterceptor ala the adapter >> pattern. These classes each have inner classes that >> implement the web/portlet version of CommonRequest & >> CommonResponse, and pass these to the >> CommonOpenSessionInViewInterceptor. >> >> End result, no code duplication, Spring web MVC is not >> tied to Portlet MVC, and you no longer have to hope >> that PortletRequest is really a HttpServletRequest. >> >> Just an idea. >> Rob > -- J.Enrique Ruiz Valenciano CIO, DiSiD S.L.L. (http://www.disid.com) Email: er...@di... |