Author Topic: Synchronization of interfaces  (Read 8425 times)

drampulla

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Synchronization of interfaces
« on: September 21, 2007, 08:43:33 am »
It would be a very convient feature if EA would remember which methods are realized from an interface and update them in the realized classes when the interface changes.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronization of interfaces
« Reply #1 on: September 22, 2007, 10:49:19 am »
One of the Sparxians posted an explanation of Sparx' reasoning about this issue some time back. You'll have to search for it, but it might be worth your time.

If I remember correctly it was kind of a catch-22. There were compelling problems no matter which way they went.

David
No, you can't have it!

thomaskilian

  • Guest
Re: Synchronization of interfaces
« Reply #2 on: September 24, 2007, 12:23:19 am »
Search for posts from sargasso with keywords "interface contract"

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Synchronization of interfaces
« Reply #3 on: September 24, 2007, 01:36:43 am »
I say nozzing,

...

yet awhile


bruce   ;D
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

drampulla

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Synchronization of interfaces
« Reply #4 on: September 24, 2007, 03:54:25 am »
I found this posting:  http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1132682437;start=2#2

I understand that I can redo the the overrides on a per class basis; however it has the following limitations
1. If methods are renamed, it doesn't rename the method, but instead adds an entirely new method
2. Requires a manual step on every class that realizes this interface to get it to update

I guess what I'm asking for is that internally EA maintains the knowledge that methodX in the class actually came from overriding interfaceY's methodX1.   Then whenever methodX' changes, those changes get reflected in all the derived classes' methodX.  


ocroquette

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: Synchronization of interfaces
« Reply #5 on: September 26, 2007, 02:32:27 am »

I vote for this feature too!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronization of interfaces
« Reply #6 on: September 26, 2007, 02:49:00 am »
Tricky, but it would be nice to have.

EA would have to maintain some additional state information during the session, but what's wrong with that?

Add my vote!
No, you can't have it!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Synchronization of interfaces
« Reply #7 on: September 26, 2007, 03:19:23 am »
No, No, No, No ... No

Let me put it as simply as I can.

The probability of breaking an entire model, build, system, if this was allowed is approximately 99.9997%

:( :( :( :( :( :( :( :( :( :(

What is needed (IMO) is a way to define an interface as being in "prototype" mode.  If so, then changes to the interface should raise big ugly red blobs all over any and all affected classifiers affected.  Then, if it's not in prototype mode changes should be disallowed with 150kV through the keyboard should any idiot try to change it.

While in prototype mode, EA should not change, alter, modify, stuff around with or even think about any affected element.  No name changes, no signature changes, no nothing.

I have seen this happen in three major projects. Some monkey decided that the declared interface "wasn't exactly what he needed" and changed it.  I'd guess the total cost of this was around $AU150k, after we stuffed around for days trying to figure out why libraries no longer compiled, builds broke etc etc.

Changing an interface is a major architectural decision, e.g. lets just change "+" to always return a single precision floating point ..... or maybe define collections to hold a maximum of 1 element ... or strings to be a zero delimited array ...  or "iSerialable.write" to output in EBCDIC.

Do you understand yet???

bruce
« Last Edit: September 26, 2007, 03:22:56 am by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

drampulla

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Synchronization of interfaces
« Reply #8 on: September 26, 2007, 05:27:32 am »
With all due respect the problem you described was not a problem with the tool, it was a problem in the process.  A tool's purpose is to make my job easier to perform, not to restrict me from doing things; unless those things I want to do are completely illogical.  Changing an interface is a perfectly logical operation.  Interfaces change all the time as a product or a design evolves and it would be nice if the tool automated some of that for me.  It sounds like what caused the problem described above was a breakdown in the process.  Someone should have been approving/reviewing changes to the model before it could impact the build process. There should also have been a dependency report generated which would have indicated all the modules/classes/components/whatever that would have been impacted by this change and it would have been rather obvious that all the compilations errors arose from
those classes listed in the dependency report.  Don't get me wrong, I'm not trying to tell anyone how to do their job or follow a process.  I'm just saying different people have different needs and restricting a tool shouldn't be the first response.  I think the first response should be "What do I need to do in my process to enforce this restriction?"

My 2 cents (and obviously I still want the feature  :) )

ocroquette

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: Synchronization of interfaces
« Reply #9 on: September 26, 2007, 07:19:26 am »
Quote
Some monkey decided that the declared interface "wasn't exactly what he needed" and changed it.  


This has nothing to do with updating the implementation classes automatically when configured so.

The issue you mention can be avoided by :
1. forbidding changes to the interface in the tool
2. forbidding changes to the interface in the review process

To implement 1. you propose to have "locked" interfaces. Why not, but it has nothing to do with the original issue.

By the way 2 is a valid option too.

Quote
Changing an interface is a major architectural decision


Not always, for example if you are in preliminary design phase or have control of all the depencencies.
(no, UML is not used only in giant project with big money)

But even when it's a major change in the project, it can be a necessary change. Then it's nice to have support from the tool to make it easier.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Synchronization of interfaces
« Reply #10 on: September 26, 2007, 08:54:28 am »
You are ALL right...

We need the tool to supply the controls when the controls need to be applied and to make it easy when we want to make it easy...  It's a balancing act; but a balance, in my view, that IS achievable.

However, to do this requires, I believe, a fundamental change to the way in which EA considers and implements both Realization (copying) and Inheritance/Generalization/Specialization (making available).  Not to mention the changes the the way in which EA handles model evolution overall.

When I've had to manage evolvability of cascading concepts, I've tended to adopt sargasso's approach...  Show what would change as a result and get humans to confirm/deny the change on an affected case by affected case basis.  I have also allowed the automatic application in certain cases - however that required new transformation geometries which EA doesn't yet support.

My suggestion is to start a new thread in the UML category to think about and investigate this.  Needless to say, I previously had one (about 2 years ago) which started to address these questions, [size=13]Generalization vs Realization [/size].

We can either continue/resurrect that one or start another.  But we need to provide clear guidance to Sparx if we are to achieve our collective aims (which, as I said above, I believe is possible).

Paolo
« Last Edit: September 26, 2007, 08:55:26 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Synchronization of interfaces
« Reply #11 on: September 26, 2007, 08:57:02 am »
Paolo makes this seem like quite a quagmire.

IMHO he's got it exactly right; murky as it seems, it couldn't be clearer.

David
No, you can't have it!

cuninghamd

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Synchronization of interfaces
« Reply #12 on: September 28, 2007, 04:43:17 am »
gets my vote

midshipman

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Synchronization of interfaces
« Reply #13 on: October 31, 2007, 02:09:24 am »
I agree with drampulla!!

I will love this feature although it seems difficult to implement it...