Book a Demo

Author Topic: Diagram specific objects - Why?  (Read 12468 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Diagram specific objects - Why?
« on: April 04, 2017, 11:07:32 am »
I'd been using Sparx EA for over a decade before I came across the notion of "Diagram Specific Objects".  In case you don't know what they are, if you copy the items on a diagram and paste into another using "links", things like Notes, Texts and Boundaries (I don't know if I've covered everything) are NOT pasted as links, but as NEW objects in that diagram.

This was a big surprise to me!  Somehow or other, in my 10 years of (fairly carefully) reading the EA documentation, I'd managed to miss it.  Perhaps someone could point me at the reference?

Anyway, at an enterprise level, this is anathema!  Especially for re-use. Users are expecting that if they change the text of a note on one diagram, it will change in the other diagrams they've put it on.  We also encourage the re-use of Boundary objects, but that's difficult since they're unique to diagrams.

We have implemented technologies to reverse this "feature" of EA and the only object that is diagram specific is the Title Block (so-called Diagram Note Element).

Can anyone explain the rationale behind diagram specific objects (apart from Title Blocks)?

TIA,
Paolo
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: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram specific objects - Why?
« Reply #1 on: April 04, 2017, 04:37:20 pm »
Paolo,

Most users consider the "Diagram specific" objects to be local to the diagram.
Maybe your users are different from others, but when one of my users copies a diagram and changes the text on a note, he's not expecting the text on the note of the original diagram to be changed.
This is the same with most of the "Diagram Specific" elements, and I think Sparx got it good on this one, making the application do what the average user expects it to do.

So Sparx, please don't change this behavior because Paolo is wining about it  ;D

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram specific objects - Why?
« Reply #2 on: April 04, 2017, 04:41:37 pm »
1) Geert (or anyone) Can you point me at the documentation where "diagram specific objects" are described?

2) Since when has Sparx changed functionality just because I'm whining about it?   :o

Paolo

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: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram specific objects - Why?
« Reply #3 on: April 04, 2017, 05:01:49 pm »
1) Geert (or anyone) Can you point me at the documentation where "diagram specific objects" are described?

2) Since when has Sparx changed functionality just because I'm whining about it?   :o

Paolo
1) probably nowhere, at least I haven't stumbled upon it yet
2) probably never, but "better safe than sorry"  8)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram specific objects - Why?
« Reply #4 on: April 04, 2017, 07:00:44 pm »
Hmm. When I copied a note from one diagram to another, t_object still had a single Note element. So it's actually a link.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram specific objects - Why?
« Reply #5 on: April 05, 2017, 09:44:53 am »
Hmm. When I copied a note from one diagram to another, t_object still had a single Note element. So it's actually a link.

q.
Hi q,

Exactly How did you do that?  We certainly have multiple copies of the same note in the repository.

I'll have a go myself when I get to work.

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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Diagram specific objects - Why?
« Reply #6 on: April 05, 2017, 11:10:03 am »
My base guideline is if it isn't shown in the project browser it should behave like it can only exist on one diagram.

If something creates a link instead of a copy, it's asking for trouble. (Things like when the owner of the parent diagram is removed EA can't tell if you've used it elsewhere and will delete all links)

Personally, I regularly copy text/note elements and change the text in the copy. I would probably lose significant work before I realised what was happening if this changed.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram specific objects - Why?
« Reply #7 on: April 05, 2017, 03:45:35 pm »
My base guideline is if it isn't shown in the project browser it should behave like it can only exist on one diagram.

If something creates a link instead of a copy, it's asking for trouble. (Things like when the owner of the parent diagram is removed EA can't tell if you've used it elsewhere and will delete all links)

Personally, I regularly copy text/note elements and change the text in the copy. I would probably lose significant work before I realised what was happening if this changed.
Ahh... We get around that by creating Neighborhood diagrams for the Note element etc.  We also move the Neighborhood diagrams to their allotted place in the browser and move the Note element to the same package.  That way the parent diagram only disappears when the item is purged (explicitly).

Once we noted that EA deleted all the links, we instituted this mechanism.  YMMVWFU.

But thanks for the guideline, it will help our users understand what may be happening.

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: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram specific objects - Why?
« Reply #8 on: April 05, 2017, 06:25:36 pm »
I simply selected a Note, pressed Ctrl-C and issued a Ctrl-V on another diagram. That made the Note appear as link. I went a step further and deleted the original diagram. The linked Note however still was present.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram specific objects - Why?
« Reply #9 on: April 05, 2017, 07:06:10 pm »
I simply selected a Note, pressed Ctrl-C and issued a Ctrl-V on another diagram. That made the Note appear as link. I went a step further and deleted the original diagram. The linked Note however still was present.

Yes, but if you Ctrl-Delete the Note in one diagram you lose it in both.

It seems like when a diagram is deleted, all its diagram objects (t_diagramobject) are deleted, then the corresponding elements (t_object) are checked and if any of them are diagram-only elements whose reference count is now 0 (ie they're no longer shown in any diagram), they get deleted. Kinda like hard links in a file system.

The multiple-reference-to-diagram-only-elements feature can be useful in specific circumstances, especially if you combine it with "link to element feature" -- similar to the multiple-elements-with-the-same-composite-diagram feature. But I only tell clients about these features if they are seriously proficient EA users. Novices (and sometimes ten-year veterans :) ) just get confused.

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram specific objects - Why?
« Reply #10 on: April 05, 2017, 10:10:27 pm »
Yes, but if you Ctrl-Delete the Note in one diagram you lose it in both.
Of course. That's the intention of doing that. Doing the same with any object will do that.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram specific objects - Why?
« Reply #11 on: April 06, 2017, 09:33:17 am »
I simply selected a Note, pressed Ctrl-C and issued a Ctrl-V on another diagram. That made the Note appear as link. I went a step further and deleted the original diagram. The linked Note however still was present.

q.
q, I don't think this proves anything. Since in BOTH scenarios, new copy and link, deleting the diagram should leave the other behind.  The test for whether you have a link or a copy is changing the text of the Note.

However, I'll conduct some more tests when I have the time...

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: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram specific objects - Why?
« Reply #12 on: April 06, 2017, 05:57:20 pm »
The deletion was just to make sure that th Note is not bound to the diagram itself only. Usually when you delete a diagram, the note is deleted along with it (you just don't see it). EA seems to take care deleting orphans correctly.

Being link or not can be seen only by comparing the GUID in the Properties/Project dockable window.

I still think that the browser-invisibility is the crux. It should be an option one could turn off.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram specific objects - Why?
« Reply #13 on: April 06, 2017, 06:01:03 pm »
[SNIP]

I still think that the browser-invisibility is the crux. It should be an option one could turn off.

q.
Agreed!

Paolo
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: Diagram specific objects - Why?
« Reply #14 on: April 06, 2017, 07:01:23 pm »
I still think that the browser-invisibility is the crux. It should be an option one could turn off.
q.
Agreed!
Paolo

In that case, I think that diagrams in the browser should be expandable nodes with the diagram objects inside.

Most diagram-only objects already have icons (the "diagram property note" as added from the Diagram menu does not, but I think that's the only one), so it'll be simple enough to tell proper elements from diagram-only objects.

Diagram objects which are filtered out should be greyed-out.

The project browser context menu for a diagram object should include Find in All Diagrams, Locate in Project Browser and Locate in Current Diagram.

Pressing Delete with a diagram object selected in the project browser should behave the same as in a diagram.
Pressing Ctrl-Delete with a diagram object selected in the project browser should have no effect.

Or something along those lines, yes?

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