Forums Register Login

Name uniqueness in UML

+Pie Number of slices to send: Send
Hi All!

Could anybody help me with short question about UML: is it possible to have class and component with the same name? UML 2.0 specfication says that element name should be unique in package, but can I have SomeService component (shown in component diagram) which is implemented in SomeService class (shown in class diagram)?

Thank you in advance,
Rob
+Pie Number of slices to send: Send
If the interface and the implementation have the same name, they must be in different packages. At the very least, you may need a SomeService interface and a SomeServiceImpl class.

If you put the components in different packages it is valid. It might be immensely confusing, but it's valid.

-Cameron McKenzie
+Pie Number of slices to send: Send
Hi!

If your component is an EJB, you must represent it in both component and class diagram, with the same name...


[]'s
+Pie Number of slices to send: Send
Hi!

So, if component is EJB, should I show SomeService interface and SomeServiceBean in class diagram and SomeService component in component diagram as follows:

Class diagram:


Component diagram:


Is it correct that SomeService component name will not conflict with SomeService interface name?

Thank you in advance,
Rob
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 742 times.
Similar Threads
Part II diagrams
code for component
SCEA Part II
need help with Together Designer
Session Bean details in Part 2
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:16:11.