Loading ...
Sorry, an error occurred while loading the content.
 

metaphors for class names

Expand Messages
  • florian
    hi! does anybody of you know some good resources concerning metaphors for classnames? or general naming resouces? somehow i cannot come with with very catchy
    Message 1 of 8 , Apr 4, 2003
      hi!

      does anybody of you know some good resources concerning metaphors
      for classnames? or general naming resouces?

      somehow i cannot come with with very catchy names. for example
      i cannot think of a better name than something like .....Manager,
      ....Collection for a class which provide methods to put and get
      objects to a servlets request scope, giving them key with a special
      prefix and other naming conventions.

      ciao!
      florian
    • William Pietri
      ... Aside from using a thesaurus, which I recommend highly, Stephen Glazier s book Word Menu is a joy. Even if I don t actually use a name from a reference
      Message 2 of 8 , Apr 4, 2003
        On Fri, 2003-04-04 at 00:18, florian wrote:
        > hi!
        >
        > does anybody of you know some good resources concerning metaphors
        > for classnames? or general naming resouces?

        Aside from using a thesaurus, which I recommend highly, Stephen
        Glazier's book "Word Menu" is a joy. Even if I don't actually use a name
        from a reference like this, just wandering through the possibilities is
        inspiring. As Ron so ably demonstrates!

        William


        --
        brains for sale: http://scissor.com/
      • Alain Ravet
        ... This one is about not overusing xxxManager http://www.cardboard.nu/archives/000023.html ..take a class named UrlManager - you cannot tell whether it
        Message 3 of 8 , Apr 4, 2003
          florian wrote:
          > does anybody of you know some good resources concerning metaphors
          > for classnames? or general naming resouces?

          This one is about not overusing "xxxManager"
          http://www.cardboard.nu/archives/000023.html

          "..take a class named "UrlManager" - you cannot tell whether it pool
          URLs, manipulates URLs or audits the use of them. All the name tells you
          is that this is not a URL, but it does somehow work with them. On the
          other hand, the name "UrlBuilder" gives a much better picture of what
          the class does. "
        • Jonathan Rasmusson
          Howdy, Open source projects are sometimes good for naming conventions. Often a naming convention will follow a pattern (factory, strategy etc). When it come to
          Message 4 of 8 , Apr 4, 2003
            Howdy,

            Open source projects are sometimes good for naming conventions.
            Often a naming convention will follow a pattern (factory, strategy
            etc).

            When it come to metaphors however, I find my customers are the
            best sources of classnames. Building the domain layer in
            words that they understand and relate to it makes life much easier.
            Easier to write tests they understand, easier for them to write tests,
            leads to deeper understanding of the business (abstractions and
            relationships between entities etc). Thats the beauty of the
            metaphor.

            JR

            --- In extremeprogramming@yahoogroups.com, florian <csshsh@s...>
            wrote:
            > hi!
            >
            > does anybody of you know some good resources concerning metaphors
            > for classnames? or general naming resouces?
            >
            > somehow i cannot come with with very catchy names. for example
            > i cannot think of a better name than something like .....Manager,
            > ....Collection for a class which provide methods to put and get
            > objects to a servlets request scope, giving them key with a special
            > prefix and other naming conventions.
            >
            > ciao!
            > florian
          • Charlie Poole
            Alain, ... I worked on one app with a number of such classes. Some of them had a one-to-one relationship with their particular xxx while others managed an
            Message 5 of 8 , Apr 5, 2003
              Alain,

              > florian wrote:
              > > does anybody of you know some good resources concerning metaphors
              > > for classnames? or general naming resouces?
              >
              > This one is about not overusing "xxxManager"
              > http://www.cardboard.nu/archives/000023.html
              >
              > "..take a class named "UrlManager" - you cannot tell whether it pool
              > URLs, manipulates URLs or audits the use of them. All the name tells you
              > is that this is not a URL, but it does somehow work with them. On the
              > other hand, the name "UrlBuilder" gives a much better picture of what
              > the class does. "

              I worked on one app with a number of such classes. Some of them had
              a one-to-one relationship with their particular xxx while others
              managed an entire pool of them. I could never remember which was
              which. So another useful rule is not to use the same nameing pattern
              in two different ways in an application. If you have a UrlXxxxxx and
              a DialogXxxxxx, they ought to do something reasonably similar to
              Urls and Dialogs respectively.

              Charlie Poole
              cpoole@...
            • Alain Ravet
              Non-native English speakers can easily miss the nuances of the language, and misuse it, while trying to be simple and clear. As XP promotes replacing the -
              Message 6 of 8 , Apr 5, 2003
                Non-native English speakers can easily miss the nuances of the
                language, and misuse it, while trying to be simple and clear. As XP
                promotes replacing the - verbose and extensive - documentation by better
                naming, it can be a real problem, of the contagious kind.

                A reference book, document, or even better, Wiki, rich with
                examples, would be a good thing.

                Anybody volunteering? (*)

                Alain Ravet

                (*) native speakers only.
              • robrambusch
                ... How about SASE ? Rob Rambusch
                Message 7 of 8 , Apr 8, 2003
                  --- In extremeprogramming@yahoogroups.com, florian <csshsh@s...>
                  wrote:
                  >[Snip]
                  >....Collection for a class which provide methods to put and get
                  > objects to a servlets request scope, giving them key with a special
                  > prefix and other naming conventions.
                  >[Snip]

                  How about SASE ?

                  Rob Rambusch
                • kevinbsmith
                  ... Yes, I immediately thought envelope . For those who may not know the term, SASE is a self-addressed, stamped envelope. Generally, when you request
                  Message 8 of 8 , Apr 9, 2003
                    --- "robrambusch" <robrambusch@h...> wrote:
                    > How about SASE ?

                    Yes, I immediately thought "envelope".

                    For those who may not know the term, SASE is a self-addressed, stamped
                    envelope. Generally, when you request information or a freebie from a
                    TV show or other company, they expect you to send them a SASE to make
                    it easy and cheap for them to send you the stuff. Since you wrote your
                    own address, it's probably correct.

                    Kevin
                  Your message has been successfully submitted and would be delivered to recipients shortly.