Book a Demo

Author Topic: Is a Association a Method?  (Read 8150 times)

Ralph Mücke

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I havn't done it.
    • View Profile
Is a Association a Method?
« on: November 24, 2006, 06:54:08 am »
 ???

I used Rational Software Modeler and want to import a model to EA.

RSM handels Associations (simple Associations, or Aggregations, etc.) as Methods.
:o

Is this actually correct?

In opposite EA presents Associations different. Neither the Project Explorer shows Associations nor shows Associations as Methods.

Furthermore I can't see Association at all in the Project Explorer.

Where can I see Associations?

What's wrong here?

Thanks for your help.

Ralph
Best Regards Ralph

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Is a Association a Method?
« Reply #1 on: November 24, 2006, 03:15:02 pm »
An Association is a link between two objects.  It is definitely not a method.  Therefore, one would not find it in the project browser.  Links appear as a line between the two objects in a diagram.  As normally implemented in code, and depending on the navigation directionalities, links appear as attributes in the associated objects.

I'm really surprised to hear that RSM treats associations as methods.
Verbal Use Cases aren't worth the paper they are written upon.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is a Association a Method?
« Reply #2 on: November 24, 2006, 04:16:05 pm »
Quote
An Association is a link between two objects.  It is definitely not a method.  Therefore, one would not find it in the project browser.  Links appear as a line between the two objects in a diagram.  As normally implemented in code, and depending on the navigation directionalities, links appear as attributes in the associated objects.

I'm really surprised to hear that RSM treats associations as methods.
Most modelling tools DO show Associations in the browser (typically below methods).  They appear twice - once for each end.  That's probably what Ralph is referring to.

When you first come across to EA, it is a bit of a shock not to see them there...  EA's UI (Unique Interface) strikes again.  However, it must be said, that after a while you don't really miss them not being there too much, as other windows DO show them (Hierarchy window [Ctrl+Shift+4]).  But since you can't get at their properties through these windows, it doesn't quite give you the same functionality as the other products.

HTH,
Paolo
« Last Edit: November 24, 2006, 04:16:26 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Is a Association a Method?
« Reply #3 on: November 24, 2006, 04:21:56 pm »
hello

I don't know enough about Java; but 'Getters' and 'Setters' are methods... can remember something about being good encapsulation practise, before we got C# and first class Properties. ::)

And I haven't quite worked out 21 'Owned end' options yet; if it's own then the end belongs to the class otherwise the association; presumably some kind of accessor function would be needed.

Doe's UML say anything about how you implement association in a runtime?

Or am I just rambling, it's gone midnight.

Kevin

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is a Association a Method?
« Reply #4 on: November 24, 2006, 05:17:31 pm »
Quote
hello

I don't know enough about Java; but 'Getters' and 'Setters' are methods... can remember something about being good encapsulation practise, before we got C# and first class Properties. ::)

And I haven't quite worked out 2.1 'Owned end' options yet; if it's own then the end belongs to the class otherwise the association; presumably some kind of accessor function would be needed.

Doe's UML say anything about how you implement association in a runtime?

Or am I just rambling, it's gone midnight.

Kevin
Hi Kevin,

In [size=13]Property Redux[/size] I agree with you that 'Getters' and 'Setters' are just methods (my emphasis).

As to owned Ends...  If the AssociationEnd has a Role, then that End is owned by the Classifier at the other End.  (That's why the dropdown on the Roles shows the opposite End's attributes - but see: [size=13]DB relationships vs UML Associations[/size]).  If the Association has no role on that End, then the End is owned by the Association.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Is a Association a Method?
« Reply #5 on: November 24, 2006, 10:47:12 pm »
Hi'ya Paolo

No typo's this time ;)

I've only just got the help working here, so forgive me if I'm a bit slow.... but have just found this in the help re: Association Properties (or Connection Properties according to the help, in red to boot) for Source and Target Roles



This would seem to apply with or without a role name being provided ,or navigability ??? for that matter.

Is this where we should have the black dot (where the line connects with the classifier) ?

And I do appreciate the ability to be able to specify the member type for the role, in the case of multiplicity being greater than 1.  ;D Just as we get generic collections in C# ( and VB. Net? ).

Mmmm...
Kevin



Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is a Association a Method?
« Reply #6 on: November 24, 2006, 11:42:21 pm »
Quote
Is this where we should have the black dot (where the line connects with the classifier) ?


EA doesn't (yet) support the ownership dot.   The check-box is there to support it when it comes. [Edited in the light of subsequent postings...]  My comments related to the fact that if you selected a role, then you are specifying that the End is owned.  Technically, EA should check that box automatically if you select a role.  Sparx have recently conceded that they should (and will) be synchronizing owned AssociationEnds and Attributes better.  In the meantime - they have (with build 800) added some cross-checking.  This should be included (see below).

I don't know how familiar you are with modelling tools in general, but for the most part, when a tool manufacturer says they support a particular version of a standard they usually mean "What is the absolute minimum I can do and still get away with saying I support it...".

Sparx are no worse than others and better than most...

Put in a formal change request - both for the dot and the checkbox.

Paolo
« Last Edit: November 27, 2006, 02:01:31 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Is a Association a Method?
« Reply #7 on: November 25, 2006, 04:42:50 am »
In a CIM, but also in the context of this thread, what does "ownership" mean?  What difference, to the modeler, does it make which element "owns" an association end or "owns" a role?
Verbal Use Cases aren't worth the paper they are written upon.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Is a Association a Method?
« Reply #8 on: November 26, 2006, 01:02:44 pm »
Quote
EA doesn't (yet) support the ownership dot.   The check-box is there to support it when it comes.

What are you talking about?   ???   If I check that checkbox I get the ownership dot drawn.  I have since the checkbox was introduced.
« Last Edit: November 26, 2006, 01:03:05 pm by simonm »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is a Association a Method?
« Reply #9 on: November 26, 2006, 02:14:45 pm »
Quote
What are you talking about?   ???   If I check that checkbox I get the ownership dot drawn.  I have since the checkbox was introduced.
oops!!  Mea culpa...  I didn't have a copy of EA to check...  I should have waited...   :-[

Nevertheless, I believe my observation regarding the ownership and roles is still valid.

You can have the dot without the role, but is you have the role you must have the dot.

Paolo
« Last Edit: November 27, 2006, 01:58:41 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Ralph Mücke

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I havn't done it.
    • View Profile
Re: Is a Association a Method?
« Reply #10 on: November 27, 2006, 01:28:57 am »
Quote
An Association is a link between two objects.  It is definitely not a method.  Therefore, one would not find it in the project browser.  Links appear as a line between the two objects in a diagram.  As normally implemented in code, and depending on the navigation directionalities, links appear as attributes in the associated objects.

I'm really surprised to hear that RSM treats associations as methods.



MY fault  :'( associations are shown as attributes (not methods). Sorry for the confusion.

Ralph
Best Regards Ralph

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is a Association a Method?
« Reply #11 on: November 27, 2006, 02:17:33 pm »
Quote
In a CIM, but also in the context of this thread, what does "ownership" mean?  What difference, to the modeler, does it make which element "owns" an association end or "owns" a role?
Hi Jim,
I don't think the model level affects the ownership property.  As to what it means, my subsequent post should have sorted that.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!