abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergio Bossa" <sergio.bo...@gmail.com>
Subject Re: Refactoring AbstractProvider to make it open for extension
Date Fri, 04 Jul 2008 20:51:48 GMT
On Fri, Jul 4, 2008 at 8:53 PM, David Primmer <david.primmer@gmail.com> 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.

Obviously IMHO.

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

View raw message