[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Methods in the NIM requirements



Let me try describing how I look at this to see if it will help you.
I strongly agree that we want operations in the modelling tool kit we use.

Attributes and operations are two ways of describing the interfaces that an 
object makes available.  Some things are most easily thought of using 
attributes.  Others are much more easily described as operations with 
parameters, results, and semantic effects.

When I build actual objects, I almost always hide the attributes 
completely, and use specific accessor operations.  But that is not because 
I want to hide the existence of the attribute.  It is because the languages 
all end up exposing more than just the attribute when I expose an 
attribute.  To retain my flexibility of implementation, I hide that under 
an accessor.  But in the kind of information model we are talking about, we 
do not have this drawback.  So we can use the power of both the attriubte 
semantics and the operational (method) semantics where each is appropriate.

Yours,
Joel M. Halpern

At 03:56 AM 4/18/00 -0400, Weiss, Walter wrote:
>I am really struggling with this thread. Here is my basic problem. In many
>of the models I have seen (including some I have worked on), a class is
>defined with a set of attributes that can be manipulated to affect
>particular changes in the system that the object is meant to model. Hence,
>the set of attributes provide an interface to the system being described. In
>contrast, traditional OO design approaches suggest that an object has a set
>of attributes that are not directly accessable except with the use of
>methods. Hence, the method is the interface to the object (and therefore the
>system). If we want to incorporate methods in the NIM requirements, then the
>methods should represent the primary interface, obviating the need for most
>attributes (except as parameter definitons for the methods).
>
>regards,
>
>-Walter