This presentation delivered at the OpenSocial Europe Summit and Industry Spotlight on Education Event. Talks about writing OpenSocial Gadgets from Hello World to something a little more useful.
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Go! Go! Gadgets. Writing an OpenSocial Application
1. Go Go Gadgets!
Building an OpenSocial Application
Mark Halvorson
Community Member, OpenSocial Foundation Board
Chief Imagineer, Atlassian Software
Email: mark.halvorson@atlassian.com
Twitter: @halv0112
1
Monday, December 6, 2010
2. What is an ‘Imagineer’?
Monday, December 6, 2010
3. !" #"
Take things that exist...
Monday, December 6, 2010
6. Agenda
•What it is a Gadget
•Why Atlassian chose OpenSocial
• Application Portability
•Why you should too!
• Application Sharing
6
Monday, December 6, 2010
30. Anatomy of a Gadget
•XML Spec File
• Metadata, HTML Content, and JavaScript
24
Monday, December 6, 2010
31. Anatomy of a Gadget
•XML Spec File
• Metadata, HTML Content, and JavaScript
•Core JavaScript API
• Access Preferences, Make Requests
24
Monday, December 6, 2010
32. 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
24
Monday, December 6, 2010
54. Wallboards
Gadgets go beyond
the
JIRA Dashboard
onto your wall!
35
Monday, December 6, 2010
55. Wallboards
Gadgets go beyond
the
JIRA Dashboard
onto your wall!
35
Monday, December 6, 2010
56. JavaScript
// Create minimessage factory
var msg = new gadgets.MiniMessage();
// Show a small loading message to the user
var loadMessage = msg.createStaticMessage("loading...");
// Get configured user prefs
var 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 loads
gadgets.util.registerOnLoadHandler(fetchIssues);
36
Monday, December 6, 2010
57. JavaScript
// Create minimessage factory
var msg = new gadgets.MiniMessage();
// Show a small loading message to the user
var loadMessage = msg.createStaticMessage("loading...");
// Get configured user prefs
var 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 loads
gadgets.util.registerOnLoadHandler(fetchIssues);
36
Monday, December 6, 2010
58. JavaScript
// Create minimessage factory
var msg = new gadgets.MiniMessage();
// Show a small loading message to the user
var loadMessage = msg.createStaticMessage("loading...");
// Get configured user prefs
var 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 loads
gadgets.util.registerOnLoadHandler(fetchIssues);
36
Monday, December 6, 2010
59. Requesting Data from Web Services
•AJAX + DOM
•OAuth
•Request Proxy
•
37
Monday, December 6, 2010
93. Example - Gmail
Google CommunicaCon ApplicaCon
Google Talk
Communica(on
Presence
Gmail
Contacts IM
Mail
Read Write Read Write
Reply Reply
61
Monday, December 6, 2010
107. 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.
70
Monday, December 6, 2010