Changes between Initial Version and Version 1 of Ticket #284, comment 6


Ignore:
Timestamp:
20.07.2012 05:23:28 (9 years ago)
Author:
jri
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #284, comment 6

    initial v1  
    55This determinator-determinant wording pervades the entire DM codebase. There is e.g. a `model` package which contains a `TopicModel` class (almost all classes in the `model` package ends with `Model`). According to your scheme just `Topic` would be a proper name for it. But it's *not* a `Topic` it is a `TopicModel`. (As you know there is also a `Topic` interface and its meaning is different from `TopicModel`). 
    66 
    7 Regarding the listeners the very same rule is applied. Because a class-instance relationship represents an is-a relationship it is consequent to name a class according to a substantive. Thus, you can always say/know: an instance of X *is* an X. I feel that wording supports the API understanding. I don't want say "obj1 is a `PostCreateTopic`". No, it is a `PostCreateTopicListener`. That's the very naming scheme also used e.g. in the java.awt.event package. (BTW: should we rename our `listeners` package to `event`?) 
     7Regarding the listeners the very same rule is applied. Because a class-instance relationship represents an is-a relationship it is consequent to name a class according to a substantive. Thus, you can always say/know: an instance of X *is* an X. I feel that wording supports the API understanding. I don't want say "obj1 is a `PluginServiceGone`". No, it is a `PluginServiceGoneListener`. That's the very naming scheme also used e.g. in the java.awt.event package. (BTW: should we rename our `listeners` package to `event`?) 
    88 
    99As you said before, it's a matter of taste.