Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010

  • Published on
    12-May-2015

  • View
    2.329

  • Download
    4

DESCRIPTION

Go, Go, Gadgets: Building Gadgets for Atlassian Products Mark Halvorson, Atlassian

Transcript

<ul><li>1.1 1 </li></ul> <p>2. Go Go Gadgets! Building Gadgets for Atlassian Products Mark Halvorson Chief Imagineer Atlassian Software 2 2 3. What is an Imagineer? 3 4. !"#"Take things that exist...4 5. ...and make something different.5 6. 6 6 7. Agenda What it is OpenSocial Why we chose it How it has helped us Why you should use it! How you can get involved 7 7 8. What is OpenSocial? 8 8 9. Social Data Model 9 9 10. Web Service APIs1010 11. Gadgets 11 11 12. Our Problem 12 12 13. Before Enterprise Apps are Silos FishEyeSourceCode JIRAIssues&amp;Tasks ConuenceWiki1313 14. Emphasize Teams, Projects &amp; Tasks over Tools1414 15. Too Many Dashboards 15 15 16. Cross-Product Sharing 16 16 17. Integration with Non-Atlassian apps 17 17 18. Solution: OpenSocial Gadgets1818 19. Gadgets are a Great Solution for Dashboards 19 19 20. After Open standard for enterprise application connectionviewcomplete2020 21. Managers Do Email Not just about portals, or internal applications. viewacAvity&amp;status 21 21 22. Open Standards, Industry Support2222 23. Why Write Gadgets? Theyre easy! They use stable, widely accessible and understood technologies Write once, display everywhere2323 24. The Obligatory Hello World Example2424 25. Anatomy of a Gadget XML Spec File Metadata, HTML Content, and JavaScript Core JavaScript API Access Preferences, Make Requests Gadget Features Additional, Optional Capabilities &amp; APIs 25 25 26. XML Spec File 26 26 27. 2727 28. 28 28 29. </p> <p> 29 29 30. Views - Default 30 30 31. Views - Default 31 31 32. Views - Canvas3232 33. Views - nav 33 33 34. Views - Canvas3434 35. Views - Custom35 35 36. Dashboards, Gadgets &amp;OpenSocial Gadgets go beyond the JIRA Dashboard - onto your wall!36 36 37. 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); 3737 38. Requesting Data from Web Services AJAX + DOM OAuth Request Proxy 38 38 39. 39 39 40. 40 40 41. 41 41 42. 42 42 43. gadgets io. .makeRequest )( 43 43 44. What Can You Call? Any URL XML and JSON are the most useful 4444 45. Fetching Issues function fetchIssues() { var url = "http://jira.atlassian.com/sr/" + "jira.issueviews:searchrequest-xml" + "/temp/SearchRequest.xml?" + "created%3Aprevious=-1w&amp;resolution=-1" + "&amp;sorter/field=issuekey&amp;sorter/order=DESC" + "&amp;sorter/field=created&amp;sorter/order=DESC" + "&amp;tempMax=20"; var params = {};params[gadgets.io.RequestParameters.CONTENT_TYPE] =gadgets.io.ContentType.DOM;gadgets.io.makeRequest(url, handleResponse, params); }4545 46. 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(); }4646 47. An Real World Example...Example Text Text47 48. The Goal The Goal4848 49. The Result The Result4949 50. Preferences 50 50 51. Statistics5151 52. Lets Take a Step Back. 52 52 53. Q: What is the purpose of an application? A: DO Something. Complete some process. 53 53 54. Anatomy of an ApplicationContext ContentAc)on 54 54 55. An Example Gmail Communica)onContacts Mail ReadWriteReply5555 56. Q: What is the purpose of an gadget? A: DO Something. Complete some process. 56 56 57. Gadget = Reusable Mini-ApplicaAonAtomic UnitofWorkContextContext orContentContent Ac)on Ac)on5757 58. Example - Mini-Application JIRAComment Gadget JIRA-1234UsersUsers CommentComment Add Comment5858 59. Example - Unit of Work JIRAComment GadgetContext UsersComment Add Comment5959 60. Lesson Learned over time: Gadgets as Units of Work are... Easier to build Easier to use Easier to reuse 60 60 61. Composite Application Gadget GadgetGadgetAddlContextContextContext ContextContentContentContent Content Ac)on Ac)onAc)on Ac)on 61 61 62. Example - GmailGoogleCommunicaAonApplicaAonGoogleTalkCommunica)onPresence Gmail ContactsIM MailReadWriteReadWriteReplyReply6262 63. Demonstration My FedEx 13 Project Flapjack for Conuence6363 64. Get Satisfaction6464 65. Gadgets?Gadget? Gadget?6565 66. Gadget Gadget Gadget! 6666 67. 67 67 68. Get Satisfaction powered by JIRA6868 69. Gadgets! Gadget! Gadget! Gadget! 6969 70. Feedback Tab on Different Website 70 70 71. Feedback on Google.com7171 72. Feedback on Google.com7272 73. Summary - Why write gadgets? Easy! Reusable! Fun!7373 74. Questions? Email: mhalvorson@atlassian.com Twitter: @halv0112 Resources http://www.atlassian.com/opensocial http://www.opensocial.org7474 </p>

Recommended

View more >