On Oct 2, 2008, at 3:11 AM, Thorsten Scherler wrote:

On Wed, 2008-10-01 at 17:59 -0400, Ryan McKinley wrote:
my email does not appear to be working these days.... i'll try again....


Begin forwarded message:

From: Ryan McKinley <[EMAIL PROTECTED]>
Date: September 30, 2008 12:55:41 PM EDT
To: labs@labs.apache.org
Subject: [droids] interface naming convention?  IDroid?

I've been using wicket and C# recently...  I like their convention
to prefix all interfaces with "I"

This makes it clear when you are holding onto an interface vs a
concrete implementation -- this is particularly important when you
are dealing with lots of automatic dependency injection.

Also, it eliminates the need for the silly "impl" suffix

So we would have:
IDroid
IHandler
IOutlink
ITask
ILink
ITaskmaster
...

thoughts?  I figure I should throw it out there while the API is in
flux ;)

I personally do not really like that too much. I am more the option b
type from
http://discuss.joelonsoftware.com/default.asp?design.4.331276.11

Droid droid = new DefaultDroid();



I like this one. Of course, my Lucene experience would argue that interfaces are a royal pain when it comes to back-compatibility in public, open source projects for all but single method interfaces, where you never know where the next great idea is coming from... ;-)

-Grant


vs

IDroid droid = new Droid();

I go for the first one since it is more descriptive. We have all
interfaces in the api package so we know that which are interface
classes.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to