Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 4364 invoked from network); 30 Oct 2008 12:43:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2008 12:43:33 -0000 Received: (qmail 26007 invoked by uid 500); 30 Oct 2008 12:43:38 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 25506 invoked by uid 500); 30 Oct 2008 12:43:37 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 25495 invoked by uid 99); 30 Oct 2008 12:43:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2008 05:43:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michielgkalkman@gmail.com designates 209.85.200.172 as permitted sender) Received: from [209.85.200.172] (HELO wf-out-1314.google.com) (209.85.200.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2008 12:42:23 +0000 Received: by wf-out-1314.google.com with SMTP id 28so587967wfa.27 for ; Thu, 30 Oct 2008 05:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Vg3s88yUN6zZmwgH2dyVrFwRENyUtySJqop1I3Emi3A=; b=ikjbvUE3NxtJ6mCHT6h5YGkCvP5q3Hklj0REZtCvKjllp5y4SvhBGo9Hw2D/CS26b/ aEFUIf+H8FKKSVac7jAZ8aQFo2dDQMi0Cnl4BUotCGIWjzfd3c8b3HB2t25d9VG4fbtl 8JAgAN4wrHvR3Pc5R04odKM4FoFL/asnzc1i0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=bW2ZnlsWiY6sC9/nz4yJuCkVVdUpcx4vcKzi9XXnewXyR0ynl2Nu/opab66YDRQtFv UiZJ2t6G1B4ddF0TrfOu1H/Y2iJLluqKhX/7x1OHrYg/QwO/xs/L7+42Hn91VN7TLW0N 14ZDIvty+rLirs+g9fws0EyduuZDeKqynMlzI= Received: by 10.142.222.21 with SMTP id u21mr4646390wfg.67.1225370583536; Thu, 30 Oct 2008 05:43:03 -0700 (PDT) Received: by 10.142.51.15 with HTTP; Thu, 30 Oct 2008 05:43:03 -0700 (PDT) Message-ID: Date: Thu, 30 Oct 2008 13:43:03 +0100 From: "Michiel Kalkman" To: "Commons Developers List" Subject: Re: [configuration] Interface vs class In-Reply-To: <49095D30.60005@oliver-heger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <49095D30.60005@oliver-heger.de> X-Virus-Checked: Checked by ClamAV on apache.org I don't know the discussion, so the only thing I can say right now, is that I don't like the names ... Or I just don't understand why it is called XXXSource, which in my thoughts refers to the resource the configuration is read from. How about Configuration for the interface and something like BaseConfiguration for the class ? Regards, Michiel On 10/30/08, Oliver Heger wrote: > A while ago we discussed whether in Configuration 2.0 the fundamental > Configuration object should be an interface or an (abstract) class, and > - as usual ;-) - we could not agree on a way to go. > > Therefore I suggest the following compromise: > We keep an interface - let's call it ConfigurationSource - that is a > stripped down version of the Configuration interface we have now. This > interface contains only basic operations needed for accessing properties in > their "raw" form. > > What is now AbstractConfiguration can become a concrete class > "Configuration". This class will be associated with a ConfigurationSource > object and implement more sophisticated operations on top of it. Here stuff > like data conversion, interpolation, or enhanced query facilities is > implemented. > > An advantage of this approach is that we have a cleaner separation between > the basic management of configuration properties and high-level processing > of their values. We still have an interface, which has benefits, e.g. for > providing mock implementations or proxies, but extensions can be implemented > in a binary compatible way by modifying the new Configuration class (and > maybe defining sub interfaces of ConfigurationSource). Because the > ConfigurationSource interface has only a handful of methods, it is easier to > implement than the overloaded Configuration interface of today. > > I checked in a first draft version of a ConfigurationSource interface [1]. > Of course we can discuss the methods this interface should have. For > instance, methods like flush() and sync() dealing with persistence could be > added. > > WDYT? > Oliver > > [1] > http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/ConfigurationSource.java?view=log > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org