Book a Demo

Author Topic: Relationship between classes and dlls  (Read 2200 times)

jrEA

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Relationship between classes and dlls
« on: February 08, 2007, 09:54:39 am »
How can I represent a relation between the classes that I have created and the dlls were they are going to be deployed.  I'm assuming I can use the component model to diagram the dlls, but I want to link that component to the classes in the class model.  Is there a way to do that?

thomaskilian

  • Guest
Re: Relationship between classes and dlls
« Reply #1 on: February 08, 2007, 02:14:13 pm »
Why not simply draw a dependency between both?

jrEA

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Relationship between classes and dlls
« Reply #2 on: February 08, 2007, 02:28:18 pm »
Right now I have created the class diagrams and a package per each namespace.  But I do not know how or where to specify that specific classes are going to be in a dll, I'm assuming I do that in the component model but do not know how to do the link

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Relationship between classes and dlls
« Reply #3 on: February 08, 2007, 03:04:10 pm »
Here's my interpretation of the UML answer to your question:

Your DLL file will be represented by an Artifact element. There will be a Manifestation connector from the Artifact element to each of the Components that make up the DLL. There will be a ComponentRealization connector from each of the constituent Classes to the Component.

Now here's the fun bit: The UML 2.1 spec says "A component realization is notated in the same way as the realization dependency (i.e., as a general dashed line with an open arrow-head)." but that's exactly how a realization ISN'T notated. So if you believe UML 2.1 when it says it's notated the same as a realization, use a realization, but if you believe UML 2.1 when it says it's an open arrow-head, use a dependency (as Thomas suggested). Neither is incorrect because a ComponentRealization IS-A Realization IS-A Abstraction IS-A Dependency.

I hope that's not too muddy :)
« Last Edit: February 08, 2007, 04:19:30 pm by KP »
The Sparx Team
[email protected]