Web Intents - the future of web apps
paul.kinlan.me
paul.kinlan.me
<a action="http://webintents.org/share"
type="text/uri-list"
data="http://kittens.com">Share Me!</a>
Presumably browsers would also be at leisure to provide access to intents in their native interface, like a share button right on the toolbar.The intent choosing UI is a thorny issue. I dislike forcing the user to respond to install dialogs or limiting them to intents they have previously installed. I think my ideal browser would silently remember all the intents it has seen. When it needs me to choose one, it shows me a list of candidates I have used before (as intents), padded to some pleasant length by candidates most often visited (directly). If not all candidates fit, a "More..." option expands the list to completion.
Some sites will want to be certain that intents they invoke can be handled by all users. So, maybe they should be able to suggest some services to be appended to the user's (possibly empty) list.
Making the action field a URI could create some interesting politics. I can imagine the action space being fragmented along company lines e.g. http://facebook.com/like vs http://google.com/plusone vs http://twitter.com/tweet etc. A flat namespace might encourage more reuse of actions and less creation of new ones. But maybe I'm just being paranoid.
<a href="http://webintents.org/share?type=text%2Furi-list&data=http%3A%2F%2Fkittens.com">Share Me!</a>
Add a microformat/microdata attribute to provide a browser hint if desired (for native browser supports or browser extension) and you're done: <a intent href="http://webintents.org/share?type=text%2Furi-list&data=http%3A%2F%2Fkittens.com">Share Me!</a>Or when no support library is added on the client to provide some kind of in-page UI enhancement. Yes, that's the whole point: building on existing and well-functioning technologies to avoid that things break down completely and that a segment of the population is entirely left out for no good reason.
> What would be at the action URI? An error message or something that tries to fulfill the intent?
Second case, some sort of intents picker if multiple web services can fulfill it, or a redirection to the intent handler if there is only one. An error message if there is no registered service able to handle the intent.
And it keeps the distribution of intents registrar from your proposal, which I think is a good idea.
Intent choosing will be left in most likelhood up to the UA to define, they could favourite items. The main reasons for the intent tag is 1) it is a new platform feature and shouldn't be hacked in; a tag gives us the benefit of future enhancements, and 2) we and others could index this data and provide it as an option for the user to pick applications to use.
1) The user gets to choose how to perform a particular activity.
2) Services can be found either automatically or by the user searching for services and saving them for later.
Don't the majority of users want this taken care of for them? Imagine going to facebook and having to find a service to perform a friend request. That's just an irritation for a benefit that most people don't want(wow I can send an invite using SMS with this service).
It's also notable that there's no styling on the examples. How is the UI going to be integrated, are all of the web intents supposed to follow a standard CSS format? How about the amount of space that service takes up on the page?
I suspect apis are popular because they're the best fit for sharing functionality on the web. Users want curated, integrated websites, not a set of mix 'n' match components.
There's no other purpose for this unnecessarily generic API.
The point isn't that this is an unnecessarily generic API - it is not, it is like saying postMessage is a unnecessarily generic API, rather it is firstly a service discovery mechanism and simple communication channel.
In some cases (e.g., sharing) it's clear that there's never a single good option -- the choice should probably always exist. There are plenty of others (e.g., image editing) where a site might want to have a specific default, but allow for choice where appropriate.
The alternative, I'm afraid, is what we have now -- you only get the options (usually just one) that an app's developer happened to find time to integrate by hand, usually poorly.
If you check out the cloud picker for example, it does return you to the original page.
On the subject of in-page UI, at the moment there are too many risks embedded an in-page UI... IMO, also for a non-built in solution we have to deal with popup blockers so it limits what can be done.... However this should be a core part of the web platform soon so the current shim won't be needed.
I wonder if the actual usability of this is what stymies it... for example, say SmugMug exposes their image filtering API that they use to sharpen and enhance uploaded images and Flickr exposes their geocoding API to allow you to pass in GPS coords and they write them into the JPG meta for you... what is the motivation for these services to expose these services to 3rd party (potentially competing) web applications to make use of them? I am assuming you have access to these services because you are already customers of those companies, wouldn't they want to keep you in their garden?
If you put this in a pot and boil the water off of it, wouldn't this idea more or less come down to the problem web services are meant to solve and in that way end up with a similar looking ecosystem?
Not critical of the intents idea, just trying to think of where this goes once it exists to get a better idea of how it should be designed/pitched/used/thought of.
Thoughts?
It is also about getting data into your application; for users today the process of attaching an image/file that is in the cloud to an email is as follows. Edit email, open up file store (say flickr) download file, go back to email,find downloaded file, upload file and attach. With a cloud file picker solution this becomes a whole lot more integrated and as service provider it is in your interest to offer the ability for users to pick your files.
You can turn the iframes into popup windows if you eval 'cloud.noIframes=true' from a javascript prompt or enter 'javascript:cloud.noIframes=true' in the URL bar.
EDIT: There's also an older iteration of this idea at http://xdproject.org/filterizer/
1- Some services that are prone to abuse may require the Integrator ID to rate limit or prevent spam. The central authority could rely on a system that makes it difficult to obtain multiple IDs.
2- Some services may wish to provide a revenue share to integrators as an incentive -- we can imagine that Picnik is the service, and it collects revenue from usage through ads and premium upgrades, and opts to share that revenue with integrators.
IP addresses definitely don't work and CAPTCHAs don't work either (they're broken by hordes of humans in low-income countries solving them in near-realtime).
How would you prevent automated abuse? It's become a very difficult problem.
Of course, features that prevent abuse will be a key support element for browsers. That's part of the rationale behind the choice of a pop-up window in Paul's demo for instance -- in-page elements have some vulnerabilities that pop-ups don't.
We will probably offer it out via a simple API but interested to know if we could also offer it via "Web Intents" - would it make sense? How could we do it?
We were thinking of providing a action verb for print, so it is essentially the opposite of this (well nearly..)
How would you specify an intent through the meta tag?
<meta property="app:type" content="image/jpg,img/gif" >
<meta property="app:handler" content="open" >
and use canonical as the href. you can have multiple handler types, which are standard types, and then handers are actionsthe concern that I have is that with the types this is just file extensions being moved to the web and all the problems that caused in desktop computing. ie. associating applications with file types. but you are saying that there is no default handler, that you get something more akin to an 'open with' which lists the applications that can handle that type
can you email me (email in profile) to discuss further, or is there a mailing list? I am interested in this area and have seen a number of 'web app/widget discovery' initiatives over the years but none really took off
(edit: code didn't show up)
I'd think in terms of semantics, the <embed> tag is more appropriate. If you want to re-use existing tags at all, that is.
If you mean REST APIs, one advantage that comes to mind is that Intents should require less integration on the server. Just write a callback that handles the expected data, and don't worry about integrating plugins.
It's different in that I don't see how you can add new content to an existing page.