Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 44453 invoked from network); 4 Jul 2008 21:08:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jul 2008 21:08:25 -0000 Received: (qmail 94897 invoked by uid 500); 4 Jul 2008 21:08:26 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 94878 invoked by uid 500); 4 Jul 2008 21:08:26 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 94867 invoked by uid 99); 4 Jul 2008 21:08:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 14:08:26 -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 david.primmer@gmail.com designates 209.85.198.250 as permitted sender) Received: from [209.85.198.250] (HELO rv-out-0708.google.com) (209.85.198.250) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 21:07:34 +0000 Received: by rv-out-0708.google.com with SMTP id k29so1504821rvb.0 for ; Fri, 04 Jul 2008 14:07:55 -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=hY7wfvN0KGirv5FP319o6mlSAK2hxhy+lw38gHMaAdQ=; b=KXQ2hfCFfvINSSgkChxGuj9X3XxKqFQLl8WsOOSUDg96Rq5EQ0hjfsRMzi36Y9rej9 EbyATdtEThigxLcQMa6H7hInZNs/D3T9Hvrzcyhh87cVKv4LMWzY9gxaZhM1fXEmdEja UrhsyWSfhSKDMM3FTZVYzllAk8pN8KBh4HsUo= 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=Pw0oATFXsKLWioPMmXBWn1IjRGbedyTr7fFnMUC8KpxtlkRjWe69JqKuRQu6beP8ls dBAohI9MPSGFNYiWGswdHLQCgk/W2ffmaqFjsNfeXBBAoH9Z0USKIN2JR19c6gyUbXRQ wgaUDa+TDxyVUpXBFsw9UwAAAnLETK92j8cHE= Received: by 10.114.158.1 with SMTP id g1mr3590179wae.111.1215205672877; Fri, 04 Jul 2008 14:07:52 -0700 (PDT) Received: by 10.114.24.16 with HTTP; Fri, 4 Jul 2008 14:07:52 -0700 (PDT) Message-ID: Date: Fri, 4 Jul 2008 14:07:52 -0700 From: "David Primmer" To: abdera-dev@incubator.apache.org Subject: Re: Refactoring AbstractProvider to make it open for extension In-Reply-To: <806e13040807041351u7316b09kb616bd2bc76b7193@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <806e13040807041043xd466a7x899a6092d1d0408e@mail.gmail.com> <806e13040807041351u7316b09kb616bd2bc76b7193@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jul 4, 2008 at 1:51 PM, Sergio Bossa wrote: > On Fri, Jul 4, 2008 at 8:53 PM, David Primmer wrote: > >> I'm not sure what things you want to do with the request processing >> that force you to replace the 'if' statements that you mention. >> [CUT] > > AbstractProvider uses "if" statements in order to decide what to do > depending on the TargetType: this prevents you to extend provider > features for supporting new target types, i.e. Open Search documents. > I know you can support OpenSearch (or whatever else) with filters, > resolvers, and alike, but I think it would be wrong: if it's the > provider job to decide what to do depending on the TargetType, you > shouldn't give this same responsibility to other classes. Ah, I see what you mean. I guess I just never thought of this as a new TargetType, but rather a new adapter. For example, I recently wanted to add Json processing and avoid using the FOM, so I thought a JSONCollection TargetType might work. But then I realized that I could just re-use collection TargeType and make a JSON CollectionAdapter. Having more easily extensible TargetType system would make abdera more general purpose. I suppose it's useful for doing things that aren't exactly resource oriented, like processing a call for a service doc. Shindig could extend TargetType to include processing our Discovery Doc which is a more dynamic Service Doc. davep > > Obviously IMHO. > Cheers, > > Sergio B. > > -- > Sergio Bossa > Software Passionate, Java Technologies Specialist and Open Source Enthusiast. > Blog : http://sbtourist.blogspot.com > Sourcesense - making sense of Open Source : http://www.sourcesense.com > Pro-netics s.p.a. : http://www.pronetics.it >