Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0
-
Fix Version/s: None
-
Component/s: referencing
-
Labels:
-
Environment:All
-
Number of attachments :
Description
Consider this a request for discussion:
Registries of implementations are typically bundled with the interfaces. Such is the case with JDBC, JDM, Geotools, and many others. Would it make sense to put the FactoryFinder (whatever it's name) in GeoAPI? That way, we'd go to org.opengis.FactoryFinder to find a specific registered factory much like we go to java.sql.DriverManager to find org.postgresql.Driver.
I'm told that the resistance to this idea is political, that it might trammel the implementors unnecessarily. This is incorrect because implementors must already implement an "AuthorityFactory" interface. Maintaining a registry of these implementations does not impact this requirement at all. Nor does it impose an additional requirement.
Centralizing the registry permits the simultaneous use of more than one implementation. It eliminates implementation dependent entry points. In short, it enables interoperability.
The beauty of GeoAPI is that I should be able to compile spatially aware code WITHOUT having a large implementing library in my classpath. (I'd need it to run, of course.) But this cannot currently be done. This exposes GeoAPI to criticism from users (because they need to make a new version of their code for every implementing library) as well as from the OGC (too restrictive).
Please attach comments to this issue.
the same problem has plagued us, as well. without an entry point into the API, it cannot be used independent of implementation when compiling code. so i added all of the needed get***Factory methods to CommonFactory and created a few missing factories (notably UtilFactory...i cannot be beholden to an InternationalStringImpl nor do i want to force my developers to write their own impl).
there are several classes (actual classes, not interfaces) that we've created that have fallen into GO1Support, since it isn't popular to put them directly in the API spec. one of these is CommonFactoryFinder, which helps me obtain a default implementation of the spec at runtime.
i prefer a single access point rather than multiple, but maybe that's just me. i'm interested to see other views on the issue.