commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "draftdog -home-" <>
Subject Re: [i18n] howto create a new module in commons-sandbox ?
Date Sun, 01 Sep 2002 17:20:58 GMT

>I've taken a look. Here are my initial comments:
>1) You've put a GPL licence on the top - this is incompatable with Apache

yes, indeed... apart from the package name I did not pay any attention to 
those kind of things. I am working on another project (just started) that 
uses these classes, that project is under GPL...

>2) You rely on JDK 1.4 because of the regular expressions. Commons 
>targets JDK 1.2 or later. Sometimes JDK1.1. Using the Jakarta regular
>expressions code is not a choice either because commons projects shouldn'r
>really have 'big' dependencies.

absolutely right... I guess I should rewrite this part of the code to meet a 
requirement like that, especially since the RegExp is barely used.

>3) I'm unclear as to what purpose ContextKey and ContextValue play

By strongly typing the parameters it will force users to think in terms of 
resource bundles rather than using human language in their code.

For example, any business application exception for a project extends 
something like: where this exception 
only has a constructor that takes a ContextValue, so you are sure to throw 
with a valid exception message.

Note: I still want to do some performance tests of using these parameters, 
since it involves the creation of extra classes whenever throwing an 
exception or logging a message.

>4) Apart from the parameter substitution, I'm unclear as to what other
>benefits the package gives as it stands

This is my concern also, at this point it is very lightweight and does not 
have that much added value, however, I do not like to write the same code in 
each project and that was exactly what I was doing all the time.

I also assumed there are some additional features that should be in there 
but that I simply did not already think about, in  my opinion a forum is a 
good way of sharing ideas :)

>Let me explain a little more. I have code at work that allows us to work
>with resource bundles in a nicer way too. It allows XML resource bundles,
>and bundles that receive the locale when they are called (enabling DB
>lookups for example). It has an interface that allow the retrieval of 
>resources, lists, maps and XML resource data.

right, that is very interesting, at this point I never needed such 
functionality (DB lookups for example) but now you give me some ideas :)
This kind of logic could also be integrated into the package.

>These are the parts I find useful - a parameter substitution could be done
>separate from the i18n library (although there may be a case for

>One other thing, there is an i18n package in Avalon Excalibur
>that will also be considered at some point for commons.

Ah, I was not aware of that... I will check it out in more detail later on.

Thanx for the comments Stephen, it's greatly appreciated.


MSN Photos is the easiest way to share and print your photos:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message