Custom URL scheme should be Custom URI scheme?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Custom URL scheme should be Custom URI scheme?

Post by sphere » Sun Dec 17, 2017 1:01 pm

Hi,

When building for mobile, either Android or iOs,
should Custom URL scheme actually be named Custom URI scheme?

Because a URL points at an certain address like http://thiswebadress.com/thisfolder
and for URI thiswebaddress would be sufficient

An URL is an URI, but an URI is not an URL perse. URL is for Location and URI for Identify

i'm asking because i read some about the exact differences on the web and also according this lesson:
http://lessons.livecode.com/m/4069/l/58 ... rl-schemes you only need to use the first part like thiswebaddress://

Why? because URL would tell me i could enter an location thus an URL to get the app activated, but in fact it is the URI which i need to use.
Correct naming would clear up some confusion.

Am i correct? If not then please correct me.
Except for the lesson there seems no info about this in the User Guide.

If i'm correct then i will create a bug report to get this URL replaced by URI, just to get rid of confusion.

Thanks!
Sphere

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom URL scheme should be Custom URI scheme?

Post by FourthWorld » Sun Dec 17, 2017 5:02 pm

In this case I believe LC made the right choice: while "URI" may a better fit for what it does, in tech writing I've only seen that used in Microsoft docs and a few others; most iOS and Android references I've seen use "URL".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Custom URL scheme should be Custom URI scheme?

Post by sphere » Sun Dec 17, 2017 8:26 pm

Maybe yes.
I was reading some info about an payment API and then there was referenced to URI, so i though't let's check it out what they mean. So that's why i wanted more background. As URI is wanted but URL is mentioned at the standalone settings.
This is a nice article about it: https://danielmiessler.com/study/url-uri/

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom URL scheme should be Custom URI scheme?

Post by bogs » Sun Dec 17, 2017 11:10 pm

Why over complicate it? Is URL really insufficient, or are you just saying you want to be technically accurate? Is it just to use this one api? If you are looking for specifically a resource, then URL is it. If your looking to save 6 to 60 characters of typing that will probably be done once, it doesn't seem worth the effort. If URL somehow isn't getting the job done, then maybe.

Just my .02, which due to inflation is probably worth a thousandth of that.
Image

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Custom URL scheme should be Custom URI scheme?

Post by sphere » Mon Dec 18, 2017 1:20 pm

Hi Bogs,

yes I'd like to be technically correct (even though I'm often wrong :P , but that's learning).
It's not just for me, but for everyone of course. I dislike confusion, life is it enough from itself.

Perhaps it is in my nature to have it exactly as it is meant to be.
If you read the article you'll understand why I think it is confusing, also with the info in the lc lesson.

It's a tiny thing I know. But often in the tiny things you find which are the most important.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom URL scheme should be Custom URI scheme?

Post by bogs » Mon Dec 18, 2017 3:15 pm

I did read it, along with carefully reading your own posts. It was a very good article explaining the very small differences between the three, which is what prompted the questions.

You yourself said it best,
sphere wrote:
Sun Dec 17, 2017 1:01 pm
An URL is an URI
and that pretty much says it all for me. It is technically correct, it represents both sides, and it is less confusing for the uninitiated. Adding more words is good in dictionaries, but ( I feel ) not necessarily so much in programming languages.

I also tend to think big things are made up of the tiny things, in this case though it isn't a tiny thing so much as what was more appropriate. I think Richard is correct, they made the right choice.

It isn't a bad question, and I don't think your wrong since you clearly are not in this case, but it seems like a 'make work' proposition to clear up something that really isn't that unclear to begin with, if you see what I mean.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom URL scheme should be Custom URI scheme?

Post by FourthWorld » Mon Dec 18, 2017 8:39 pm

Good article. Consider this excerpt:
One can classify URIs as locators (URLs), or as names (URNs), or as both. A Uniform Resource Name (URN) functions like a person’s name, while a Uniform Resource Locator (URL) resembles that person’s street address. In other words: the URN defines an item’s identity, while the URL provides a method for finding it.
Since all URLs are also URIs, if something can be said to be a URL either term would fit, though the more specific "URL" may be more instructive.

The key distinction of a URL, per the article, is that it includes mention of how to get to the resource. This may include a protocol, such as "http" or "ftp", or even "mailto".

The latter is particularly relevant, because rather than the more common use there of a networking protocol, "mailto" refers a locally-installed application. The app isn't mentioned by name, but any conformant email client will support mailto. In short, "mailto" is the convention for saying "the user's default email client application".

In mobile apps, the service specifier is also an application reference. Because a URL/URI scheme is specific to an app, it uses the app name as its reference for how to get the resource.

Given this, I think it's safe to say that what Apple calls a "URL scheme" is indeed a URL scheme.

And since URLs are a subset of URIs it would not be a mistake (though it would be less specific) to also call them URI schemes if one chooses.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Custom URL scheme should be Custom URI scheme?

Post by sphere » Mon Dec 18, 2017 10:00 pm

I agree it is not incorrect to use URL because it is an URI.

i did not quite catch this sentence:
In mobile apps, the service specifier is also an application reference. Because a URL/URI scheme is specific to an app, it uses the app name as its reference for how to get the resource.
and specific the latter part.

Quite nice discussion this. Seems a lot of possibilities and neither seems wrong really.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9837
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom URL scheme should be Custom URI scheme?

Post by FourthWorld » Mon Dec 18, 2017 10:15 pm

sphere wrote:
Mon Dec 18, 2017 10:00 pm
i did not quite catch this sentence:
In mobile apps, the service specifier is also an application reference. Because a URL/URI scheme is specific to an app, it uses the app name as its reference for how to get the resource.
and specific the latter part.
A URL is a resource name and the means by which that resource is obtained.

When a resource is returned from a network, a networking protocol is the means to obtain a requested resource, like "http" and "ftp".

When the resource is returned from an application, the app name is the specifier that determines how to obtain the resource.

The "mailto" example is a good one because it's common enough to be readily recognized, and we understand that it refers to a locally-installed app.

The only difference between "mailto" and a custom URL scheme is that mailto is generic to all proper email clients, whereas an app-specific request uses the name of the specific app.

Does that help?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom URL scheme should be Custom URI scheme?

Post by bogs » Mon Dec 18, 2017 10:50 pm

sphere wrote:
Mon Dec 18, 2017 10:00 pm
Quite nice discussion this. Seems a lot of possibilities and neither seems wrong really.
I agree, this discussion is a lot better than the last one I was in :D
Image

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Custom URL scheme should be Custom URI scheme?

Post by sphere » Tue Dec 19, 2017 12:39 pm

Yes, thanks for your explanation Richard.

Thanks Bogs.

jiml
Posts: 336
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: Custom URL scheme should be Custom URI scheme?

Post by jiml » Tue Dec 19, 2017 6:42 pm

To bolster what Richard wrote earlier, here is an excerpt from Apple's App Programming Guide for iOS:
Inter-App Communication

Apps communicate only indirectly with other apps on a device. You can use AirDrop to share files and data with other apps. You can also define a custom URL scheme so that apps can send information to your app using URLs.
https://developer.apple.com/library/con ... ation.html

Jim Lambert

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Custom URL scheme should be Custom URI scheme?

Post by sphere » Tue Dec 19, 2017 9:26 pm

Thanks Jim.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”