You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Manfred Geiler <ma...@gmail.com> on 2008/01/18 17:04:07 UTC

Myfaces commons utils

Just had a look at the new commons-utils module and found the class "TagUtils".
Please forgive me for saying it directly: This piece of code is horrible!
It seems to be a mixture of various static methods without any direct
relation to "Tags". Looks like a huge graveyard for quick and dirty
static code pieces.
Having in mind a stable API (this is what we intended with these
commons jars - right?) I must say we SHOULD get rid of this code
and/or refactor it to several separate utils classes. Each one of them
having a clear and certain scope.

WDYT?

--Manfred

Re: Myfaces commons utils

Posted by Matthias Wessendorf <ma...@apache.org>.
  // Helpful with tag auto generation. Though this isn't really required.
  /**
   * Return the same string. It is there for convenience and makes life easy
   * while auto generating tags.
   * @param value
   * @return
   */
  public static String getString(......

this makes it clear, that the class is not really "nice", but used by the
auto generated tags.



On Jan 18, 2008 8:52 AM, Matthias Wessendorf <ma...@apache.org> wrote:
> legacy... from Trinidad, just moved it over... to not brake things......
>
> thx
>
>
> On Jan 18, 2008 8:04 AM, Manfred Geiler <ma...@gmail.com> wrote:
> > Just had a look at the new commons-utils module and found the class "TagUtils".
> > Please forgive me for saying it directly: This piece of code is horrible!
> > It seems to be a mixture of various static methods without any direct
> > relation to "Tags". Looks like a huge graveyard for quick and dirty
> > static code pieces.
> > Having in mind a stable API (this is what we intended with these
> > commons jars - right?) I must say we SHOULD get rid of this code
> > and/or refactor it to several separate utils classes. Each one of them
> > having a clear and certain scope.
> >
> > WDYT?
> >
> > --Manfred
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Myfaces commons utils

Posted by Matthias Wessendorf <ma...@apache.org>.
legacy... from Trinidad, just moved it over... to not brake things......

thx

On Jan 18, 2008 8:04 AM, Manfred Geiler <ma...@gmail.com> wrote:
> Just had a look at the new commons-utils module and found the class "TagUtils".
> Please forgive me for saying it directly: This piece of code is horrible!
> It seems to be a mixture of various static methods without any direct
> relation to "Tags". Looks like a huge graveyard for quick and dirty
> static code pieces.
> Having in mind a stable API (this is what we intended with these
> commons jars - right?) I must say we SHOULD get rid of this code
> and/or refactor it to several separate utils classes. Each one of them
> having a clear and certain scope.
>
> WDYT?
>
> --Manfred
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Myfaces commons utils

Posted by Martin Marinschek <ma...@gmail.com>.
interesting class...

yes, this should most probably be refactored ;) - even though I do see
some methods for Tags (e.g. setting values from tag-attributes to
component-attributes).

regards,

Martin

On 1/18/08, Manfred Geiler <ma...@gmail.com> wrote:
> Just had a look at the new commons-utils module and found the class
> "TagUtils".
> Please forgive me for saying it directly: This piece of code is horrible!
> It seems to be a mixture of various static methods without any direct
> relation to "Tags". Looks like a huge graveyard for quick and dirty
> static code pieces.
> Having in mind a stable API (this is what we intended with these
> commons jars - right?) I must say we SHOULD get rid of this code
> and/or refactor it to several separate utils classes. Each one of them
> having a clear and certain scope.
>
> WDYT?
>
> --Manfred
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces