Last week Apple acquired automation workflow application Workflow. Of course there was a nice buzz around it and it was a big topic of conversation on various podcasts and websites.
Back in 2010 x-callback-url was created as a way to allow applications to call into each other and return results so you could chain together calls to build custom workflows. Apps like LaunchÂ Center Pro and Workflow took advantage of x-callback-url to let you build those workflows and execute them. Now we have a bonafide standard, without a standard. The app ecosystem found a way to support automation without Apple’s help.
I’ve used Launch Center Pro but until recently I’d never used Workflow, and it’s pretty amazing. The Workflow guys did an amazing job creating a drag and drop UI for building what amounts to a program. Well worth a look.
Allow applications to specify a Â Scripting DictionaryÂ orÂ Type LibraryÂ as part of the application bundle, this should allow runtime creation of objects. I know this isn’t rocket science and it’s been done many times over.
Short of adding support to the OS it would be pretty sweet if an App like Workflow, Launch Center Pro, or PythonistaÂ would standardize on a way to parse a URL Scheme into an Object Hierarchy.
What do you mean by Object Hierarchy?
That’s a good question. Here’s what I’m thinking. Since the Apps mentioned above all support URL Schemes we can derive an Object Hierarchy from them. Basically the beginning of a URI begins with a scheme. The scheme is the name. In the case of Evernote it’s evernote. Pretty simple, right?
Given the scheme name we follow that with a path. In the case of x-callback-url based URL schemes we will skip over that part and move to the second item in the path. This will be the action, or function, or the object we’re going to execute.
The above URL will tell Evernote to create a new note of type text with a title of “EC 3”. If we had a way to parse that in a runtime application we could present the user with an Object that has methods that take arguments, like this.
Let’s do a couple for Bear. First the URL Scheme.
Now translated into code
bear.create(title, text, tags)
Overcast URL Scheme.
And finally, my favorite, Arrgly URL Scheme.
Pretty simple to turn all of those into objects. When I say you can create a hierarchy it means you could, by convention, lump groups of actions into objects, or like the above examples have a set of actions that all live on a single object.
Here’s what a object might look like as a URL Scheme.
That would result in using it like this
Of course this need more fleshing out and it would require app developers to decide on a well known convention to make it work as expected, but it could be done with a bit time and effort. It could be these become an extension of the x-callback-url specification?