interface dependencies in component diagrams black-box view

Please use this forum for open discussions about Bouml.
Merci d'utiliser ce forum pour des discussions ouvertes à propos de Bouml.

interface dependencies in component diagrams black-box view

Postby adi » Mon 29 Sep 2014 21:38

Looks like BOUML provides a nice interface for component diagrams with assembly connectors in black-box view. I wonder if there is a way to represent these component dependencies trough interfaces. I am able to place component symbols in a component diagram but don't see any way to place interface symbols and link them with inheritance or dependency arrows.
Also, it is there any way to show a component with an artifact compartment, besides provided interfaces and required interfaces compartments?

All The Best,
Adi
adi
 
Posts: 8
Joined: Tue 9 Sep 2014 17:58

Re: interface dependencies in component diagrams black-box v

Postby Bruno Pagès » Tue 30 Sep 2014 12:19

I am not sure to understand what you expect.

Component and artifact diagrams do not allow to represent classes (out of hack using picture insertion)

The drawing setting "show required/provided interfaces" and "show realizations" allow to show expected compartments both in component and artifact diagrams

Bruno
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 686
Joined: Mon 20 Feb 2012 09:23
Location: France

Re: interface dependencies in component diagrams black-box v

Postby BartN » Thu 15 Apr 2021 19:24

To quote the first question "I am able to place component symbols in a component diagram but don't see any way to place interface symbols and link them with inheritance or dependency arrows."
When you draw two new components in a component diagram, there is no way to draw a connection between these two components, either starting from a provided interface or a required interface from the toolbar. It always returns the error "no provided interfaces". True but not helpful. In the component dialog it is also impossible to add a required or provided class, or something useful for an interface. How is this supposed to be used to define interfaces between components?
BartN
 
Posts: 2
Joined: Thu 15 Apr 2021 12:19

Re: interface dependencies in component diagrams black-box v

Postby Bruno Pagès » Thu 15 Apr 2021 20:01

It always returns the error "no provided interfaces". True but not helpful

What did you expect, to have both the list of already declared provided/required more the list of all the other classes existing in the model ?

In the component dialog it is also impossible to add a required or provided class, or something useful for an interface.


When you edit a component and you go in one of the tab required/provided/realizing class, on the left part you have the list of existing classes not already present in the list on the right part.

To add or remove class(es) in one of these list just select the class(es) you want on the list and use the button to move them from the left to the right or the reverse depending on what you want.

Note you can filter the classes on the stereotype.

I do not propose to create a new class to add it on the list on the left because I have no way to know in which class view the class must be created, so the component dialog manages only existing classes.
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 686
Joined: Mon 20 Feb 2012 09:23
Location: France

Re: interface dependencies in component diagrams black-box v

Postby BartN » Sat 17 Apr 2021 14:36

Thanks for the prompt reply.

First off, i started modelling the components of an existing system, before defining the main classes of the implementation.

If a component model is not explicitly related to an implementation, i expect that a component is not synonymous for a class or package or ... In the component diagram, one can define a component from scratch so i expected that one can also define an interface from scratch.

Following your line of reasoning,
- if an interface should be selected from a predefined class, why is a component not related to a predefined package, class, or ... ?
- what is the difference, or similarity, between a class and an interface? In Java for example, a class and interface are different things.
BartN
 
Posts: 2
Joined: Thu 15 Apr 2021 12:19

Re: interface dependencies in component diagrams black-box v

Postby Bruno Pagès » Sat 17 Apr 2021 16:21

BartN wrote: i expect that a component is not synonymous for a class or package or ...

I do not understand what you mean by synonymous in that context

BartN wrote:In the component diagram, one can define a component from scratch so i expected that one can also define an interface from scratch.

When you create a component through a component diagram that new component is placed in the component view where the component diagram is, so the container is known, but a class/interface cannot be in a component view so to create a class/interface from a component diagram requires to indicate in which container (class view or use case view or class), this is not practical and I do not allow that.

Note it is the same concerning a component to show in a deployment diagram, the component must already exist and you cannot create a component from a deployment diagram.

BartN wrote:- what is the difference, or similarity, between a class and an interface? In Java for example, a class and interface are different things.

In UML an interface and a class are different things too, an interface is a classifier while a class is a structured classifier.

In BoUML an interface is a class stereotyped interface (in UML interface is a keyword, not a stereotype, but I do not distinguish in BoUML), this is compatible with the notation in a class diagram, and that simplifies both the implementation of BoUML and the use of BoUML for instance to transform a class to an interface or the reverse. Note also interfaces do not exist in C++ and Python but BoUML allows to generate code for several languages from the same elements.

Note for the similar reasons in BoUML an actor is a class stereotyped actor (again actor is a keyword and not a stereotype in UML)

BartN wrote:- if an interface should be selected from a predefined class, why is a component not related to a predefined package, class, or ... ?

Then in the component dialog (or elsewhere) you select predefined classes and may be some of them are interface because of their stereotype (keyword), so finally you directly select interfaces or classes and not an interface from a class ... or I don't understand well what you said.

I am not sure to understand what you mean by related, but may be what I written above cancel your question, anyway because a component is placed in a component view itself placed in a package (may be the project being the root package) a component is 'related' to its containing package.
ImageAuthor of Bouml
Bruno Pagès
 
Posts: 686
Joined: Mon 20 Feb 2012 09:23
Location: France


Return to Open discussions / Discussions ouvertes

Who is online

Users browsing this forum: No registered users and 1 guest

cron