I don't think that there should be a factory finder at all. Instead code
that needs a StyleFactory or a FilterFactory should declare a setter or
a constructor argument.

I think a "finder" should only be used when there are multiple
implementations of a particular interface , and you need to iterate over
them. Not for a class that just needs a single implementation. How does
the finder know which one to use if there are multiple implementations
around? This is a decision should be left up to the end user /
application imho.

-Justin

Martin Desruisseaux wrote:
> I just had an opportunity to look at the factories. I suggest to deprecate 
> the 
> two following classes:
> 
>      org.geotools.style.StyleFactoryFinder
>      org.geotools.filter.FilterFactoryFinder
> 
> and replace them by
> 
>      org.geotools.factory.CommonFactoryFinder
> 
> Rational: peoples recently expressed on the mailing list the wish to reduce 
> the 
> number of FactoryFinder and consolidate at least some of them in a single 
> class. 
> The above-cited StyleFactoryFinder and FilterFactoryFinder contains only one 
> public method, createStyleFactory and createFilterFactory respectively. I 
> suggest to put those two methods (as well as some additional methods we may 
> discover later in other FactoryFinder) in this CommonFactoryFinder.
> 
> Note: I'm not sure either about the class name (CommonFactoryFinder) or 
> package 
> (org.geotools.factory). Other proposals are welcome.
> 
> This CommonFactoryFinder would uses the Hints mechanism.
> 
>       Martin
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> !DSPAM:1004,452d236f80414820651628!
> 


-- 
Justin Deoliveira
The Open Planning Project
[EMAIL PROTECTED]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to