Re: OOP Terminology - another word for "user"



rk wrote:

I'm documenting some code, and am looking for a term I can use to mean
the "user of this class".

First off, what do you mean by this ?

It's a serious question; are you talking about the objects which
interact with instances of this class, the code which specifies the
behaviour of those objects, or the person who wrote that code ? If the
former then you are presenting your design in (what I would call)
"true" OO style; if the latter then you are giving a code-centric
description. Either or both may be appropriate but they call for
different styles of expression.


I don't want to use the term "user", because it may be misinterpreted
to mean the human user of the computer.

General point: you are not going to find any term which doesn't have
an important extra meaining. (Mainly because the terminology of
programming has mainly been created by stealing, extending, or
analogising existing words and concepts). Just live with it.

Anyway being specific: if you are talking pure OO (my first option,
above) then one object may well be used by another object. Indeed
that's a frequently occurring pattern of interaction, and it would be
absurd to avoid the natural term because of fear of confusion.


The term "client" is even worse, as it could mean any of:
- the client the code is being created for
- an endpoint in a client/server system

Use "client code", frequently enough to remind people of what you are
talking about. Shorten it to "client" when the context is established.


The term "instantiator" isn't quite right, as it is implicitely
restricted to the creator of my object. I want the term to include
any code that makes a call to my object.

Correct; avoid that except in the cases you mention.


The term "implementor" is already used when talking about the
implementor of an abstract class, and I want to avoid confusion.

Implementor means the person who wrote the code, and you have little
reason to talk /about/ them directly (I'd hope). In any case you can
also use "programmer" for that. I wouldn't use "implementor" for
anything else ("object which implements Xxx" or "concrete subclass of
Xxx" would be better, depending on whether you are talking in OO).


The term "caller" isn't quite right, as it usually refers specifically
to the caller of a function, not the consumer of a class.

Agreed, but not entirely. The caller of a function (in OO) /is/ the
object which is interacting with this object. So if (in some passage
of text) there is a clear sense of which method or methods are under
discussion (there may not be), then "caller" (OO) or "calling code"
(code-centric) are prefectly acceptable.

NB: OO purists would prefer "sender" -- which unambiguously means the
calling object. Not too many people are happy with purist OO
terminology, though, so using it would probably be counter-productive
unless you have a rather puristical target audience.


"Consumer" is the best I've come up with so far, but it's not quite
perfect either.

I'd avoid that except where there is a clear producer/consumer
relationship.


It's probaly best to ring the changes: "calling code", "user code", and
"client code" (depending on context, and eliminating " code" where you
can to avoid repetition) when you are talking code-centric. "User",
"provider", "producer/consumer", "sender/caller", when you are talking
objects.

Oh, one last point. If you are talking objects, then very
anthropomorphic language is useful. "The the user[*] of the logging
package should tell the logger where to place it's output by calling
outputLocation(). The caller should pass the name of an existing
directory as parameter. Note that, by default, the logger will not
modify any existing files in that directory. If you wish to change
that behaviour then you can replace the logger's default
FileManagermentStrategy by..."

([*] note the deliberate ambiguity, or rather the deliberate refusal to
distinguish between the object which interacts with the logger and the
person who programmed its behaviour.)

-- chris
.



Relevant Pages

  • Re: client to client remote desktop encryption
    ... have the info for client to server and server to client i need info on ... ventilation; avoid extreme temperatures and store in a cool, ... away from open flames, naked flames and old flames; avoid inhaling fumes; ...
    (alt.os.windows-xp)
  • Re: Enable a service for interaction with the desktop
    ... not going to support his option in Vista. ... that you avoid using Interact with Desktop as it is NOT reliable if your ... Good luck, but if you can avoid any interface interaction via your service, ...
    (microsoft.public.dotnet.general)
  • Re: Avoiding security dialog when automating Outlook
    ... I'm using Outlook 2003. ... If your Outlook client is talking to an Exchange server in-house, ... allow the client to avoid this dialog. ...
    (microsoft.public.fox.programmer.exchange)
  • RE: Question - Plain Text
    ... This thread is getting complex - I want to avoid any reconfig of the Outlok ... 2003 client and make the fix global in scope ... (Under MIME I have it set to "Provide message body as plain text" and under ... "Ian McCulloch" wrote: ...
    (microsoft.public.exchange.admin)
  • Re: Large content in fluid layouts...
    ... seem to end up making my pictures smaller to avoid the trouble. ... Or I set a min-width based on larger pictures. ... beforehand what size stuff the client is gonna put on the page. ... table that's even wider, the column *will* drop. ...
    (alt.html)