If I want to start my project defining component diagram, and defining the relative behaviour diagram, starting from the components, how can I do it?
For example sequence diagram can be defined only between classes? or also between components?
Since a class can’t be include other class, I can’t be able to define a sequence since I haven’t defined all the classes.
And if I define a component through a class in order to realize a sequence, do I lost trackability?
Thank you for your post. Generally, sequence diagram can defined the interaction between classes and instances but not specific for components.
In fact, a sequence diagram focuses on the message interchange
between a number of lifelines. It describes an interaction by focusing on the sequence of messages that are exchanged, along with
their corresponding OccurrenceSpecifications on the lifelines.
If you really want to show the interaction between components, you can still use sequence diagram. However, the lifelines won’t have reference to the components. For alternative, you can manually add shape reference to link up the lifelines and the components.
You have mentioned “a class can’t be include other class” in another question, could you clarify what “include” means?
If there are any further inquiries, please feel free to contact me.
Hi LilianWong thank you for your answer.
In order to define my problem better, I make myself clearer.
I want to model a problem in a top-down way.
[ul] So initially I want to define the usage requirements of the domain.
I suppose that use case could fit well with this purpose.
[list] Then I want to define - at a high level - the structure and the behaviour - of my solution/problem/domain.
I suppose that component diagram could fit with the structure purpose because I haven’t yet in mind the class inside each component while I know that there will be a relationship between them (the interface)
While I would have a behavioural diagram to define an high-level flow between each component in order to realize a use-case. I thought that a sequence diagram could fit with this purpose.
For example- (LEVEL 0) I want to model a file sharing application and initially I want to say that there is a client and a server and I want to realize the relationship between this two “component” in order to highligh how to realize the login use case.
(LEVEL 1) Then I want to define better each “component”, in fact a client is composed by different “component”: I have a SIM card, a softphone, a phonebook,…
I would like to highlight the relationship between these internal component of the client.
(LEVEL 2) The softphone is composed by other modules (classes?): for example an authentication module, a security module, a session management,…
I would like to highlight the relationship between these modules inside the softphone.
At the end of this procedures I would like to obtain automatically one overall structural diagram and one behavioural diagram.
In fact once defined the thee levels, I have defined the behavioural between each module inside of a component, and the behavioural between each component and the behavioural between each macro-component, so I shoud have the overall behavioural of the solution, isn’t it.