+1 for 3 as well On Fri, May 1, 2009 at 11:18 AM, Matthias Wessendorf <mat...@apache.org>wrote:
> On Thu, Apr 30, 2009 at 11:00 PM, Simon Lessard > <simon.lessar...@gmail.com> wrote: > > Hi Michael, > > > > Definitely 3. It's true that JSF 2.0's ViewHandler no longer do much, it > > pretty much only deal with HTTP headers and such while most of the work > is > > delegated to the VDL. 2 might break the TCK I think so it's not a good > > option. > > yeah, I agree. The third option (AbstractViewHandler) is a good choice! > > -Matthias > > > > > ~ Simon > > > > On Thu, Apr 30, 2009 at 4:47 PM, Michael Concini <mconc...@gmail.com> > wrote: > >> > >> I'm currently looking at updating JspViewhandlerImpl and > >> FaceletViewHandlerImpl for MYFACES-2219. As I'm looking at this, it > seems > >> that many/most of the methods that need to be implemented or updated > will be > >> identical for both JSP and Facelet. > >> I see three potential ways of handling this: > >> 1) Have lots of duplicate code in both impl classes. 2) Implement in the > >> API.where possible > >> 3) Create an abstract parent class that extends ViewHandler for the impl > >> classes to extend from. > >> The first option is not ideal for obvious reasons. With respect to the > >> second option, the JSF spec already forces a lot of implementing in the > API. > >> I'd rather not add more if possible since its really not the place for > it. > >> My preference would be for the third option. I could push the > ViewHandler > >> method impls common to both Facelet and JSP to a new class (maybe > >> org.apache.myfaces.application.AbstractViewHandler) and then implement > the > >> method which are different for each in the JSP and Facelet impls > >> respectively. > >> Thanks for you input, > >> Mike > > > > > > > > -- > Matthias Wessendorf > > blog: http://matthiaswessendorf.wordpress.com/ > sessions: http://www.slideshare.net/mwessendorf > twitter: http://twitter.com/mwessendorf >