SlideShare a Scribd company logo
@atlassian #atlascamp
Modernizing Your
Plugin UI
Jonathon Creenaune, Front End Architect, Atlassian
Build more features
Build more features
Make features better
Make features better
Beauty
Beauty
Interactivity
AtlasCamp 2013: Modernizing your Plugin UI
Beauty
AtlasCamp 2013: Modernizing your Plugin UI
AUI
<header class="aui-page-header">
  <div class="aui-page-header-inner">
    my header text
  </div>
</header>
AtlasCamp 2013: Modernizing your Plugin UI
AtlasCamp 2013: Modernizing your Plugin UI
Side-by-side
<header class="aui-page-header">
  <div class="aui-page-header-inner">
    my header text
  </div>
</header>
Side-by-side
<header class="aui-page-header">

{call aui.page.pageHeader}

  <div class="aui-page-header-inner">

  {param content}

    my header text

    my header text

  </div>

  {/param}

</header>

{/call}
AUI 5.0 is in
JIRA 6.0
Confluence 5.0
Bamboo 4.3
Stash 2.0
FE/CRU 3.0
Targeting non-soy
platforms
AtlasCamp 2013: Modernizing your Plugin UI
AtlasCamp 2013: Modernizing your Plugin UI
AtlasCamp 2013: Modernizing your Plugin UI
“ not just a side-effect of the technology
you used to create a page
”
URLs should be designed for the user,
/secure/MemeAction.jspa
/plugins/servlet/memes
/memes

/secure/MemeAction.jspa

/memes/{x}

/secure/MemeAction.jspa?key={x}

/memes/create/

=>

/secure/MemeAction.jspa?upload=

/memes/create/{x}

/secure/MemeAction.jspa?createBaseImageKey={x}

/memes/create

/secure/MemeAction.jspa?create=
Pretty URLs
<routing key="meme-pretty-urls" path="/memes">
<get from="" to="/secure/MemeAction.jspa"/>
<get from="/create/" to="/secure/MemeAction.jspa?upload="/>
<get from="/create/{key}" to="/secure/MemeAction.jspa?
createBaseImageKey={key}"/>
<get from="/create" to="/secure/MemeAction.jspa?create="/>
<get from="/{key}" to="/secure/MemeAction.jspa?key={key}"/>
</routing>
Pretty URLs
P2: Yes
Old products: Yes
Connect: Yes
Interactivity
Getting code closer to the user
AtlasCamp 2013: Modernizing your Plugin UI
Pushstate
history.pushState(stateObject, title, url);
// Using history.js
History.pushState(null, null, url);
Pushstate
gallery.onSelectImage(function(key) {
// Add it to the URL
History.pushState(null, null, AJS.contextPath() + “/memes” +
key);
// Load the hero image
hero.load($container, key);
});
Pushstate - back / forward
History.Adapter.bind(window, 'statechange', function() {
var match;
if (match = getUrl().match(/^$/)) { // gallery
gallery.load($container);
}
else if (match = getUrl().match(/^/(.*)$/)) { // hero
hero.load($container, match[1]);
}
});
Pushstate
P2: Yes
Old products: Yes
Connect: Yes
Soy renders on server
and on client
Render on server
<webwork1 key="meme-webwork" class="java.lang.Object">
<actions>
<action name="com.atlassian.meme.action.MemeAction" ...>
<view name="hero" type="soy">
:server-templates/meme.page.hero
</view>
<view name="gallery" type="soy">
:server-templates/meme.page.gallery
</view>
...
Render on server
$(function() {
var $container = getContainer();
hero.initEvents($container);
});
Render on client
<web-resource key="hero">
<transformation extension="soy">
<transformer key="soyTransformer" />
</transformation>
<resource type="download" name="hero.js" location="hero.soy"/>
...
Render on client
function render($container, key) {
$.get(getMemeUrl(key)).done(function(memeData) {
$container.html(meme.hero.main({
meme: memeData
}));
initEvents($container);
...
Render on client + server
P2: Yes
Old products: If soy available
Connect: JVM server
Injecting Page Data
// Bad
<script>
var myData = “${getMyData}”;
</script>
// Why? Because it’s an XSS hole
<script>
var myData = “</script><script>alert(‘naughty’);””;
</script>
Injecting Page Data
// In action
public String getSelectData() {
return ImmutableMap.of(
“baseImages”, getAllBaseImages(),
“baseImagesJson”, marshalAsJson(getAllBaseImages())
);
}
Injecting Page Data
// In template
<div class="base-images-json"
data-base-images-json="{$baseImagesJson}">
</div>
Accessing Page Data
// From javascript
var myData = AJS.$(".base-images-json").
data("base-images-json");
Page Data
P2: Yes
Old products: Yes
Connect: Yes
Future ...
Injecting Page Data
<web-resource key="blah">
  <data name="my-data" provider="com.acme.MyDataProvider" />
  <resource type="download" name="my-code.js" />
</web-resource>
Injecting Page Data
// pageBuilderService is injectable
pageBuilderService.getData().set("my-data-key", myJsonable);
Accessing Page Data
var data = AJS.data.get("my-plugin:blah:my-data");
Gallery

Hero
Main

Select
Create

Read files
Form

Utils

Render Meme
Defining Modules
define(“create/canvasDrawer”, function() {
...
return {
drawImage: function() {},
drawText: function() {},
getAsBase64: function() {}
}
});
Requiring Modules
define(“create/main”, [“./formView”, “./canvasDrawer”],
function(formView, canvasDrawer) {
formView.onSubmit(function() {
canvasDrawer.drawImage(myImage);
save(canvasDrawer.getAsBase64);
});
});
almond.js
JS modules
P2: Yes
Old products: Yes
Connect: Yes
“

Amazon: For every 100ms increase in load time
of Amazon.com decreased sales by 1%
Google: From 10 results in 0.4 seconds to to 30
results in 0.9 seconds decreased traffic and ad
revenues by 20%
Google: An extra 500ms in loading time
resulted in 20% drop in traffic.
Yahoo: 400ms slower page would see 5-9% more
people leave before the page finished loading.

”
Gallery

Hero
Main

Select
Create

Read Files
Form

Utils

Render Meme
Gallery

Hero
Main

Select
Create

Read Files
Form

Utils

Render Meme
Async Resource Loading
<web-resource key="create">
<resource type="download" name="create/main.js"
location="create/main.js" />
<resource type="download" name="create/create.css"
location="create/create.css" />
<resource type="download" name="create/create.js"
location="create/create.soy" />
...
</web-resource>
Async Resource Loading
require("gallery/main").onSelectCreate(function() {
WRM.require([
"wr!com.atlassian.atlassian-meme-generator:create"
]).done(function() {
showCreateView();
});
});
Async Resource Loading
P2: Yes
Old products: Yes
Connect: Other libs
Beauty:
Soy
Pretty URLs
Interactivity:
Pushstate
Server and Client rendering
Data
JS modules
Async resource loading
Sample App:
http://bitbucket.org/jcreenaune/atlassian-memegenerator

AUI Debugger:
http://bit.ly/10DXYlG
Thank you!
Party Starts at 19.00!
SkyLounge, Oosterdoksstraat 4, 11th Floor

More Related Content

PDF
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
PPTX
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
PPTX
Site optimization
PDF
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
PPT
How to Tango with Salesforce & jQueryMobile for HTML5 Goodness
PPTX
Javatwo2012 java frameworkcomparison
PDF
Hastening React SSR - Web Performance San Diego
PDF
20190118_NetadashiMeetup#8_React2019
AtlasCamp 2010: Understanding the Atlassian Platform - Tim Pettersen
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Site optimization
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
How to Tango with Salesforce & jQueryMobile for HTML5 Goodness
Javatwo2012 java frameworkcomparison
Hastening React SSR - Web Performance San Diego
20190118_NetadashiMeetup#8_React2019

What's hot (20)

PDF
PrimeTime JSF with PrimeFaces - Dec 2014
DOCX
Pom
DOC
Articulo java web
PPTX
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
PDF
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
KEY
Drupal as a web framework
PDF
Ajax, JSF, Facelets, Eclipse & Maven tutorials
KEY
Templates
PDF
Mobile themes, QR codes, and shortURLs
PPTX
Java - Persist and Replay Runtime Data
PDF
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
PDF
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
PDF
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
PDF
AspNetWhitePaper
DOC
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
PDF
RESS – Responsive Webdesign and Server Side Components
PDF
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
KEY
Javascript Frameworks for Well Architected, Immersive Web Apps
PDF
Bootstrap 3 Cheat Sheet PDF Reference
PDF
jQuery Mobile: Progressive Enhancement with HTML5
PrimeTime JSF with PrimeFaces - Dec 2014
Pom
Articulo java web
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
Drupal as a web framework
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Templates
Mobile themes, QR codes, and shortURLs
Java - Persist and Replay Runtime Data
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
AspNetWhitePaper
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
RESS – Responsive Webdesign and Server Side Components
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
Javascript Frameworks for Well Architected, Immersive Web Apps
Bootstrap 3 Cheat Sheet PDF Reference
jQuery Mobile: Progressive Enhancement with HTML5
Ad

Similar to AtlasCamp 2013: Modernizing your Plugin UI (20)

PPT
BP204 - Take a REST and put your data to work with APIs!
PDF
HTML5 and the dawn of rich mobile web applications pt 2
PDF
Max Voloshin - "Organization of frontend development for products with micros...
PDF
Native look and feel bbui & alicejs
PDF
Build single page applications using AngularJS on AEM
PPTX
Build single page applications using AngularJS on AEM
PPTX
Build single page applications using AngularJS on AEM
PDF
AspNetWhitePaper
PPTX
Easy tabs, Slideshows, Dashboards, etc - Client Side Scripts for SharePoint
PPTX
Sightly - Part 2
KEY
Master UX from design to prototype
PPT
jQuery Mobile with HTML5
PDF
Design Fast Websites
PDF
Bd conf sencha touch workshop
PPTX
Real-World AJAX with ASP.NET
PDF
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
PPT
Decoding the Web
PPTX
Cross site scripting
PPTX
Enough with the JavaScript already!
PDF
##dd12 sviluppo mobile XPages
BP204 - Take a REST and put your data to work with APIs!
HTML5 and the dawn of rich mobile web applications pt 2
Max Voloshin - "Organization of frontend development for products with micros...
Native look and feel bbui & alicejs
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AspNetWhitePaper
Easy tabs, Slideshows, Dashboards, etc - Client Side Scripts for SharePoint
Sightly - Part 2
Master UX from design to prototype
jQuery Mobile with HTML5
Design Fast Websites
Bd conf sencha touch workshop
Real-World AJAX with ASP.NET
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
Decoding the Web
Cross site scripting
Enough with the JavaScript already!
##dd12 sviluppo mobile XPages
Ad

More from colleenfry (20)

PDF
The 7 habits of high successful atlassian marketplace developers
PDF
True Git
PDF
The 7 habits of high successful atlassian marketplace developers
PDF
The 7 habits of high successful atlassian marketplace developers by dave meyer
PDF
AtlasCamp 2013: Scratch your own itch
PDF
AtlasCamp 2013: Bring your own Stack
PDF
AtlasCamp 2013: A Re-Intriduction to Atlassian Connect: Add-ons for OnDemand
PDF
AtlasCamp 2013: Keynote
PDF
AtlasCamp 2013: Confluence patterns
PDF
AtlasCamp 2013: Confluence Blueprints
PDF
AtlasCamp 2013: Show Me Number! Automated Browser Performance Testing
PDF
AtlasCamp 2013: Confluence State of the Union
PDF
AtlasCamp 2013: ADG / Lean UX
PDF
Atlassian Summit 2013: Confluence State of the Union
PDF
Atlassian: More Awesome with Add-ons
PDF
Flying at the Speed of Git
PDF
The Experience Canvas: How to Use a Core Tool from the Experience-Driven Play...
PDF
True Git: The Great Migration
PDF
Adopting Continuous Integration in an Ops Group
PDF
W4 0245 agility_v1
The 7 habits of high successful atlassian marketplace developers
True Git
The 7 habits of high successful atlassian marketplace developers
The 7 habits of high successful atlassian marketplace developers by dave meyer
AtlasCamp 2013: Scratch your own itch
AtlasCamp 2013: Bring your own Stack
AtlasCamp 2013: A Re-Intriduction to Atlassian Connect: Add-ons for OnDemand
AtlasCamp 2013: Keynote
AtlasCamp 2013: Confluence patterns
AtlasCamp 2013: Confluence Blueprints
AtlasCamp 2013: Show Me Number! Automated Browser Performance Testing
AtlasCamp 2013: Confluence State of the Union
AtlasCamp 2013: ADG / Lean UX
Atlassian Summit 2013: Confluence State of the Union
Atlassian: More Awesome with Add-ons
Flying at the Speed of Git
The Experience Canvas: How to Use a Core Tool from the Experience-Driven Play...
True Git: The Great Migration
Adopting Continuous Integration in an Ops Group
W4 0245 agility_v1

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Machine learning based COVID-19 study performance prediction
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
NewMind AI Monthly Chronicles - July 2025
Machine learning based COVID-19 study performance prediction
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx

AtlasCamp 2013: Modernizing your Plugin UI