delegating user tasks in applications
Post on 24-May-2015
399 Views
Preview:
DESCRIPTION
TRANSCRIPT
User Task Delegation in ApplicationsFriedger MüffkeOpenIntents.org
Campus Party 2012 Berlin
Getting a 3-Months Job Done in 30 MinutesFriedger MüffkeOpenIntents.org
Campus Party 2012 Berlin
Context
Task-driven software engineering
User taskInteraction design
Application platform with monolithic applications that perform user tasks
History of Sharing between Application
Interprocess communication (IPC)
● Objects ○ Windows: DDE/COM○ J2EE: JavaBeans
● Functionality○ WebServices + UDDI○ RPC
● Graphical User Interface○ Dynvoker, TU Dresden (WS/GUI annotations)
Problem Description
User Task Delegation is an architecture pattern designed to address the problem of a Component (Site/App) wanting to do a certain User Task (Action) with a Partner known to the User but not the Component.
NASCAR problem
Examples● Share
Twitter, Email,..
● PickPicasa, Flickr, Youtube, Webcam,..
● Editimage, document, ..
● SaveGoogle Drive, locally, ..
● PropsLike, praise, +1, ..
● PrintFax, pdf, ..
● LogInOpenId
● SubscribeNotifications by e-mail, sms, ..
● SearchWikipedia, dictionary, ..
● Check-in and other Activity Stream verbs
Android: Intents
● Freely definable actions● Central repository in platform● Registration on install time● PackageManagerService class● No official discovery, but openintents.
org/en/registry
Android: Intents
in Manifest.xml
<intent-filter> <action android:name= "android.intent.VIEW"/> <data android:scheme = "http"/></intent-filter>
in Application
Intent intent = new Intent();intent.setAction(Intent.ACTION_VIEW);intent.setData("http://campus-party.eu");context.startActivity(intent);
Web Apps: WebIntents/WebActivities
● Specified as W3C draft and Mozilla proposal● User agent manages registry● Registration on visit or programmatically● Suggestions via Chrome Web Store● discovery maybe via openintents.
org/en/registry
Web Apps: WebIntents/WebActivities
Available in Chrome Canary Build
Web Apps: WebIntents/WebActivities
var startActivity = window.navigator.startActivity || window.navigator.webkitStartActivity;
var imageUrl = document.getElementById("main-image").src;
var intent = new Intent("http://webintents.org/share",
"image/*", imageUrl);
var onSuccess = function(data) { /* woot */ };var onError = function(data) { /* boooo */ };
startActivity.call(intent, onSuccess, onError);
WP7 / Win 8: Contracts/Extensions
● Defined by platform● More specific tasks (e.g. account picture)● Agreement between two apps or between
app and Windows● Different API (code) for each user task● Declarative registration for serving apps● Event handlers● No discovery
WP7 / Win 8: Contracts/Extensionsin client app (sharing)var dataTransferManager = Windows.ApplicationModel.DataTransfer. DataTransferManager.getForCurrentView();dataTransferManager.addEventListener("datarequested", function (e) { // Code to handle event goes here. });
in serving app (file picker)<Extension Category="windows.fileOpenPicker" StartPage="fileOpenPicker.html"> <FileOpenPicker> <SupportedFileTypes> <SupportsAnyFileType /> </SupportedFileTypes> </FileOpenPicker>
Definition
User Task Delegation is an architecture pattern where semantically defined tasks are performed by third-party components.
1. Task definition 2. Registration of serving components3. Invocation by client component4. Selection from registry by platform with help of user5. Delivery to service6. Response from serving component to client component
Further topics
● Discovery for developers and users● Dependency Management
● Implicit vs. explicit delegation● Delegation architecture vs.
trusted subsystem● Data flow and security/privacy● Remote Delegation (e.g. PLAY_TO)● Between Native and Web
Android Meets WebIntents
● Google Summer of Code 2012 project● Cheng Zheng, mentored by OpenIntents● Deliverables:
○ User agent with registry and native app integration○ Helper lib for extended chooser dialog○ Sample app
https://github.com/openintents/gsoc2012/wiki
Android Meets Web
Questions ?
Friedger Müffkeopenintents.org
@fmdroidgplus.to/friedger
Links
Android Intents
WebIntents SpecificationWebActivities
Windows 8 Contracts and Extensions
top related