Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

AtlasCamp 2011: Confluence 4 and Beyond

3,925 views

Published on

The Confluence Product Manager will share our plans for Confluence 4 and the releases beyond. And the Confluence Architect gives you a whirlwind tour of Confluence's internal APIs: which ones are safe to use, which aren't, and how to help make your plugin more resilient to change. And we'll share our plans for making this less painful in the future.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

AtlasCamp 2011: Confluence 4 and Beyond

  1. 1. Confluence 4 and Beyond Sherif Mansour Confluence Product Manager, Atlassian Charles Miller Confluence Architect, Atlassian 2
  2. 2. Agenda• Confluence 4 for • Users • Plugin Developers• Beyond the 4.0 editing experience • Releases • Other 4.0 developer improvements 3
  3. 3. Confluence 4.0 4
  4. 4. Confluence 4.0 4
  5. 5. 5
  6. 6. Fir! class experiences 5
  7. 7. Fir! class experiences 5
  8. 8. First class for content 6
  9. 9. First class for content • Value increases with content 6
  10. 10. First class for content • Value increases with content • Start of collaboration cycle 6
  11. 11. 7
  12. 12. You 7
  13. 13. You 7
  14. 14. You 7
  15. 15. 8
  16. 16. 9
  17. 17. Brilliantly Simple 9
  18. 18. 10
  19. 19. Packed with Power visual macros advanced tables 10
  20. 20. 11
  21. 21. Intelligent and Fast h1. Hi -> Hi *bold * -> bold :) ->autoformat wiki markup autocomplete + paste images shortcut luv 11
  22. 22. 12
  23. 23. Familiarly Social 12
  24. 24. First Class Content CreationExperience 13
  25. 25. First Class Content CreationExperience Brilliantly Simple Packed with Power Intelligent and Fast Familiarly Social 13
  26. 26. 14
  27. 27. 14
  28. 28. 15
  29. 29. Confluence 2.x 15
  30. 30. Confluence 2.x Confluence 3.x 15
  31. 31. Confluence 2.x Confluence 3.x Confluence 4.x 15
  32. 32. Confluence 4.x 16
  33. 33. Confluence 4.x 16
  34. 34. Confluence 4.x 17
  35. 35. Confluence 4.x 17
  36. 36. Confluence 4.x 17
  37. 37. Confluence 4.x 17
  38. 38. Confluence 4.x You control this experience 17
  39. 39. Confluence 4.x 17
  40. 40. Confluence 4.x 17
  41. 41. Confluence 4.x 17
  42. 42. Confluence 4.x • No macro parameter knowledge required • No need for the user to know about the macro • Create a more WYSIWYG experience • You control the experience, seamless integration 18
  43. 43. Confluence 4.x1. Insert menu2. Formatting menu3. Custom property panel buttons4. Rendered images as macro placeholders5. Footer actions6. Default parameter in placeholder 19
  44. 44. Confluence 4.x1. Insert menu2. Formatting menu3. Custom property panel buttons4. Rendered images as macro placeholders 2:15 pm Thursday5. Footer actions6. Default parameter in Ryan Thomas placeholder 19
  45. 45. 20
  46. 46. Fir! class 20
  47. 47. Beyond 4.0• 4.1 - Page Layouts• 4.2 - Template Improvements 21
  48. 48. Confluence 4 and Beyond Sherif Mansour Confluence Product Manager, Atlassian Charles Miller Confluence Architect, Atlassian 22
  49. 49. Confluence 4 and Beyond Sherif Mansour Confluence Product Manager, Atlassian Charles Miller Confluence Architect, Atlassian 22
  50. 50. Two cool things for 4.0…that aren’t the rich text editor Charles Miller Confluence Architect, Atlassian 23
  51. 51. Closure Templates 24
  52. 52. Closure Templates• Language-neutral• Compiled to Javascript for the client• Component-based http://code.google.com/closure/templates/index.html 25
  53. 53. Defining a templateexample.soy {namespace Confluence.Templates.Example} /** * Renders a Hello message. * @param name the name of the user */ {template .helloWorld} <div>Hello {$name}!</div> {/template} https://developer.atlassian.com/display/CONFDEV/Templating+in+JavaScript+with+Soy 26
  54. 54. Looping and Branching{foreach $child in $children} {call .pageInfo data="$child"} {param oddRow: index($child) % 2 /} {/call}{ifEmpty} {getText(‘page.has.no.children’)}{/foreach} 27
  55. 55. Invoking a templateexample.js var data = {name: “John Smith”} Confluence.Templates.Example.helloWorld(data); https://developer.atlassian.com/display/CONFDEV/Templating+in+JavaScript+with+Soy 28
  56. 56. Compiling a template atlassian-plugin.xml <web-resource key="example-resources"> <transformation extension="soy"> <transformer key="soyTransformer"/> </transformation> <resource type="download" name="example-soy.js" location="/soy/example.soy"/> </web-resource>https://developer.atlassian.com/display/PLUGINFRAMEWORK/Web+Resource+Transformer+Plugin+Module 29
  57. 57. Closure (Soy) Templates• Bundled plugin in Confluence 4.0• Server-side templates supported in 4.1 30
  58. 58. JSON-RPC 31
  59. 59. RPC • SOAP • Complicated XML protocol • Made easy with tool support • XML-RPC • Simpler XML protocol • Widely available librarieshttps://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs 32
  60. 60. REST• Data transport agnostic (usually XML/JSON)• Pure HTTP, no need for library support• Limited Confluence API 33
  61. 61. JSON-RPC• Simple JSON protocol• RPC, not REST• Easy to use from the browser 34
  62. 62. Standard JSON-RPC• Too much protocol overhead• Still requires a client-side library http://groups.google.com/group/json-rpc 35
  63. 63. JSON-RPC plugin• Exposes all XML-RPC/SOAP services as JSON-RPC• Authentication via web login session• Supports both standard JSON-RPC and a web-friendly “light” protocol https://plugins.atlassian.com/plugin/details/40277 36
  64. 64. JSON-RPC Light Request POST /rpc/json-rpc/confluenceservice-v2/getSpace [ "DOC" ] 37
  65. 65. JSON-RPC Light Response POST /rpc/json-rpc/confluenceservice-v2/getSpace { key : "DOC", name : "Documentation Space", url : "http://wiki.example.com/display/DOC", homePage : "Home", description : "Product Documentation" } 38
  66. 66. Calling from jQueryjQuery.ajax({ url: Confluence.getContextPath() + “/rpc/json-rpc/confluenceservice-v2/getSpace”, type: “POST”, dataType: “json”, contentType: "application/json", data: JSON.stringify([ AJS.Meta.get(“space-id”) ]), success: function(data) { show_space(data) }, error: function(data) { show_error(data) }}); 39
  67. 67. Confluence JSON-RPC Plugin• Available from plugins.atlassian.com• Compatible with Confluence 3.5 or later• Will be bundled with Confluence 4.1 40
  68. 68. Putting them together… 41
  69. 69. 42
  70. 70. 43
  71. 71. Retrieve with JSON-RPCjQuery.ajax({ url: Confluence.getContextPath() + "/rpc/json-rpc/confluenceservice-v2/getPageHistory", type: "POST", dataType: "json", contentType: "application/json", data: JSON.stringify([ AJS.Meta.get("page-id") ]), success: function(data) { show_history_popup(data) }, error: function(data) { show_error_popup(data) } }); 44
  72. 72. Display with Closure function show_history_popup(historyData) { popup = AJS.ConfluenceDialog({ width : 865, height: 530, id: "page-history-dialog", onCancel: cancel }); ... popup.addPanel( Confluence.Templates.Plugins.Pagehistory.popup( { histories: historyData }) popup.show();} 45
  73. 73. Display with Closurepagehistory-template.soy /** * Displays the page history popup * * @param histories array of the history objects to list */ {template .popup} <form name="diff" method="GET" action="{contextPath}/pages/diffpagesbyversion.action"> <input type="submit" value="{getText(compare.selected)}"> <input type="hidden" name="pageId" value="{$histories[0].id}"> <table id="page-history-container" width="100%" cellspacing="0" class="tableview"> <tr> <th>&nbsp;</th> <th>{getText(heading.version.number)}</th> <th>{getText(heading.version.date)}</th> <th>{getText(heading.comment)}</th> </tr> {foreach $history in $histories} {call .historyRow data="$history"} {param current: isFirst($history)/} {/call} {/foreach} </table> </form> {/template} 46
  74. 74. Cheat it into the menu…$("#action-view-history-link").click(function(e) { show_history(); e.preventDefault();}); 47
  75. 75. 48
  76. 76. Download the codehttps://bitbucket.org/cmiller_atlassian/atlascamp-pagehistory-demo 49
  77. 77. Thank you• Learn more about Confluence 4: 1.http://atlss.in/confluence4 2.Hands-on Developer Sessions 3.“Pimp my Confluence Plugin” - Thursday, 2:15pm• Questions? charles@atlassian.com, sherif@atlassian.com 50
  78. 78. Thank you!

×