[Java-collab] Re: invokeOperation and Jody's stupid idea
Jody Garnett
jody.garnett at gmail.com
Sat Aug 15 03:16:21 EDT 2009
> About this invokeOperation idea:
>
>> From a programmer's POV this is a great idea, since it means that
>> it is possible to add new operations without touching the geometry
>> interface, which I consider a good design choice.
>
> On the downside is that for the user buffer() or union() methods are
> more intuitive than an invokeOperation(), but this is imho acceptable.
I think for common operations we can afford to break out methods that
call invokeOperation; ie a buffer() and union() method would be good
from a usability point of view. Indeed it would be nice to leave
invokeOperation as an implementation detail; or an advanced method.
>
> P.S: The operations could be enumerations as well:
> mygeom.invokeOperation(Operation.Buffer);
I kind of see that - you are declaring an option "buffer". And
selection of an implementation (if indeed their is even an
implementation is left to the the invokeOperation method to figure
out. It can select one information for flat world; another
implementation that does buffer on a sphere etc...
>
> That's it for now. I've got to catch a train and will be hiking the
> next two days. :-)
Enjoy; bring lots of water.
Jody
More information about the Java-collab
mailing list