tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Using URL instead of URI in the codebase

Open danielballan opened this issue 2 years ago • 3 comments

There is a saying I heard from @tacaswell, "You make the most critical choices in the design of your project at beginning, when you have the least understanding of your project."

As we clean things up in prep for v0.1.0, I'd like to revisit my choice to use "URI" throughout the codebase, as in from_uri(...) or c.uri or, in the SQL schema, data_uri.

These are URIs but they are also URLs. See URI vs URL for example. And "URL" is a much more familiar term for normal users. If someone says "URL", a scientist might correctly intuit that they can paste that into a web browser or share it with a coworker. The term "URI" is computer science-y and potentially alienating.

If this were an important distinction for our purposes, I would value correctness over all else, but I think in this case "URL" is perfectly correct and also more accessible. Should we deprecate the usage of "uri" and move to "url"?

danielballan avatar Oct 27 '23 14:10 danielballan

To be clear, I think this can be done in a backward compatible way. If we rename columns in the SQL tables, that's a migration of course, but the user-facing Python API can be maintained as an alias or slowly deprecated.

danielballan avatar Oct 27 '23 14:10 danielballan

Sure, probably a worthy change. I, too, am concerned about backwards compatibility at this point in tiled...even though tiled is still in alpha, there seem to be a fair number of projects out there that may be slightly past the kick-the-tires point in commitment.

The place where I think I'd like to keep uri is in linking to external resources within metadata, where there may still be service providers who have legacy location pointers that are uri and not urls.

I paste microsoft example not to promote linking to sharepoint in tiled reference metadata, but merely to show that there are still legacy content systems that have not adopted uri.

dylanmcreynolds avatar Oct 27 '23 15:10 dylanmcreynolds

That makes sense. So, we can still encourage/support the usage of uri within metadata, but as far as the Tiled codebase itself, all usage of URI can become URL.

danielballan avatar Oct 27 '23 16:10 danielballan