Justin Deoliveira ha scritto:
> Hi Matthias,
> 
> You actually make a really good point. One thing we found when 
> implementing the oracle dialect is that we did indeed have to change
> the interface quite a bit. Once this interface is "out in the field"
> this will indeed become problematic and we won't have the freedom to
> change api on the fly.
> 
> I guess the idea is that oracle might be a worst case scenario... so
> the interface as it stands probably encapsulates most stuff needed.
> As well Christian has done a sanity check against db2 and found some
> issues there as well.
> 
> Hopefully this range of implementations can keep us confident enough
>  going forward that the interface won't require changes that are too
> too drastic.

Oh hum, SQLDialect is not an interface, it's an abstract class,
meaning it's easy to at least add methods. This is basically the
same approach as Hibernate.
This of course does not protect us from changes in the method
names or parameters.

<snip>

>> Since I already have classes in my own code base that account for
>> SQL dialects I can only say that - as time goes by - I find more
>> and more differences that must be accounted for. I haven't
>> encapsulated these vendor-specific helper functions as an
>> interface, rather I use a set of static singleton classes which I
>> can extend at any time if I find another case where vendor specific
>> code must be hidden from the rest of the application. (They are
>> part of a small library I can use in different projects.)

I've lost you here. With the abstract class approach we can give
the datastore a subclass of SQLDialect that deals with the Oracle
details (for example) and the datastore can call it without knowing
about Oracle at all. How do you do the same (or something similar)
with a set of static singletons?

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to