You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ieong Alex <al...@msn.com> on 2004/04/16 04:43:16 UTC

Re: Make DefaultComponentMessagesSource more flexible to subclass

Umm.... I just want to leverage most of the functions the DefaultComponentMessagesSource.

I consider most part of DefaultComponentMessagesSource is quite good for common implementation... the cache and the fallback to higher level of locale. 

If I take decorator pattern containing an instance of DefaultComponentMessagesSource, can I leverage these without copying all of those code? Ummm.... maybe that's the problem of my skill and out of this topic.

PS. Somebody here has suggestion to me? Thanks in advance. :)

Best Regards,
Alex.

>From: bugzilla@apache.org
>Reply-To: "Tapestry development" <ta...@jakarta.apache.org>
>To: tapestry-dev@jakarta.apache.org
>Subject: DO NOT REPLY [Bug 28404]  -     Make DefaultComponentMessagesSource more flexible to subclass
>Date: 15 Apr 2004 12:17:28 -0000
>
>DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
>RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
><http://issues.apache.org/bugzilla/show_bug.cgi?id=28404>.
>ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
>INSERTED IN THE BUG DATABASE.
>
>http://issues.apache.org/bugzilla/show_bug.cgi?id=28404
>
>Make DefaultComponentMessagesSource more flexible to subclass
>
>hlship@apache.org changed:
>
>            What    |Removed                     |Added
>----------------------------------------------------------------------------
>              Status|NEW                         |RESOLVED
>          Resolution|                            |INVALID
>
>
>
>------- Additional Comments From hlship@apache.org  2004-04-15 12:17 -------
>The intent is that you should use the decorator pattern; create your own
>implementation of IComponentMessagesSource that understands your format or
>source of message properties. When it cannot satisfy the request, it must
>delegate to an instance of DefaultComponentMessagesSource.
>
>Inheritance is a trap; composition is a much better approach. This is a lesson
>I've learned over the last few years working on Tapestry (that I've applied to
>HiveMind).
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>

_________________________________________________________________
在您的行動裝置上傳送接收 Hotmail 郵件,請移至: http://zh-asiasms.mobile.msn.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org