This might be where the line between analysis and design gets fuzzy...  My
point is the "Role" diagram alone is sufficient to convey the intended
information in both the analysis and design diagrams...

The XOR diagram says: Objects of Class A will have a link to either an
Object of Class B, or an Object of Class C, but not both.

The Role diagram says:  an Object of Class A will have a link to some object
that agrees to fulfill the interface specified by Class R.  In no way does
the Role diagram display the "mechanism" that allows A to talk to either an
instantiated B or C (e.g. some sort of Factory perhaps).  So, its a suitable
Analysis diagram, and a suitable Design diagram because it says what the
developer is supposed to code create in code.

Also, I see the structure of the Role diagram as analogous to a diagram
showing Class A with a relationship to an abstract class X, with two
concrete classes B and C inheriting from X (with a constraint of XOR).

-Tony



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 3:56 PM
Cc: [EMAIL PROTECTED]
Subject: RE: (ROSE) XOR-Constraints




Eh!

Absolutely disagree, unless I am seriously misunderstanding the examples.

The second 'role' diagram is one way (of many) of implementing the first.

Les.



I am curious... why the two different diagrams?  The "Role" diagram conveys
the same information as the "XOR" diagram.  In my opinion, the "Role"
diagram is not necessarily a design-only diagram, and can be used in
analysis.

Opinions?

-------------------------------------------------
Tony Picarello
Engineer
Science Applications International Corp.

Voice: 407-207-2791
Fax:    407-282-4530
Email: mailto:[EMAIL PROTECTED]





-----Original Message-----
From: Thomas Chapuis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 21, 2001 9:54 AM
To: [EMAIL PROTECTED]
Subject: RE: (ROSE) XOR-Constraints



Hi,

When you're in analysis or high level design I think it's better to do what
Huseyin Angay suggest:

         +---------+
         | class A |
         +---------+
          |       |
          |-{XOR}-|
          V       V
   +---------+  +---------+
   | class B |  | class C |
   +---------+  +---------+

When in low level design (just before code generation for that particular
class)
one possible solution is to delegate the XOR management to a "role class":

         +---------+
         | class A |
         +---------+
              |
              V
         +---------+
         | class R |   class R is a "role" and is "realized" in B XOR C
         +---------+
             /_\
              |
          +---+---+
          |       |
   +---------+  +---------+
   | class B |  | class C |
   +---------+  +---------+

Regards,

Thomas

At 2/20/01 10:00 AM +0000, Angay, Huseyin (Huseyin)** CTR ** wrote:

>Hi Jan..
>
>I guess you are referring to the XOR constraint between associations. That
>is, there is a link to an instance of one class or another, but not both.
>
>You can show this as a dependency between the two associations. Name the
>dependency {xor}.
>
>Note that I used the expression "show" rather than "model" as Rose ignores
>this dependency as far as code generation is concerned. It is a visual
clue
>for the developers only. The attributes will be generated for both
>associations (which is correct). You will need to manually manage the code
>that ensures the exclusivity.
>
>
>Best regards,
>Huseyin Angay
>
>Karabash Ltd.
>www.karabash.co.uk
>
>> ----------
>> From:         [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
>> Reply To:     [EMAIL PROTECTED]
>> Sent:         19 February 2001 11:05
>> To:   [EMAIL PROTECTED]
>> Subject:      (ROSE) XOR-Constraints
>>
>>
>>
>>
>>
>> Hy,
>> has anybody an idea to model XOR-Constraints with Rose.
>>
>> viele Grüße Jan
>>
>> Jan Binder
>> DB AG - Lufthansa Systems AS
>> PFI CIO Datenmanagement
>> Mainzer Landstr. 222-224
>> Telefon 069/265-30690
>> Telefax 069/265-30400
>>    Mobil  0172/4144356
>> e-mail [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
>> *
>>
*************************************************************************
>>
>************************************************************************
>* 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
>*
>*************************************************************************

************************************************************************
* 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
*
*************************************************************************
************************************************************************
* 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
*
*************************************************************************





************************************************************************
* 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
*
*************************************************************************
************************************************************************
* 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