Author Topic: What the benefits of RootNodes?  (Read 6819 times)

steen.jensen

  • EA User
  • **
  • Posts: 181
  • Karma: +8/-1
    • View Profile
What the benefits of RootNodes?
« on: September 24, 2020, 07:53:06 am »
Ouer Repository is based on 4 different RootNoods (I was earlier in beleef that there was a good point to separate stuff in different RootNodes)

Have used Sparx EA for about 5 years, but Im still strugling why we have RootNods..... Any hidden Gem ??

It only gets in the way for the users and me as administrator:
- Long branches as the RootNod needs the Viewpackets before any usefull modeling stuff
- Cant Publish (HTML report) more than a singel RootNod at same time
- Cant Export/Import more than one RootNod at same time
- and some more issues.....

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: What the benefits of RootNodes?
« Reply #1 on: September 24, 2020, 08:47:56 am »
Root and View are just heritage. They once might have been nice ideas. But basically they should all be just (stereotyped) packages. Root nodes also have extra spice in not having an element pendant. Sparx dust.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What the benefits of RootNodes?
« Reply #2 on: September 24, 2020, 10:22:28 am »
Our Repository is based on 4 different Root Nodes (I was earlier in the belief that there was a good point to separate stuff in different Root Nodes)

Have used Sparx EA for about 5 years, but I'm still struggling why we have RootNods..... Any hidden Gem ??

It only gets in the way for the users and me as administrator:
- Long branches as the RootNod needs the Viewpackets before any useful modelling stuff
- Can't Publish (HTML report) more than a single Root Node at the same time
- Can't Export/Import more than one Root Node at same time
- and some more issues.....
(my emphasis)

Yeah, that's a b*mmer!

BTW our repository currently has a dozen Root Nodes!

Paolo
« Last Edit: September 24, 2020, 10:24:57 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: What the benefits of RootNodes?
« Reply #3 on: September 24, 2020, 08:29:49 pm »
Hej!


As Q said, roots and views are still in there for historical reasons. There's no UML reason for them: the UML standard says nothing about the organization of elements, packages and diagrams, leaving it entirely up to the toolmakers. Sparx have removed the earlier restriction on moving packages to the view level and vice versa, so that's a step in the right direction, but it's still an archaic pair of concepts.

In practice, root nodes are different from other packages in that they are not backed by an element. In EA, most properties (such as tagged values) belong to elements, and (non-root) packages have a double nature in that they are both a package and an element. This way, packages can have tagged values, can be the endpoints of connectors, and can be shown in diagrams -- but root nodes can't.


Now if I may be permitted some musings on the subject --

All trees must have a root. That's just the nature of the beast. The problem is that EA hasn't made up its mind whether the browser shows one tree, or several trees.

If it's one tree, then there should be no difference between a root node and other packages. There is then an actual root node which is the parent of all the packages you see at the top level, but this actual root node is hidden from view.
It need only be a package (not a package and an element), so the equivalent of the current root nodes. It should always have ID 0 and not be deletable, and the Repository.Models API call should return the children of this hidden root node.
This would make it possible for the highest-level visible packages to contain diagrams, have connectors and tagged values, be shown in diagrams, etc.

You should be able to do most package-related things to the hidden root, including import, export, version control, baselines, etc. You could access these functions in the browser by right-clicking the "Project" tab of the browser window itself. Alternatively, you could access them by right-clicking an empty area with nothing selected (it should then also be possible to explicitly select nothing in the browser).

If on the other hand the idea is that the browser shows several trees, then there needs to be functionality restricting the use of elements between trees (connectors between elements in different trees, showing an element from one tree in a diagram belonging to another, using an element from one tree as a RefGUID tag in an element belonging to another, etc), to make sure such use is strictly one-way.
You would then also need to restrict the movement of packages, elements and diagrams between trees, to make sure the one-way-use rule would not be violated.

The idea here is that a tree represents a unit of modelling (arbitrarily large) which has some management rules associated with it. This makes it a stronger concept than the current root node, which is just a package that's not quite a package.

Neither suggestion would be a simple change. There might well be weird stuff related to root nodes (and views, still) deep in EA's core code. But it could be worthwhile. I think the first idea, with a single hidden package-only root node, probably has the least impact, and is also at the end of the day probably the better one.


Indepentently from those lofty ideals, it would make sense to just drop the view level already, and at the same time introduce the option of showing an arbitrary icon in place of the current view ones. This icon should be shown within the outline of a package symbol, and be overridden as necessary (eg version-controlled packages).

I'm not sure whether browser icons are in fact supported for package stereotypes, but since you can't selectively switch off presentation of package stereotype names in the browser (got a suggestion coming up about that), it would be useful not to have to introduce a package stereotype just to show a different icon -- which is all that views do anyway.

Thank you for tuning in to today's episode of Screaming Into the Void.


/Uffe
My theories are always correct, just apply them to the right reality.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What the benefits of RootNodes?
« Reply #4 on: September 24, 2020, 09:06:30 pm »
It's not screaming into the void.

I don't agree that where there are multiple roots, inter-branch connections shouldn't be allowed.  Each root-based branch in our repository is NOT a unit of modelling, but a separation of viewpoints and views in an enterprise-wide setting.

I guess my basic problem (which you hint at in your analysis) is that for a product whose name is Enterprise Architect there is NO REAL support for Enterprise-wide modelling but is actually a simple UML based code generator tool.

To my mind, UML should just be syntax and semantics layered on a more fundamental platform.

Anyway, it is what it is and is unlikely to change soon (if ever).

I believe the "thought experiments" such as you and I engage in help us as users (probably more than it provides input to Sparx).

Keep up the great work!

Paolo


« Last Edit: September 24, 2020, 09:08:02 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13402
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What the benefits of RootNodes?
« Reply #5 on: September 24, 2020, 09:08:25 pm »
I it were up to me, I would simply do a away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What the benefits of RootNodes?
« Reply #6 on: September 24, 2020, 09:09:46 pm »
I it were up to me, I would simply do away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert
Yes...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: What the benefits of RootNodes?
« Reply #7 on: September 24, 2020, 11:29:13 pm »
Casandra calling. Oh? I have a twin out there?

Yes, please get rid of these dinosaurs. Leave just packages. Whether I see the wood or single trees first in the browser? Kinda philosophic. I guess seeing single trees and having the earth below hidden would be ok. Makes it still a bit like it's ever been. But roots should be fully fledged packages. And maybe you just can adorn *any* package with those view icons. That way one can live like in the old days. Or see the whole thing as something more consistent.

q.

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Re: What the benefits of RootNodes?
« Reply #8 on: December 20, 2020, 11:02:31 pm »
Another constraint with root nodes is that you can't create any diagram in these.
This is really annoying and that really does no make sense to me.

There should be only packages and that's it (agree with Geert).

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1323
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: What the benefits of RootNodes?
« Reply #9 on: December 22, 2020, 02:46:59 pm »
I it were up to me, I would simply do a away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert
I concur
Happy to help
:)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: What the benefits of RootNodes?
« Reply #10 on: December 22, 2020, 07:23:36 pm »
I it were up to me, I would simply do a away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert
I concur
+1

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: What the benefits of RootNodes?
« Reply #11 on: December 22, 2020, 07:57:13 pm »
I it were up to me, I would simply do a away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert
Of course that would break the neat trick with hiding project settings in the (currently) invisible root notes.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13402
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What the benefits of RootNodes?
« Reply #12 on: December 22, 2020, 08:09:28 pm »
I it were up to me, I would simply do a away with the concept of root nodes, and only use regular packages everywhere.

If they want to show a different icon for root packages, then they can detect that by the parentID being 0

Geert
Of course that would break the neat trick with hiding project settings in the (currently) invisible root notes.

q.
Indeed, but at least we could move those to tagged values then. (now not possible since root nodes can't have tagged values)

Geert