|
It is currently Mon Feb 06, 2012 3:31 am
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to RHAPSODY4YOU
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today. |
 |
|
 |
|
| Author |
Message |
|
shanz
|
Post subject: Component Diagrams Posted: Thu Jun 26, 2008 9:23 am |
Joined: Wed May 07, 2008 3:50 pm Posts: 147 Location: Horsham, W Sussex, England
|
|
How do I use an Executable, library and 'Component Interface'?
I have a 2 working projects with some common classes which I want to move into a library.
I use ports and interfaces in my projects.
Project1
__Classes
____MyClassP1
____MyClassCom
______Operations
________MyIntOpCom()
__Interfaces
____IMyInterfaceCom
______Operations
________MyIntOpCom()
Project2
__Classes
____MyClassP2
____MyClassCom
______Operations
________MyIntOpCom()
__Interfaces
____IMyInterfaceCom
______Operations
________MyIntOpCom()
Now realising I have common classes I thought I'd create a Library.
I drew a Component Diagram with a <<Library>> realizing a Component Interface - <<Interface>>,
and an <<Executable>> USING (ie <<Usage>> ) the Component Interface.
The User Guide says,"Component Interfaces and Realizations
An interface between components is a set of operations performed by a hardware or software
element in the system. A component realizes an interface if it supports the interface;
another component then uses that interface. Interfaces promote design modularity;
components are more easily replaceable when they use interfaces instead of directly
depending on components. Component interfaces can be seen only in a component diagram
they cannot be viewed in the browser. A component diagram supports only interfaces between
components."
But I can see my Component Interface appear in the browser alongside all my other interfaces.
My questions (at last!) are ...
What do I put in my Component Interface?
Do I COPY all my (abstract) interface operations from the common interfaces (eg:
MyIntOpCom()) into the new (component) interface?
ProjectUsingLibrary
__Classes
____MyClassCom
______Operations
________MyIntOpCom() - concrete realisation of the interface
__Interfaces
____IMyInterfaceCom
______Operations
________MyIntOpCom() - abstract
____IComponentInterface
______Operations
________MyIntOpCom() - abstract
I hope someone can help!
|
|
|
|
 |
|
Farquad
|
Post subject: Posted: Thu Jun 26, 2008 9:53 pm |
Joined: Thu Sep 13, 2007 7:34 pm Posts: 397 Location: London
|
|
I'm not sure exactly what you're asking but I've attached an example of using a lib from another project.
Component = binary.
Last edited by Farquad on Fri Jun 27, 2008 6:14 pm, edited 1 time in total.
|
|
|
|
 |
|
shanz
|
Post subject: that helps Posted: Fri Jun 27, 2008 10:14 am |
Joined: Wed May 07, 2008 3:50 pm Posts: 147 Location: Horsham, W Sussex, England
|
|
Thank you for your reply and the example; it is useful to me.
I have just noticed a tip that appears in the status bar when you hover over the interface icon in a Component Diagram, it says:-
"Draw an interface, then identify it with an existing interface or with a
new one\Interface."
I assume I identify it with an existing interface by just giving it the same name. This actually then agrees with the User Guide in that nothing new is added to the Rhapsody browser.
I guess the purpose of the Component Interface is to diagrammatically document the library's interface methods, so someone using the library doesn't have to dig into the library code itself to work out how to use it.
I think my problem with this whole interface idea is that I expect to see a single interface on the Component Diagram but I've actually got several.
I'll just draw all of them and give it a go!
Anyone else ever used these interfaces on a Component Diagram?
|
|
|
|
 |
|
Farquad
|
Post subject: Posted: Fri Jun 27, 2008 1:17 pm |
Joined: Thu Sep 13, 2007 7:34 pm Posts: 397 Location: London
|
|
In order to model the interfaces available into a 'component' I would use a structure class with port(s).
The structure class could be made available via a library component (binary) but a binary is defined by its scope rather than diagrammatically.
I think the term component is misleading and confuses within Rhapsody. Especially when you also consider composition relationships as well. I never use either term.
Component = binary (lib or exe)
Composition = Part
Component with interfaces = class (or block - SysML)
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|