views:

56

answers:

2

Are you tired of the alway old Manager and Handler classes? Used all ...Thing, ...Dingus, Doodad, ...Entity, ...Gizmo or ...Object Suffixes? I certainly am and did.

So here I want to collect usefull Classnames.

I think this Article described it best:

Do not use “Manager” or “Helper” or other null words in a type name.

If you need to add “Manager” of “Helper” to a type name, the type is either poorly named or poorly designed. Likely the latter. Types should manage and help themselves.

So here the first few:

  • Mailbox
    • Handles Messaging
  • Messenger
    • Serves Notifications or other kinds of Messages
  • Dashboard
    • Presents Data
  • Renderer
    • agregates/builds Data

I'm not really sure where to put "Widget" Good or Bad? Also I'm currently searching for names for classes that:

  • Authenticate with a server (Bouncer?)
  • track changes on data
  • holds and keeps track of documents
  • manages Dialoges
A: 
  • Holds and keeps track of documents

Seriously, DocumentManager. Nothing is ever cut and dry. Or depending on your needs, simply List<Document>.

Matthew Scharley
a class commonly used to keep track of documents needs to be able to do things like: onBeforeDocumentChanged do something. That class will probably use a collection but isn't one itself (at least not a pure one) because it needs to contain buisnesslogic.Manager is a bad suffix because if you start with that you will have lots of Managers. DocumentManager, ConnectionManager, DataManager I can think of thousands like that. Why is that bad you ask? well isn't the Manager part kind of redundand now that almost every class is one? "Types should manage and help themselves"
Sven Hecht
+1  A: 

This is a fun, yet delicate part of design. For me, it changes over time as design and requirement changes occur.

  • Authenticate with a server (Bouncer?)

SecurityGuard

  • track changes on data

VersionTracker

  • holds and keeps track of documents

DocumentOrganizer, FileCabinet

Kevin Swiber
I like FileCabinet and SecurityGuard.
Sven Hecht
In this case, isn't Organiser a synonym for Manager?
Matthew Scharley
@monoxide: I would normally agree but in this case it could also mean a FiloFax like thingie, so I would argue: its gray
Sven Hecht