[cal10n-dev] Congratulations on a useful project; here's my suggestion

Takeshi Kondo takeshi.kondo at gmail.com
Tue Sep 1 19:48:52 CEST 2009


>>
>> And Message class must implement Serializable because Exception is  
>> serialized in RMI. However Object isn't ensure to implement  
>> Serializable.
>
> Very good point. We have a similar problem in logback. It can be  
> addressed by serializing all basic Java types (Integer, Long,  
> Doublem etc) "as is" and transforming other types to String before  
> serialization.
Indeed.
Certainly, this implementation solve this problem.


>> I think message need to be build as soon as possible to reduce  
>> several problems.
>
> Rick's argument about needing to defer translation to a later stage  
> is quite a valid one. Ralph Goers made a similar argument. Two  
> requests this early in the project must correspond to a real need,  
> don't you think?
Yes , I agree.
I think it is good idea to prepare special ParameterObject for cal10n.

But I don't get use-case of this feature. What concerns me is this  
comment.
> The problem with the Cal10n API as it stands is that I need to know  
> the locale before I can construct a MessageConveyor.

This scenario can be solved by dependency injection. Because locale is  
given form outside business logic,
we don't need to know locale in business logic. I think way to get  
outside resource is dependency injection.

Could you tell me use-case about needing to defer translation to a  
later stage for my reference?


On 2009/09/01, at 4:29, Ceki Gulcu wrote:

>
>
> Takeshi Kondo wrote:
>> Hello Rick
>> I have this use-case experience.
>> I think your suggestion has two problems.
>> Message class you suggested isn't immutable. Object is call by  
>> reference.
>
> Indeed, that's an important concern.
>
>> And Message class must implement Serializable because Exception is  
>> serialized in RMI. However Object isn't ensure to implement  
>> Serializable.
>
> Very good point. We have a similar problem in logback. It can be  
> addressed by serializing all basic Java types (Integer, Long,  
> Doublem etc) "as is" and transforming other types to String before  
> serialization.
>
>> I think message need to be build as soon as possible to reduce  
>> several problems.
>
> Rick's argument about needing to defer translation to a later stage  
> is quite a valid one. Ralph Goers made a similar argument. Two  
> requests this early in the project must correspond to a real need,  
> don't you think?
>
> -- 
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework  
> for Java.
> http://logback.qos.ch
> _______________________________________________
> cal10n-dev mailing list
> cal10n-dev at qos.ch
> http://qos.ch/mailman/listinfo/cal10n-dev



More information about the cal10n-dev mailing list