Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 43195 invoked from network); 16 Jan 2004 03:43:05 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Jan 2004 03:43:05 -0000 Received: (qmail 44477 invoked by uid 500); 16 Jan 2004 03:42:41 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 44389 invoked by uid 500); 16 Jan 2004 03:42:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 44068 invoked from network); 16 Jan 2004 03:42:38 -0000 Received: from unknown (HELO scaup.mail.pas.earthlink.net) (207.217.120.49) by daedalus.apache.org with SMTP; 16 Jan 2004 03:42:38 -0000 Received: from h-66-167-118-70.sndacagl.dynamic.covad.net ([66.167.118.70] helo=localhost.localdomain) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1AhKsh-00077h-00 for commons-dev@jakarta.apache.org; Thu, 15 Jan 2004 19:42:47 -0800 Received: from phreaker.net (terrordome [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id i0G3f4d07920 for ; Thu, 15 Jan 2004 19:41:05 -0800 Message-ID: <40075D4E.1080107@phreaker.net> Date: Thu, 15 Jan 2004 19:41:02 -0800 From: __matthewHawthorne User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [codec] More thoughts on CharSets and Encoders (references: R E: [codec] Streamable Codec Framework) References: <245A7290F0E0D311BF6E009027E7908B07204AE9@atlanta.seagullsw.com> In-Reply-To: <245A7290F0E0D311BF6E009027E7908B07204AE9@atlanta.seagullsw.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Gary Gregory wrote: > (2) What could be done, and please forgive my lack of intimacy with these > APIs, is to create [codec] APIs that are forward compatible to any extent > possible. What I mean by this if NIO has a class Foo with methods a() and > b(Foo) is to create an equivalent [codec] class Bar with methods a() and > b(Bar), which would allow one to do search and replace in the future. This > is quite a stretch I know, but guess what, we've done this at work in the > logging domain (we have our own logging which we want to eventually move to > 1.4 or log4j). An alternative to the search-and-replace could be to create an interface which defines the requirements of the functionality that you need. You could then provide a default implementation of the interface, use the Factory pattern to obtain instances, and then in the future, plug in an implementation which delegates to the corresponding 1.4 class once it becomes available in jakarta-land. This could make things transparent to the outside. I've been able to pull this off a few times when I was in the 1.3 to 1.4 transition (I had my own logger too), and I've also been able to plug trash my home-grown solutions in favor of swift libraries such as [dbcp] and [betwixt]. Maybe this is what you were saying and I misunderstood you. Either way, it's painful to not be able to use 1.4, especially with 1.5's new tricks on the horizon. ;) --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org