The PEAK Developers' Center   WritingInterfaces UserPreferences
 
HelpContents Search Diffs Info Edit Subscribe XML Print View
The following 158 words could not be found in the dictionary of 50 words (including 50 LocalSpellingWords) and are highlighted below:
An   Attachable   But   Configurable   Factory   For   From   Generally   Interface   Interfaces   Object   Or   Phillip   Protocols   Regarding   Resolver   September   Some   The   Then   To   Without   able   about   adapt   adaptation   additional   addressing   aggregate   all   already   an   and   any   applied   are   aren   as   assemble   at   be   because   beginner   behavior   behaviors   being   below   best   bunch   but   by   capabilities   clear   clients   code   collaboration   com   comes   component   concepts   container   context   convenience   design   desired   determine   different   docstring   don   eby   editing   essential   existing   expecting   extent   features   focus   following   for   from   full   given   have   how   imply   in   influenced   inheritance   interface   interfaces   into   is   links   lump   might   multiple   name   need   not   noun   object   objects   of   on   one   opposed   oriented   part   peak   perform   pipermail   play   please   point   provide   question   quite   reasons   responsibilities   responsibility   sarna   see   should   single   some   sometimes   speaking   sub   suppliers   taken   that   the   them   there   this   those   thread   to   use   useful   using   usually   variety   various   view   vital   want   was   way   were   when   where   whose   will   with   would   you   your  

Clear message


The following were taken from a thread where Phillip was addressing component design concepts for a beginner. Some editing was applied. For the full context, please see the links given below.

From http://www.eby-sarna.com/pipermail/peak/2004-September/001780.html :

Interfaces are behavior-oriented, and you should question any interface whose name is a noun that doesn't imply behavior (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.

Regarding behavior and interfaces, with interfaces being a vital part of code as opposed a docstring container:

From http://www.eby-sarna.com/pipermail/peak/2004-September/001783.html :

To some extent, this view of interfaces is influenced by ?PyProtocols/PEP 246. Without object adaptation, interfaces aren't quite as useful. But with adaptation, the best way to design a collaboration of objects is to focus on the essential and desired behaviors. Then, you determine how to adapt the behavior of existing objects to perform your desired behavior.

 

PythonPowered
EditText of this page (last modified 2007-03-26 18:24:26)
FindPage by browsing, title search , text search or an index
Or try one of these actions: AttachFile, DeletePage, LikePages, LocalSiteMap, SpellCheck