getting the most out of opensocial gadgets
TRANSCRIPT
![Page 1: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/1.jpg)
![Page 2: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/2.jpg)
Getting the most out of OpenSocial gadgets
2
Mark HalvorsonDirector of Interactive Marketing, AtlassianBoard Member, OpenSocial [email protected], @halv0112
![Page 3: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/3.jpg)
Agenda
3
• What it is a Gadget
• Why Atlassian chose OpenSocial
• Why you should too!
![Page 4: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/4.jpg)
What is OpenSocial?
4
![Page 5: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/5.jpg)
Social Data Model
5
![Page 6: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/6.jpg)
Web Service APIs
6
![Page 7: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/7.jpg)
Gadgets
7
![Page 8: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/8.jpg)
8
Our Problem
![Page 9: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/9.jpg)
Before
• Enterprise Apps are Silos
9
FishEye Source Code
JIRA Issues & Tasks
Confluence Wiki
![Page 10: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/10.jpg)
Emphasize Teams, Projects & Tasks over Tools
10
![Page 11: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/11.jpg)
11
Too Many Dashboards
![Page 12: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/12.jpg)
Cross-Product Sharing
12
![Page 13: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/13.jpg)
Integration with non-Atlassian apps
13
![Page 14: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/14.jpg)
14
Solution: OpenSocial Gadgets
![Page 15: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/15.jpg)
Gadgets are a Great Solution for Dashboards
15
![Page 16: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/16.jpg)
After
• Open standard for enterprise application connection
16
view complete projectsingle activity streamcomment & interact
![Page 17: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/17.jpg)
Managers Do Email
• Not just about portals, or internal applications.
17
view activity & statuscreate issues
![Page 18: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/18.jpg)
18
![Page 19: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/19.jpg)
Why Write Gadgets?
• They’re easy!
• They use stable, widely accessible and understood technologies
• Write once, display in multiple containers
19
![Page 20: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/20.jpg)
20
The Hello World Example
![Page 21: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/21.jpg)
Anatomy of a Gadget
• XML Spec File
•Metadata, HTML Content, and JavaScript
• Core JavaScript API
•Access Preferences, Make Requests
• Gadget Features
•Additional, Optional Capabilities & APIs
21
![Page 22: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/22.jpg)
22
XML Spec File
![Page 23: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/23.jpg)
23
<ModulePrefs>
<?xml version="1.0" encoding="UTF-8" ?><Module> <ModulePrefs title="JIRA Issues" author="Atlassian" thumbnail="http://labs.atlassian.com/svn/GADGETS/trunk/jira-issues/basic/jira-issues-thumbnail.png" description="A list of recently created Issues">
<Require feature="minimessage" /> <Require feature="dynamic-height" />
</ModulePrefs>
![Page 24: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/24.jpg)
24
<UserPref>
<UserPref name="show_date" display_name="Show Dates?" datatype="bool" default_value="true"/> <UserPref name="show_summ" display_name="Show Summaries?" datatype="bool" default_value="true"/> <UserPref name="num_entries" display_name="Number of Entries:" default_value="5" required="true"/>
![Page 25: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/25.jpg)
25
<Content>
<Content type="html"><![CDATA[ <link rel="stylesheet" href="http://labs.atlassian.com/svn/GADGETS/trunk/jira-issues/basic/jira-issues.css">
<div id="content_div"></div>
<script type="text/javascript" src="http://labs.atlassian.com/svn/GADGETS/trunk/jira-issues/basic/jira-issues.js"></script> ]]></Content></Module>
![Page 26: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/26.jpg)
26
Views - DEFAULT view
![Page 27: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/27.jpg)
27
Views - DEFAULT view
![Page 28: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/28.jpg)
28
Views - CANVAS view
![Page 29: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/29.jpg)
29
Views - DEFAULT view (Gmail)
![Page 30: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/30.jpg)
Views - CANVAS view (Gmail)
30
![Page 31: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/31.jpg)
Inline Contextual Gadget
31
+
![Page 32: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/32.jpg)
32
Views - Custom view
![Page 33: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/33.jpg)
Wallboards
• Gadgets go beyond the JIRA Dashboard onto your wall!
33
![Page 34: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/34.jpg)
Wallboard – Default View
34
![Page 35: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/35.jpg)
Wallboard – Wallboard View
35
![Page 36: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/36.jpg)
36
JavaScript
// Create minimessage factoryvar msg = new gadgets.MiniMessage();// Show a small loading message to the uservar loadMessage = msg.createStaticMessage("loading...");
// Get configured user prefsvar prefs = new gadgets.Prefs();var showDate = prefs.getBool("show_date");var showSummary = prefs.getBool("show_summ");var numEntries = prefs.getInt("num_entries");
// Fetch issues when the gadget loadsgadgets.util.registerOnLoadHandler(fetchIssues);
![Page 37: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/37.jpg)
Requesting Data from Web Services
• AJAX + DOM
• OAuth
• Request Proxy
37
![Page 38: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/38.jpg)
38
gadgets.io.makeRequest()
Requesting Data from Web Services
![Page 39: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/39.jpg)
What Can You Call?
• Any URL
• XML and JSON are the most useful
39
![Page 40: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/40.jpg)
40
Fetching Issues
function fetchIssues() { var url = "http://jira.atlassian.com/sr/" + "jira.issueviews:searchrequest-xml" + "/temp/SearchRequest.xml?" + "created%3Aprevious=-1w&resolution=-1" + "&sorter/field=issuekey&sorter/order=DESC" + "&sorter/field=created&sorter/order=DESC" + "&tempMax=20";
var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.DOM;
gadgets.io.makeRequest(url, handleResponse, params);}
![Page 41: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/41.jpg)
41
Handling the Response
function handleResponse(obj) { var domData = obj.data;
var jiraIssues = { title : getTitle(domData), items : getItems(domData) }; renderJiraIssues(jiraIssues);
msg.dismissMessage(loadMessage); gadgets.window.adjustHeight();}
![Page 42: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/42.jpg)
Summary - Why write gadgets?• Easy!
•Simple web based technologies mean anyone can write a gadget.
• Reusable!
•Use in any OpenSocial Container. iGoogle, Gmail, JIVE, more every day.
• Fun!
•Thinking about applications as atomic units of work add a new dimension to application design.
42
![Page 43: Getting the Most Out of OpenSocial Gadgets](https://reader038.vdocuments.site/reader038/viewer/2022110306/55514935b4c905f2288b4f42/html5/thumbnails/43.jpg)
#summit11
Building #opensocial gadgets is the easiest way to integrate external content into JIRA & Confluence. Join the #openapprevolution !
43