Changes between Initial Version and Version 1 of Ticket #284, comment 6
- Timestamp:
- 20.07.2012 05:23:28 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #284, comment 6
initial v1 5 5 This 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`). 6 6 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 `P ostCreateTopic`". 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`?)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 `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`?) 8 8 9 9 As you said before, it's a matter of taste.