Book a Demo

Author Topic: Using Interfaces with Components  (Read 6917 times)

DaveNeil

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Using Interfaces with Components
« on: November 24, 2005, 07:53:42 am »
I have created a component which I want to use in a message sequence diagram. I was original intending to use ports, but I think the problem is simpler if I remove the ports.

The component  provides an interface with a single method.
The component implements another interface with a single method.
In the message sequence diagram the only message available on the component comes from the implemented interface.

I would expect that methods on provided interfaces should be usable in the message sequence diagram. Is this an EA limitation, or is this a problem with my understanding of UML?

Thanks,
Dave

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Using Interfaces with Components
« Reply #1 on: November 24, 2005, 02:56:47 pm »
Quote
The component  provides an interface with a single method.
The component implements another interface with a single method.


First things first.

By component do you mean a Component model component?

If so,  there is a difference between an implemented interface and a provided interface even though they look the same on a diagram.

An implemented interface, created by a realisation link gives you the option to override (i.e. implement) the interface methods.  However, if you create it using the "element parent" context menu item (ctl-I) you dont get the option to do the override and will have to do it manually (select component and press ctl-shift-O).

Either way you will end up with a component with methods in its own right.  These should ... let me check... yes they do ... appear in an sd message Operations list.

Now "provided" interfaces on components seem to be a different kind of fish.  I am still struggling to understand their use 2 years down the track.  They seem to be some sort of conceptual level adornment to a component that (IMO) only has use in breaking down assemblies.  They dont seem to add any feature to the associated component. ???


You can check out what I mean by creating a component diagram and "adding" interfaces to a sample component using all the different ways and types.

Then try
1) colouring the component, this will show you some od the strangeness.
2) double click the lollipops - see more strangeness
3) investigate ctl-shift-O
4) dragging the lollipops around the component.
5) adding your interface classes to the diagram and look at their relationships
6) making sense of it all and telling me!!!

hth
bruce
« Last Edit: November 24, 2005, 03:00:53 pm by sargasso »
"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.

DaveNeil

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Using Interfaces with Components
« Reply #2 on: November 25, 2005, 01:38:49 am »
Thanks Bruce,
I have tried all the combinations you suggested and it has left me equally confused.
My only conclusion is that provided interfaces are not fully integrated into the EA models.
They can be used in component level diagrams to show conceptually that something within the component will realize the interface. But if you need to use the components in message sequence diagrams then you need to pretend that the component itself  implements the interface.
Dave.