Got a few questions....
> Link here:
> - http://docs.codehaus.org/display/GEOTOOLS/Feature+Model+Branch
>
> 1. Builder vs Factory
> * XFactory does what it does *exactly* with no logic
> * XBuilder maintains state and can do the logic you wanted to
> put in the factory
>
<acuster> hey jody, was your "feature model branch update" email
supposed to be comprehensible by mere mortals?
<jgarnett> lol
<jgarnett> it was supposed to be a little comprehensible
<jgarnett> aka it described the things that were wrong that we
were trying to fix.
<acuster> 1. Builder vs Factory
<acuster> * XFactory does what it does *exactly* with no logic
<acuster> * XBuilder maintains state and can do the logic you
wanted to
<acuster> put in the
<acuster> factory
<jgarnett> but mostly it is an old email to justin that really
really needed to be captured on the wiki.
<acuster> what's logic, what's state?
<jgarnett> Right so if you are building a FeatureFactory - it
only has create methods
<jgarnett> no magic.
<jgarnett> it does what it says (create) and no more.
<acuster> no incremental construction,
<jgarnett> You can make a FeatureBuilder class that is actually
helpful to users.
<acuster> like set some settings -> create
<acuster> change some settings -> create()
<acuster> that's a builder only now?
<jgarnett> correct.
<jgarnett> mixing the two (which we tried by accident a few
times) always hurt badly
<acuster> cool
The next question was mostly around the use of the various FactoryFinder
interfaces....
acuster> how about FactoryFinder? Is there a way that we could have
ReferencingFactoryFinder etc.
<acuster> and have AllFacotriesFinder, with which all the finders
register?
<jgarnett> actually it is easier then that ...
<jgarnett> no library code should *use* factory finder ever.
<jgarnett> all factory code gets handed the factories it needs
either through:
<acuster> oh, I didn't understand any of your email but the first
part was the only one I care about right now
<jgarnett> - constructor
<jgarnett> - or a set method
<acuster> ?
acuster> yet another layer of abstraction?
* acuster is sick of the abstactions
<jgarnett> no just a straight replacement for factory finder
which is much better, and has iindustry wide adoption
<jgarnett> (so rather then our own hack, the library is pure and
will work with whatever you need want to use)
<acuster> okay, but that doesn't exist yet in the referencing
space, right?
<jgarnett> even if what you want is to set things up by hand.
<jgarnett> Um this list is for the FM branch ....
<acuster> okay
<jgarnett> it represents how we are fixing things to be sane.
<jgarnett> For anything else you are stuck with the insane -
factory finder magic classes.
<acuster> presumably, this will also arrive in the referencing
world some day
<jgarnett> yes it would.
<jgarnett> but the way it works is this ...
<jgarnett> ask for the class you want .. and you get it.
<acuster> ask who?
<jgarnett> the "container"
<jgarnett> let me find an example okay?
<jgarnett>
http://svn.geotools.org/geotools/branches/fm/module/main/test/org/geotools/feature/type/TypeSystemTest.java
<jgarnett> wanted to walk through the start of it with you.
<jgarnett> gt = GTContainer.normal();
<jgarnett> the container is called "gt"
<jgarnett> TypeFactory f =
(TypeFactory) gt.getComponentInstanceOfType( TypeFactory.class );
<jgarnett> asking gt for a TypeFactory
<jgarnett> that is it.
Cheers,
Jody
PS. thanks for the questions acuster
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel