How can I version software components in Sparx Enterprise Architect (EA)? - components

I am working at modelling a software system using Sparx Enterprise Architect 13. This system contains different versions of software components. We typically add services and/or APIs when we release a new version of a software component.
Currently, to reflect the fact that component ServiceV1 exposes an interface A and ServiceV2 exposes interfaces A (the same as ServiceV1) and B, I make ServiceV2 extend ServiceV1. But that is not straightforward:
the generalization link is not available in diagrams between components, so I have to use Advanced > Parent...
it lacks flexibility, because I cannot override interface A with a newer version of the interface
Is there a better way to do so? What is the standard way of maintaining several versions of the same component?
Thank you!

I don't think this is standardized by some standards body, but I would recommend to introduce two levels of abstraction: the unversioned component level and the versioned component level.
On the unversioned component level, you have just a single element in the project repository for each component (not for each component version).
On the versioned component level, you have a single element in the project repository for each version of each component.
Each versioned component, e.g. MyComponentV2 has a ≪trace≫ dependency to the unversioned one, e.g. MyComponent.
To prevent unnecessary design work, you may decide to draw relationships between different components only between versioned component elements, not between unversioned component elements, or only vice versa. But this depends on the needs of your organization.
When you create a new version of a component, you copy the most recent version of the component (MyComponentV2) with all its connections, including the ≪trace≫-dependency to the unversioned component (MyComponent) and give it the right name (MyComponentV3).
I have applied this in a large project.

Actually there is no standard for modeling such a scenario. At best you can have conventions - which may differ from domain to domain. However, here's how I would model it:
ServiceV2 has a <<trace>> relation to ServiceV1. UML 2.5.1 says on p. 682:
«Trace» | Abstraction | Specifies a trace relationship between model elements or sets of model elements that represent the same concept in different models. Traces are mainly used for tracking requirements and changes across models. As model changes can occur in both directions, the directionality of the dependency can often be ignored. The mapping specifies the relationship between the two, but it is rarely computable and is usually informal.
So that should mean in this context ServiceV2 is created using ServiceV1 (I formerly used <<derive>> here since it seemed logical. But actually the UML semantic is defined differently; see p. 680 of UML 2.5.1). You could well invent your own stereotype here and explain it in the domain context (e.g. <<version of>>).
You would probably create a copy of ServiceV1 or model it manually as new element (you don't do that on a mass scenario, do you?). Here I added provided interfaces that both realize the common interface A. The quick linker does not offer those relations. You need to either go the clumsy Ctrl-I way or you grab the realization from the toolbox.
The <<derive>> dependency is not offered directly (unless you have your own MDG and defined it in QL or toolbox). So you create a dependency and choose derive from the stereotype menu.
This is a broad field and versioning is not as simple as just adding a numbering schema. In any case if you create a new component it will be something different. So the <<derive>> is probably the best option here.

EA supports this. See documentation of "Time aware models" here:
https://sparxsystems.com/enterprise_architect_user_guide/13.0/model_domains/time_aware_models.html
Allows maintaining separate versions of each package

Related

Should access to properties of other classes through association be made explicit or are they implicit?

I'm working on a project where I'm using an SDK that provides things I need via some classes. I've named these ProviderProvider and Provider, that grant access to OneThing that is an IThing.
An example is shown here
.
My question is: What is the correct (or best) way to show that the Model provides the list of OneThings to the View through those classes?
Do you show this explicitly as in my example, by drawing a dependency arrow from Model to OneThing? That doesn't seem right to me and quickly becomes visually cluttered.
Do you not explicitly define that relationship, but is it simply implicitly defined through the other relationships?
Do you define that relationship semi-explicitly through attributes, notes or some other way?
What relations and attributes should I add/remove specifically and why?
You already have the implicit relationship since you use this class as a type of data returned by Model so you do not need to add that relationship explicitly.
It may be useful though, especially for classes that are core in the system, to add a diagram with dependencies only. Then you don't care about relationships between other classes, you only show on one diagram all classes that depend on the core one (it may be even more than one diagram).
One hint - in Case tool (like EA) even if you don't intend to show the relationship on the diagram since it is indicated implicitly it is still good to create the explicit dependency and just remove the arrow. This will support the traceability through tools like traceability matrix or dependency tree.

Linking a Provided Interface to a definition in Sparx Enterprise Architect (EA)

I defined my software system using EA. I stayed mainly at the high level so far. The software interfaces between my components are represented as Structural Elements "Provided Interface" (the little purple bullets) and "Required Interface" (the little sockets).
Now, I would like to go a little bit further into the details, and define the API corresponding to each of these Provided Interfaces, ideally as a class diagram. It would be perfect if I were able to create a nested composite structure diagram for each of these Provided Interfaces, like for software components for example. But it seems that EA does not enable that.
What I do is that I create an Interface nested in my software component, then I link the Required Interface (the purple bullet) to my Interface (purple square) with a Dependency link. Then I can create a nested composite structure diagram in my Interface. But I doubt this is the optimal method.
Can someone tell me what is the "EA-approved" way of defining Required Interfaces ?
Thank you :)
You can directly select the Interface in the ProvidedInterface or RequiredInterface without needing to explicitly create a Realize or Dependency connector to the target interface.
You can do this as shown in the figures below:
One advantage of this is that you do not have to show the actual target interface on the same diagram as the components while still being able to navigate to them. This becomes handy when you have components that provide or require many interfaces (and you do not want to clutter your diagram). With this approach you can use the Find | Locate Classifier in Project Browser context menu and directly jump to the composite diagram.

can Classifier that realize a Componet be shared?

In UML 2.5, it is written : A component acts like a Package for all model elements that are involved in or related to its definition, which should be
either owned or imported explicitly. Typically the Classifiers that realize a Component are owned by it.
So if we need to modeled that a set of classes are used to realize two different components, we have to use something like a packageMerge ?
For example, how to model two components, one dedicated to CRUD operations, the other dedicated to reports, and that these two components use the same set of classes to check access rights ?
I found two solutions, which one is the best for you ?
model three components, one for the CRUD, one for the reports, one for the access rights and model dependencies between each one. But the classes used to check rights are not a component as UML defines a component.
model two components and a package rights containing the classes and model that the two components depend of this package
I wouldn't be too dogmatic in such a case:
The String class is used in both components. Whether you merge it or not is sort of a question for configuration management. So would you link a binary or do you have sources that are being compiled where you can use either component independently. The question should be: who is the reader for this construct? If you have a clear picture you could detail it. Else just leave it open as shown above.

Organizing diagrams in Enterprise Architect

Is it possible to somehow organize my diagrams in Enterprise Architect? We're starting having too many of them, with each diagram containing many elements. Is creating a separate folder for each diagram the only solution to make the model easier to see through, or is there a more elegant layout for that?
In the first place, Model Views will help you to create distinct viewpoints representing your entities from different perspectives.
If you stick to the architecture principles of loose coupling and modularity, you should be able to split up very big diagrams into smaller ones. After all, their role is to give you an idea of how things are coupled and work together, but also to abstract from things that are not really relevant in the given context of the diagram. Diagrams are not meant to just visualize all elements in one big picture.
You can create package structures that are pretty complex and then use the model search. You can also put hyperlink elements for easier navigation between diagrams.
If you have to split up elements into different diagrams (which then go into different packages) EA will preserve their relationships and you can review them at any time using the traceability view.
I would also have a look at the EA options for composite diagrams. This should help you re-organise a Single System into a number of Composite Sub-Systems.
To start modeling an application architecture, you can use a perspective based approach or a view modeling perspectives approach to describe your system. For example use the 4+1 view based approach to collect your Logical, Development, NonFunctional and Requirements perspective. Organize it according the mentioned dimmensions or decompose each dimmension by the application modules and have a conceptual view to have a global view of your system.
To start with a model of an enteprise architecture use for example the togaf dimensions or zachman framework layers and dimmensions
You can use several packages to categorize your content.
I use to make a package diagram on top level which dynamically updates its contents depending on underlying packages (simply drag & drop the packages in the package diagram)
and the content (e.g. for activity diagrams) like entry or final can be saved in a common package.
Unfortunately there is no possibility yet (version 10 build 1004) to customize the packages e.g. with colors. So that a common packages could have a distinct color.
What I do to make Project Browser more organized is to create one package named "Diagram's elements" and drag all the diagram element there.
There's some good advice in this blog on the Sparx Systems (the EA publisher) website.

Components in Component Diagram UML

I am very confused on what are these "components" should be. I am just starting with UML by the way. I don't know what components should be used or be place in the diagram. I've searched for definitions about these components and they are very hard to understand. Can you please explain it in a very simple way on what these components should be?
P.S.: This component diagram will be about a website. A planner website.
I can't post what I had in mind because I am a new user and new users aren't allowed to post images.
The way I think of them is as a large, logical, chunk of the functionality of a system; a bit like that which might be found in a single library or a .jar file. They tend to be associated more with software intensive systems distributed over multiple nodes (computers) and locations. They idea is that they interact, mainly, through well defined interfaces and that they can be replaced or "swapped out" with another component that will do the same job. An example would be changing to a different database management system, or updating some hardware drivers.
Components are used most in component and sequence diagrams.
I believe there is a debate as to what the real the differences between components and classes are. Both are specialisations of the concept of a classifier in UML
In your case —without knowing much about the specifics— you might have the following components with interfaces between them:
a web client component
a business/problem logic component or components
some sort of data management component.
At the end of the day though, you use the UML in whatever way works for you. A simple software project might not benefit at all from using component diagrams. It's up to each project team to define what context and level of abstraction they are working at and choose diagram types accordingly.

Resources