On Wed, May 4, 2011 at 9:05 AM, Jody Garnett <[email protected]> wrote: > While Daniele had a nice simple request for an unsupported module yesterday; > today I have a slightly different kettle of fish ... a design problem. > I may get an opportunity to clean up the GeoTools factory / plugin system - > but not from the direction I was expecting. For the longest time any > discussion about plugins has started with OSGi or Spring. > The team who contacted me have mostly ported GeoTools to Andriod; resulting > in the following two blockers: > 1) Factory SPI does not work > > I think the approach recommended in the OSGi discussion can work here; > basically set up a Lookup class with different backends in the same design > as we used for Logging.
Sounds like a reasonable approach. There is always the catch of maintaining whatever makes the various implementations "tick". I can see us maintaining the SPI files and have some tooling to generate whatever config file is needed for the rest? > Additional thoughts: > - separate out "plugin" (allowing the abilities of a jar to be recognised) > from "factory" (keeping some instances based on their configuration) Don't follow here. > - may need the equivalent of an an Activator (allowing a plugin to > "register" and "deregister" as needed) As in, dynamically, at run time, OSGI style? That can be challenging, we have lots of static initialization blocks. > - proof of concept could include SPI solution (by default) and example of > a direct configuration ( for use by andriod), code woudl not be considered > complete until the OSGi crew had shown they could work with it > > I am pretty sure this could be done with out disrupting existing > implementations. Yep, that's fundamental. > 2) Hints does not work > > This was a surprise to me; basically our Hints are a straight extension of > the Java2D rendering hints; to "fix" this I would need to look into breaking > that relationship; and possibly relaxing our Hints class to allow Object as > a key (so either Java 2D rendering hints could be used; or our GeoTools > hints). > This one annoys me as I don't think I could handle it without disrupting > existing implementations. Uh, this is indeed quite annoying. Why is this happening in the first place? Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
