Book a Demo

Author Topic: Can a component diagram show components AND classes?  (Read 6148 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Can a component diagram show components AND classes?
« on: January 22, 2020, 03:34:49 am »
I know it is possible in the EA tool, however, is it legal UML to show for example a UML Component, and nested inside you have other UML components AND some classes?

The Autosar standards depict basic software modules for example as components in their BSW modeling guidelines (https://www.autosar.org/fileadmin/user_upload/standards/classic/3-2/AUTOSAR_BSW_EA_UML_ModelingGuideline.pdf). However, another specification, the AUTOSAR UML profile (https://www.autosar.org/fileadmin/user_upload/standards/classic/2-0/AUTOSAR_UML_Profile.pdf) from Autosar models S/W application components as structure classes.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #1 on: January 22, 2020, 04:20:44 am »
Just: yes. You can show (almost) anything in any diagram. OMG tells that explicitely somewhere in the specs. There are only few limitations (from EA?) since SDs will not accept some elements and/or make them life lines.

q.

Richard Freggi

  • EA User
  • **
  • Posts: 498
  • Karma: +18/-7
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #2 on: January 22, 2020, 11:50:32 am »
In UML 2.x components ARE classes.

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #3 on: January 22, 2020, 06:09:51 pm »
Isn't it the purpose of a project or a DSL to explain what it means if elements appear on a diagram?
Afaik the rules defined by UML 2.5.1 are syntactic rules.
What it means if you put a Class in a Component, that is, how you create source code out of this architectural requirement, is up to the project.

That is: UML defines a syntax, the UML user is free to define the semantic.

Although conventions and a common sense built up about what an UML element and relationsships between them should specify.
E.g. fUML v1.4 is a DSL that puts sematics to a subset of UML elements. There I could find the sentence: "Components are entirely excluded as being outside the scope of fUML." A somewhat rigid way to bypass complex definitions.

In my projects I treat UML Components as singeltons: Components are both: an Object and a Class, a one-time instantiated Class. You should not instantiate (but can deploy) severel Objects of the same Component. In my sematics a Class owned by a Component would mean that the Component can be used as a factory for Objects of a certain Class.

Rolf

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #4 on: January 22, 2020, 11:03:58 pm »
From my UML standard interpretation, you can put anything on any diagram kind. Of cause what you mix up should make some sense.
This interpretation comes from this note in the standard:
NOTE. This taxonomy provides a logical organization for the various major kinds of diagrams. However, it does not
preclude mixing different kinds of diagram types, as one might do when one combines structural and behavioral
elements (e.g., showing a state machine nested inside an internal structure). Consequently, the boundaries between the
various kinds of diagram types are not strictly enforced.
Or see here:
https://www.uml-diagrams.org/uml-25-diagrams.html
For a long time EA had almost no diagram restrictions, unfortunately now Sparx started to implement some restrictions, but what is restricted up to now, just makes modeling for me just more difficult.
I do not say that EA should not have more UML compliant restrictions, but Sparx should not implement diagram restrictions not demanded by the UML standard.

Best regards,

Peter Heintz

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #5 on: January 23, 2020, 09:05:50 am »
If EA starts restricting diagram content, then there should be the diagrammatic equivalent of the [ ] Strict Connector Syntax checkbox to allow us to "escape" the standard view.

The restrictions should be thought of as "trainer wheels".  Eventually, you want to be able to do whatever is necessary to get your point across.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #6 on: January 23, 2020, 10:00:12 am »
EA does have the capability now to enforce the elements on a particular diagram. I hope it's more useful than "trainer wheels".

https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/modeling/metamodelsintro.html

In short, you can describe a restricted set of types to be shown for a particular diagram type then apply that to given diagrams. Then optionally you can fade out or hide anything that doesn't match the specified view. ArchiMate and UAF both use this methodologyas part of standard implementation of the language, but you can create custom views for any technology you like.

Richard Freggi

  • EA User
  • **
  • Posts: 498
  • Karma: +18/-7
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #7 on: January 23, 2020, 02:44:41 pm »
Hello Eve,
do I understand correctly from the link you provided that this new feature can create custom toolboxes that only show the UML elements I want, hiding the unnecessary ones?
Such as for example, I want to make a conceptual level class diagram, so I can remove from the toolbox all unnecessary physical level elements.

If this is true then that's a wonderful feature!  I now have to make MDGs just to remove stuff from the toolbox/quicklinks and MDG is a pain in the *****.   Wuld this be applicable by Sparx model? By Package?  Let me know thanks!

EA does have the capability now to enforce the elements on a particular diagram. I hope it's more useful than "trainer wheels".

https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/modeling/metamodelsintro.html

In short, you can describe a restricted set of types to be shown for a particular diagram type then apply that to given diagrams. Then optionally you can fade out or hide anything that doesn't match the specified view. ArchiMate and UAF both use this methodologyas part of standard implementation of the language, but you can create custom views for any technology you like.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #8 on: January 24, 2020, 09:04:26 am »
Yes. You apply the custom view on a per-diagram basis.

The other option in 15.1 is to create one or more strict perspectives. When that perspective is applied it will completely disable creation of new elements outside of the perspective. In addition, you can specify that a particular security group only gets access to specified perspectives.
« Last Edit: January 24, 2020, 09:06:54 am by Eve »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Can a component diagram show components AND classes?
« Reply #9 on: January 24, 2020, 11:02:02 am »
Yes. You apply the custom view on a per-diagram basis.

The other option in 15.1 is to create one or more strict perspectives. When that perspective is applied it will completely disable the creation of new elements outside of the perspective. In addition, you can specify that a particular security group only gets access to specified perspectives.
This is, of course, much better since the modelling architect determines the behaviour, NOT the tool supplier.

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