Book a Demo

Author Topic: Component vs classes  (Read 4932 times)

MichaelB123a

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Component vs classes
« on: July 10, 2015, 08:54:49 pm »
Hi,

I'm developing a system model and as a non-developer I tend to be interested in applications, hardware or just logical "things" rather than a class meaning an actual OO class. So I've set out doing most of my modelling using components.

However, every now and then I encounter something which makes me think I should maybe use classes instead.

Specifically, EA doesn't allow me to use composition and aggregation associations between components. I can show a single component inside another component (assuming this is the closest thing to composition) but I want to be able to show multiplicity. e.g. server A comprises several instances of application A each of which talks to single application B. I realise I might have to separate my structure from my messaging (I'm actually keeping messaging more abstract and just using associations labelled "sends messages to"), but is a component diagram the best way of showing these things? Or, if I want composition multiplicities, should I be using classes?

Sorry - a bit rambly and maybe unclear! Please let me know.

Appreciate any help with this.

Thanks,

Michael

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Component vs classes
« Reply #1 on: July 11, 2015, 12:50:16 am »
I'd recommend you to have a look into EA's example model: Help/Open example model. They have a couple of things that might inspire you.

q.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Component vs classes
« Reply #2 on: July 14, 2015, 07:16:33 am »
Sounds like you need to read a bit more on UML. Lots of books out there.
Happy to help
:)

MichaelB123a

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Component vs classes
« Reply #3 on: July 15, 2015, 01:17:54 am »
Hi,

Thanks for your replies. I have seen the example model - specifically the component diagram in the UML section. Confusingly though, this does show aggregation associations - one even looks like composition!? But I can't seem to generate these type of associations myself between the same objects.

On the book front, unfortunately the ones I've read, including online resources, are as unhelpful as the last comment. They mention that a component generally has a larger responsibility or scope than a class (which is why I'm using them), but don't describe why I can't show composition and/or aggregation like I can with classes, specifically as I need to show multiplicity.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Component vs classes
« Reply #4 on: July 15, 2015, 01:31:43 am »
You can get the composition connector from the UML/Class toolbox. No idea why it's not the component toolbox.

q.

MichaelB123a

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Component vs classes
« Reply #5 on: July 15, 2015, 01:57:06 am »
Found it now, thanks.

I generally assume (maybe incorrectly) that if EA won't let me do something, then it's not supported in the UML spec.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Component vs classes
« Reply #6 on: July 15, 2015, 06:06:55 am »
In many cases that's true, but I guess not in all. The quick linker and toolboxes are designed to offer you the most needed elements/connectors quickly. I guess only where it explicitly tells you with a message "the operation/move is not UML compliant" it's what EA tells you.

q.
« Last Edit: July 15, 2015, 06:07:39 am by qwerty »