You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Matthias Wessendorf <ma...@apache.org> on 2006/07/13 07:08:59 UTC

[Renderers] HtmlRenderer / CoreRenderer ( and XhtmlRenderer)

Hey,

I introduced three "helper" methods to shared's HtmlRenderer
(renderId(), getClientId(), shouldRender()). These methods are taken
CoreRenderer (Apache Trinidad Podling).

I "ported" some Renderer's to use renderId() instead of using
rw.writeAttribute(...)

I figured out, that some Renderer's extend JSF' Renderer and some HtmlRenderer.
I think we should define a clear "rule" on what base_clazz we should
build our custom stuff.

Trinidad's CoreRenderer and XhtmlRenderer (extends CoreRenderer) look
interesting.
Maybe these clazzes (or at least some methods) can be used for the
*base renderer class* ? Can also be interesting for the Tobago
Renderers.

Also I (my personal thing) don't like static helper methods like
DamnUtil.doSomething(). I like a more OO-based design. I think we
should try to get rid of RendererUtils and introduce (step-by-step)
its methods to the base_renderer_clazz; again XhtmlRenderer and
CoreRenderer look promissing.

WDYT ?

-Matthias

-- 
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: [Renderers] HtmlRenderer / CoreRenderer ( and XhtmlRenderer)

Posted by Matthias Wessendorf <ma...@apache.org>.
A good point is to use CoreRenderer/XhtmlRenderer in Shared 3.0.0
(which is used by us for JSF 1.2).

Have you looked at them ?

-Matthias

On 7/12/06, Cagatay Civici <ca...@gmail.com> wrote:
> Hi,
>
> I am also not a fan of static methods, reuse can be done with a good
> renderer design.
>
> Cagatay
>
>
> On 7/13/06, Matthias Wessendorf < matzew@apache.org> wrote:
> > Hey,
> >
> > I introduced three "helper" methods to shared's HtmlRenderer
> > (renderId(), getClientId(), shouldRender()). These methods are taken
> > CoreRenderer (Apache Trinidad Podling).
> >
> > I "ported" some Renderer's to use renderId() instead of using
> > rw.writeAttribute(...)
> >
> > I figured out, that some Renderer's extend JSF' Renderer and some
> HtmlRenderer.
> > I think we should define a clear "rule" on what base_clazz we should
> > build our custom stuff.
> >
> > Trinidad's CoreRenderer and XhtmlRenderer (extends CoreRenderer) look
> > interesting.
> > Maybe these clazzes (or at least some methods) can be used for the
> > *base renderer class* ? Can also be interesting for the Tobago
> > Renderers.
> >
> > Also I (my personal thing) don't like static helper methods like
> > DamnUtil.doSomething(). I like a more OO-based design. I think we
> > should try to get rid of RendererUtils and introduce (step-by-step)
> > its methods to the base_renderer_clazz; again XhtmlRenderer and
> > CoreRenderer look promissing.
> >
> > WDYT ?
> >
> > -Matthias
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
> >
>
>


-- 
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: [Renderers] HtmlRenderer / CoreRenderer ( and XhtmlRenderer)

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

I am also not a fan of static methods, reuse can be done with a good
renderer design.

Cagatay

On 7/13/06, Matthias Wessendorf <ma...@apache.org> wrote:
>
> Hey,
>
> I introduced three "helper" methods to shared's HtmlRenderer
> (renderId(), getClientId(), shouldRender()). These methods are taken
> CoreRenderer (Apache Trinidad Podling).
>
> I "ported" some Renderer's to use renderId() instead of using
> rw.writeAttribute(...)
>
> I figured out, that some Renderer's extend JSF' Renderer and some
> HtmlRenderer.
> I think we should define a clear "rule" on what base_clazz we should
> build our custom stuff.
>
> Trinidad's CoreRenderer and XhtmlRenderer (extends CoreRenderer) look
> interesting.
> Maybe these clazzes (or at least some methods) can be used for the
> *base renderer class* ? Can also be interesting for the Tobago
> Renderers.
>
> Also I (my personal thing) don't like static helper methods like
> DamnUtil.doSomething(). I like a more OO-based design. I think we
> should try to get rid of RendererUtils and introduce (step-by-step)
> its methods to the base_renderer_clazz; again XhtmlRenderer and
> CoreRenderer look promissing.
>
> WDYT ?
>
> -Matthias
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>

Re: [Renderers] HtmlRenderer / CoreRenderer ( and XhtmlRenderer)

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Matthias!
> I introduced three "helper" methods to shared's HtmlRenderer
> (renderId(), getClientId(), shouldRender()). These methods are taken
> CoreRenderer (Apache Trinidad Podling).
Great! Though, why will a renderer override the resulting clientId?

> I figured out, that some Renderer's extend JSF' Renderer and some
> HtmlRenderer.
> I think we should define a clear "rule" on what base_clazz we should
> build our custom stuff.
If we have a base class we should use it, for sure.
Maybe we (=you ;-) ) can start setup a wiki page about the rules how to
code in MyFaces land?

And yes, lets get rid of static utility classes where it makes sense. I
am not totally against them, but often we put too much stuff into them.

Ciao,
Mario