Book a Demo

Author Topic: Classes realized by a component  (Read 6238 times)

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Classes realized by a component
« on: February 26, 2008, 10:06:56 pm »
I remember the bad old days with Rose, where the properties dialog for a component used do have a "Realizes" tab in which I could assign classes. And on reverse engineering COM DLLs Rose used to create a component for each DLL and assign all the classes to it.

Now EA does not create components at all. But sometimes we need them, e.g. for a deployment diagram.

So how does everybody assign classes to a componet in EA?

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Classes realized by a component
« Reply #1 on: February 26, 2008, 11:01:14 pm »
Not that I've done much architecture recently but didn't we just drag em and drop em from the project browser?


Seriously, I'm sure that this is the way I used to do it, and I'm about to move a bit up into the deployment / architecture modelling arena again.  
So  I surely hope I wasn't dreamin...


b
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

thomas.kilian

  • Guest
Re: Classes realized by a component
« Reply #2 on: February 26, 2008, 11:38:47 pm »
Droping a class into a component would mean it's available only therein. But classes are reusable. So I suggest to use simply a Realize relationship.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Classes realized by a component
« Reply #3 on: February 27, 2008, 12:02:38 am »
Or perhaps a composite structure diagram, ala the UML 2.x version.

This could work well with both drag and drop and realize relationships.
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Classes realized by a component
« Reply #4 on: February 27, 2008, 12:40:50 am »
Dropping a class onto a component creates a part, which has the class as property type. But the property type is not visible on the diagram, so that's not what we want. And it's a lot of work, since we would have to give these parts names.

Looks like a realize connector is the easiest way.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Classes realized by a component
« Reply #5 on: February 28, 2008, 09:48:23 am »
Quote
Dropping a class onto a component creates a part, which has the class as property type. But the property type is not visible on the diagram, so that's not what we want.
The Feature Visibility dialog (Ctrl+Shift+Y) has an option "Show element type (Port and Part only)" in the bottom right corner. Or the global setting is at "Tools > Options > Objects > Port and Part type visible by default".
« Last Edit: February 28, 2008, 09:49:00 am by KP »
The Sparx Team
[email protected]

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Classes realized by a component
« Reply #6 on: February 28, 2008, 06:47:20 pm »
Quote
The Feature Visibility dialog (Ctrl+Shift+Y) has an option "Show element type (Port and Part only)" in the bottom right corner. Or the global setting is at "Tools > Options > Objects > Port and Part type visible by default".

Ah, that's better. So parts are an option after all.

But it would still be a lot of work, so I guess we will use Realize connectors. The scenario is this:

We are planning a product to be implemented with C#, and it will use some of our own old DLLs as well as third party stuff. So we import the binaries and then add packages for the libraries to be, perhaps already giving them a couple of classes to show a rough outline and get an estimation for the time needed. What we definitely want to have there are dependencies (which library uses which other one), and deployment scenarios to be supported, so we can see where we will need remoting  or web interfaces or whatever.

Now binary import does not create components, only packages representing namespaces, so the information is missing which DLL contains which classes. It's no problem for our own libraries cause we've always stuck to the "one dll - one namespace" principle (saves a lot of trouble and confusion). But third party libraries not always do, so we may need to introduce components when we want to show how the libraries need to be deployed.

I think we will simply use a Realize connector from component to package where dll and namespace are equivalent, and component to class where a namespace is spread over more than one dll. This may not be the Queen's UML, but it will save a lot of time.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Classes realized by a component
« Reply #7 on: February 28, 2008, 10:46:33 pm »
Quote
...
Ah, that's better. So parts are an option after all.

But it would still be a lot of work, so I guess we will use Realize connectors....

I think we will simply use a Realize connector from component to package where dll and namespace are equivalent, and component to class where a namespace is spread over more than one dll. This may not be the Queen's UML, but it will save a lot of time.
Which pays the bulldog, as far as I'm concerned.

The realize relationship will be explicit, which will help you if you later extend the model through automation.

Having to individually set visibility - or do so through automation but have to resize each element manually - is just not a go for larger models.

David
No, you can't have it!