DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

Python3000 > SourceSafe > Middleware > Reflection > ReflectionAndIntrospection > ActorModel > Namespaces > JavaScript > BruceEckel > CheeseShop > Terracotta > PythonIDEs > LispMacros > Subversion > WikifyBlog > InterfacesClear Trail
Main /

Interfaces

FluentInterfaces
MultipleInheritance

PythonAbstractBaseClasses

SoftwareArchitecture
SoftwareEngineering
QuaSar

Components

Delegates

Exceptions

Since changing interfaces breaks clients you should consider them as immutable once you've published them. As a consequence when adding a new method to an interface you have to do so in a separate interface. In Eclipse we take API stability seriously and for this reason you will find so called I*2 interfaces like IMarkerResolution2 or IWorkbenchPart2 in our APIs.[1]


Interfaces are behavior-oriented, and you should question any interface whose name is a noun that doesn't imply behavior ([positive!]e.g., IAttachable, IConfigurable, IResolver, IObjectFactory).

An interface usually is about a single, clear responsibility. Generally speaking, you don't want to lump multiple responsibilities into an interface, because you might want to perform them using different objects at some point, and at that point you would already have a bunch of code expecting those responsibilities in one object.

Interface inheritance usually comes into play when some clients of the interface need additional capabilities, but not all suppliers of the interface will be able to provide those additional capabilities. Or, sometimes there's a component that for convenience reasons will aggregate a variety of features, and you use inheritance to assemble an interface from the various sub-interfaces.
[2]


Ideas on interfaces



Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 20.09.2008 09:23 Uhr und seit 7. April 2005 1780 aufgerufen.