To be technically OO correct, interfaces define operations and 
classes define methods; interfaces define what can be done by other 
classes and classes provide methods on how it is done. I believe if 
you look in the UML spec definitions under operations and methods you 
can see this distinction. Also, CORBA IDL _does_ provide for 
_attributes_, however these are merely shorthand for getter and 
setter operations and have other problems. The lesson learned should 
be that if you really understand that the attributes to an interface 
map to getters and setters you might be okay. This doesn't mean that 
you would want to actually have fields that must map to fields in the 
implementing class. Java won't let you do this. Basically, I agree 
with the advice and steer clear of the attributes in interfaces and, 
if you have to, use explicit getter and setter operations.

Regards,
Don Bate

At 2:50 PM -0800 3/29/01, William Blew wrote:
>On Thu, 29 Mar 2001, Rich Denis wrote:
>
>>  Why is it not reccomended to add attributes as part of an interface?  If I
>>  createan interface in Rose and "realize" that interface in another class
>>  then only the Operations show up.  When I read the Online Docs under
>>  interface it says that Attributes as part of the interface is not
>>  recomended?  Why is that?? And is there any way to force the attributes to
>>  be inherited within the Rose IDE
>
>IHO, at least one reason is that typical subsystem implementation
>technologies such as COM and CORBA don't provide for interface attributes.
>
>Further, there may (I'm not sure) be C++ implementation constraints that
>preclude interface attributes, given the basic "subsystem replacement
>without client package recompile" requirement.
>
>Finally, from rose's perspective; it implements the UML, and the UML 1.3
>specification is very clear on what an interface is:
>
>"An interface is a specifier for the externally-visible operations of a
>class, component, or other classifier (including subsystems) without
>specification of internal structure."
>
>       last paragraph, page 3-46 of OMG-UML V1.3, available at:
>               ftp://ftp.omg.org/pub/docs/formal/00-03-01.pdf
>
>Unfortunately, the UML spec doesn't provide any rationale...
>--
>William Blew, [EMAIL PROTECTED] Gamer by Choice, Geek by Birth
>
>
>************************************************************************
>* Rose Forum is a public venue for ideas and discussions.
>* For technical support, visit http://www.rational.com/support
>*
>* Admin.Subscription Requests: [EMAIL PROTECTED]
>* Archive of messages: 
>http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
>* Other Requests: [EMAIL PROTECTED]
>*
>* To unsubscribe from the list, please send email
>*
>* To: [EMAIL PROTECTED]
>* Subject:<BLANK>
>* Body: unsubscribe rose_forum
>*
>*************************************************************************

-- 
Don Bate               | Specializing in Consulting and Mentoring in
Bate Consulting, Inc   | Object-Oriented Technologies,
                        | Software Architecture, and Software Process
(972) 618-0208 voice
(972) 618-0216 fax
[EMAIL PROTECTED]
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to