Author Topic: EA should use relative paths per default  (Read 10675 times)

Philipp

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
EA should use relative paths per default
« on: March 07, 2006, 09:41:57 am »
I can't think of a single reason why EA uses absolute paths per default. I'd say that...

- nearly nobody moves the model file around on his or her machine (like "oh, it's tuesday, I'll copy the model file to another drive and start it from there!").
- nearly every developer (or team) deals with different project root folders on different machines.

I know it's possible to get EA to work with relative paths by setting up local paths. However - to me, this just looks like a hack that covers an early misdecision which has been carried from release to release.

And it really doesn't feel like a big question to ask - EA is my only tool that uses absolute paths (I'd go crazy if I had to setup project paths for every solution in my IDE). And that's the one thing that I keep hearing from every person that I recommended EA to (which happens quite a lot  :)).

Thanks for your feedback,
Philipp
« Last Edit: March 07, 2006, 09:42:24 am by philipp »

thomaskilian

  • Guest
Re: EA should use relative paths per default
« Reply #1 on: March 07, 2006, 12:51:58 pm »
I'd appreciate that too. Maybe Sparx can add an option to turn this behaviour on/off.

Btw. There's more heritage. Take the icons for New Diagram and New Element. Have a sharp look at both. Don't you think they should be exchanged?

abb

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: EA should use relative paths per default
« Reply #2 on: March 08, 2006, 02:44:38 am »
Yes this will be definitely a good feature.

If you work in a team you will always have different paths to the files. Actually it is complicated to handle this.

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: EA should use relative paths per default
« Reply #3 on: March 08, 2006, 07:30:38 am »
Actually I think EA should go a little further, and maybe define some kind of 'project container' folder.

This would allow files from different subsections/subprojects of your model to reside relative to different folders (as appropriate).

The folders themselves could then be assigned
a) paths relative to each other and then finally b) absolute paths.

Allowing folders to be defined globally (for all users) or locally (per user) would permit sharing of global resources using globally defined folders; work on a subproject could proceed using a folder mapped to the local filesystem for the current user.

You could even protect global resources by setting the folder read-only.

In essence, a basic 'virtual folder' mechanism.
Or maybe this is over-the-top ?!

Philipp

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: EA should use relative paths per default
« Reply #4 on: March 08, 2006, 08:23:38 am »
Quote
In essence, a basic 'virtual folder' mechanism.a
Or maybe this is over-the-top ?!


A little, maybe? ;)

Wouldn't you get the desired behaviour anyway if EA would use relative paths per default? In case of global resources, links couldn't be expressed relatively anyway (unless your model file is on the same share) and you'd get absolute paths for these (and only these) resources.

As a comparison: You can include arbitrary projects in a VS.NET solution, no matter where they are located (above or below the solution file). VS.NET stores all links using relative paths, so I can check out the whole project folder to a different machine and start working.
However, if I link to a resource on another drive (e.g. a project referernce to a DLL in C:\Programs folders), this results in an absolute link.

Cheers,
Philipp

thomaskilian

  • Guest
Re: EA should use relative paths per default
« Reply #5 on: March 08, 2006, 12:06:23 pm »
Quote
...

You will certainly be pointed to the Local Paths option by Sparx. A default for relative paths would be easily implementable, I guess.

Philipp

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: EA should use relative paths per default
« Reply #6 on: March 09, 2006, 10:12:09 am »
Quote
You will certainly be pointed to the Local Paths option by Sparx. A default for relative paths would be easily implementable, I guess.


I'm not so sure about that. If it were easy to implement, I assume Sparx would have done it quite a while ago (or at least added an option to enable/disable relative paths) rather than introducing the Local Paths hack and write whole tutorials about it  ;)

However, I keep asking myself why they did it that way in the first place ???

Cheers,
Philipp

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: EA should use relative paths per default
« Reply #7 on: March 09, 2006, 02:15:33 pm »
Local paths were added primarily to support different paths to the same source for people sharing a model on different machines.

It also works regardless of whether an eap file or repository is being used.

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: EA should use relative paths per default
« Reply #8 on: August 15, 2007, 04:58:31 pm »
Quote
Local paths were added primarily to support different paths to the same source for people sharing a model on different machines.

It also works regardless of whether an eap file or repository is being used.


I am being faced with this problem at the moment and I donot see how the Settings/Local Paths facility helps. This is what I believe Simon has refering to but not what others were refering to by "Local Path". The Settings/Local Paths are only viable for generated source files and version control; you cannot use these defined Local Paths to specify a path to a file in the Files tab on an element property dialog - or can you? If so, how?

The question is - on the file tab of an elements property dialog how can you specify a path that is not absolute?

Mark.
Cheers, Mark

thomaskilian

  • Guest
Re: EA should use relative paths per default
« Reply #9 on: August 16, 2007, 08:52:19 am »
(How come, this thread is on top without new post?)

One pound more from me. Sparxian, go for that!

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: EA should use relative paths per default
« Reply #10 on: August 16, 2007, 11:56:17 am »
Quote
Have a sharp look at both. Don't you think they should be exchanged?
On my (v7.0.815) version, the icons look fine.

"New Diagram" is a group of interconnected boxes (i.e. a diagram of related several modeling elements).  "New Element" is a single box with compartments, kind of like a class box; this implies (to me) a single modeling element.

.. makes sense to me :-/

gary

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8597
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: EA should use relative paths per default
« Reply #11 on: August 16, 2007, 01:03:00 pm »
Quote
Take the icons for New Diagram and New Element. Have a sharp look at both. Don't you think they should be exchanged?
Thomas,

If you mean the ones on the Project Toolbar/Ribbon then I'd have to agree with gary - they seem reasonable to me.

Paolo
(No, this is NOT a fake - Paolo agreeing with an EA UI approach)
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: EA should use relative paths per default
« Reply #12 on: August 16, 2007, 01:10:35 pm »
That was an intervention from one year ago (the icons did change meanwhile).

I was going for the relative path, though!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8597
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: EA should use relative paths per default
« Reply #13 on: August 16, 2007, 01:17:36 pm »
Quote
That was an intervention from one year ago (the icons did change meanwhile).
[size=10](my empahsis...)[/size] Cunning of Sparx...

Anyhow, the outcome is what's important!

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

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: EA should use relative paths per default
« Reply #14 on: August 16, 2007, 02:57:51 pm »
Quote
(How come, this thread is on top without new post?)

There was a new post that brought it to the top - from me on Aug 15. :)

The icons are fine, that's not the issue.
The issue is the lack of a relative path mechanism on the file tab of element properties.

Mark.  
Cheers, Mark