I read the liked article and I should say I never thought abot that before.
Anyway I like the minimal interface style (also extreme programming says not
to implement something until is actually needed, if I remember well).
Then one may implement a wrapper or helper class that gives a more human
friendly interface, like this:
public class HumanListWrapper implements List
{
private List theList;
public Object last()
{
return theList.elementAt(theList.size() - 1);
}
}
public class HumanListHelper
{
public static Object last(List theList)
{
return theList.elementAt(theList.size() - 1);
}
}
I don't know how this can be applied to GeoTools, though...
Bye
Paolo Rizzi
-----Original Message-----
From: Jody Garnett
To: Geotools-devel
Sent: 07/12/2005 3.24
Subject: [Geotools-devel] A interesting contrast ... and a question?
We have tried to keep the API in GeoTools minimal, taking advantage of
specifications etc...
The following article highlights another approach:
-<http://martinfowler.com/bliki/HumaneInterface.html>
That is kick out the stops and be a bit more human friendly, and well
usable.
I would not mind going half way on this, using a more limited API for
data
structures that communicate between subsystems (like Filter and
Feature),
while making available implementations that are more human friendly.
Phrased another way, a lot of our utility methods should be looked at,
if they are being used to plug an API hole we should just apply the fix.
(A guide for this is if we need the utility method for internal use).
If they are being used to make a complex data structure approachable
perhaps we can add them to an abstract class for a more seamless
experience.
So here is the question - what is your favorite utility method?
I personally like:
- CRS.decode( code )
A close second is DataUtilities.createType( typeName, typeSpec )
Jody
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
AVVERTENZE AI SENSI DEL D. LGS. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i, sono da considerarsi strettamente riservate. Il loro
utilizzo è consentito esclusivamente al destinatario del messaggio, per le
finalità indicate nel messaggio stesso. Qualora riceveste questo messaggio
senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia
via e-mail e di procedere alla distruzione del messaggio stesso,
cancellandolo dal Vostro sistema; costituisce comportamento contrario ai
principi dettati dal D. Lgs. 196/2003 il trattenere il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel