SlideShare ist ein Scribd-Unternehmen logo
1 von 143
Downloaden Sie, um offline zu lesen
Tuesday, April 3, 2012
Better front-end development
               in Atlassian plugins
                The road from back-end to front-end programming




                Wojciech Seliga
                JIRA Development Team Lead, Atlassian
                Co-founder, Spartez
                                                                  2
Tuesday, April 3, 2012
About me
                • 4+ years with Atlassian
                • 6+ years doing Atlassian plugin development:
                     • JIRA Importers Plugin
                     • JIRA Drag & Drop Attachments Plugin
                     • JIRA Mail Plugin
                     • ScreenSnipe for JIRA, ScreenSnipe for Confluence ...

                • Veteran of old-school web development (Java)
                                                                             3
Tuesday, April 3, 2012
A bit of history




                                  4
Tuesday, April 3, 2012
A bit of history
                • 2002 - 2006 - Awesome UI, Web 1.0




                                                      4
Tuesday, April 3, 2012
A bit of history
                • 2002 - 2006 - Awesome UI, Web 1.0
                         WebWork, XWork, JSP, Velocity, Freemarker




                                                                     4
Tuesday, April 3, 2012
A bit of history
                • 2002 - 2006 - Awesome UI, Web 1.0
                         WebWork, XWork, JSP, Velocity, Freemarker
                • 2006 - 2009 - Features, features, features!




                                                                     4
Tuesday, April 3, 2012
A bit of history
                • 2002 - 2006 - Awesome UI, Web 1.0
                         WebWork, XWork, JSP, Velocity, Freemarker
                • 2006 - 2009 - Features, features, features!
                         Mostly back-end technologies




                                                                     4
Tuesday, April 3, 2012
A bit of history
                • 2002 - 2006 - Awesome UI, Web 1.0
                         WebWork, XWork, JSP, Velocity, Freemarker
                • 2006 - 2009 - Features, features, features!
                         Mostly back-end technologies
                • 2009 - now - new Atlassian UI, Web 2.0+


                                                                     4
Tuesday, April 3, 2012
Evolution Step 1 - AUI
                • Confluence 3.0+, JIRA 3.13.5+
                • Forms, Controls, Tabs, Inline Dialogs, ..., AJS




                                                                    5
Tuesday, April 3, 2012
Evolution Step 1 - AUI
                • Confluence 3.0+, JIRA 3.13.5+
                • Forms, Controls, Tabs, Inline Dialogs, ..., AJS




                                                                    5
Tuesday, April 3, 2012
Evolution Step 1 - AUI
                • Confluence 3.0+, JIRA 3.13.5+
                • Forms, Controls, Tabs, Inline Dialogs, ..., AJS




                                                                    5
Tuesday, April 3, 2012
Evolution Step 1 - AUI
                • Confluence 3.0+, JIRA 3.13.5+
                • Forms, Controls, Tabs, Inline Dialogs, ..., AJS




                                                                    5
Tuesday, April 3, 2012
Evolution Step 2 - REST
                • Plugin Framework v2 only (JIRA 4+, Confluence 3.1+)
                • Easier AJAX for plugin developers unleashed

          <rest key="helloWorldRest" path="/helloworld" version="1.0">
                  <description>Hello world sample.</description>
          </rest>

                • World of Java annotations (Jersey)

                                                                         6
Tuesday, April 3, 2012
@Path ("priority")
    @AnonymousAllowed
    @Consumes ({ MediaType.APPLICATION_JSON })
    @Produces ({ MediaType.APPLICATION_JSON })
    public class PriorityResource {
        // injected dependencies and the constructor here ...
        @GET
        @Path ("{id}")
        public Response getPriority(@PathParam ("id") final String id){
             final Priority priority = constManager.getPriorityObject(id);
             if (priority == null) {
                 throw new NotFoundWebException(ErrorCollection.of(
                     i18n.getText("rest.priority.error.not.found", id)));
             }

                         return Response.ok(PriorityJsonBean.fullBean(priority, baseUrls))
                             .cacheControl(never()).build();
               }
    }

                                                                                             7
Tuesday, April 3, 2012
injectable JS & CSS
               + REST = WIN




                                     8
Tuesday, April 3, 2012
Evolution Step 3 (2010)
               web resource contexts
                • Confluence 2.10+, JIRA 4.2+
                • Easy resource injection to popular destinations
                • Easy to define own contexts
                         <web-resource key="quick-edit-issue">
                                 <context>jira.view.issue</context>
                                 <context>jira.navigator.advanced</context>
                                 <context>jira.navigator.simple</context>
                                 <!-- ... -->
                             </web-resource>
                                                                              9
Tuesday, April 3, 2012
Evolution Step 4 (2010)
               web-resource-transformer
                 <web-resource-transformer key="my-key"
                       class="fqcn.must.implement.WebResourceTransformer"/>




                                                                              10
Tuesday, April 3, 2012
Evolution Step 4 (2010)
               web-resource-transformer
                 <web-resource-transformer key="my-key"
                       class="fqcn.must.implement.WebResourceTransformer"/>

                  public interface WebResourceTransformer
                  {
                      DownloadableResource transform(Element configElement,
                           ResourceLocation location, String filePath,
                           DownloadableResource nextResource);
                  }



                                                                              10
Tuesday, April 3, 2012
web-resource-transformers




                                           11
Tuesday, April 3, 2012
web-resource-transformers
                • I18n




                                           11
Tuesday, April 3, 2012
web-resource-transformers
                • I18n
                • L&F




                                           11
Tuesday, April 3, 2012
web-resource-transformers
                • I18n
                • L&F
                • context path




                                           11
Tuesday, April 3, 2012
web-resource-transformers
                • I18n
                • L&F
                • context path
                • SASS, LESS




                                           11
Tuesday, April 3, 2012
web-resource-transformers
                • I18n
                • L&F
                • context path
                • SASS, LESS
                • Soy


                                           11
Tuesday, April 3, 2012
I18N




                         12
Tuesday, April 3, 2012
I18N

                         i18n resource file defined in atlassian-plugin.xml
                                hello.world=Hello World
                                from.atlascamp=from AtlasCamp {0}




                                                                              12
Tuesday, April 3, 2012
I18N - web resource
               transformation definition




                                          13
Tuesday, April 3, 2012
I18N - web resource
               transformation definition
         <resource name="ourname" type="i18n"
               location="path/to/i18n/properties/file/no/ext"/>

         <web-resource key="our-key">
               <dependency>com.atlassian.auiplugin:ajs</dependency>
               <transformation extension="js">
                     <transformer key="jsI18n"/>
               </transformation>
               <resource type="download" name="filename.js"
                     location="path/to/filename.js"/>
         </web-resource>


                                                                      13
Tuesday, April 3, 2012
I18N transformation




                                     14
Tuesday, April 3, 2012
I18N transformation

                    var helloText = AJS.I18n.getText("hello.world") + " "
                         + AJS.I18n.getText("from.atlascamp", 2012)




                                                                            14
Tuesday, April 3, 2012
I18N transformation

                    var helloText = AJS.I18n.getText("hello.world") + " "
                         + AJS.I18n.getText("from.atlascamp", 2012)




                                                                            14
Tuesday, April 3, 2012
I18N transformation

                    var helloText = AJS.I18n.getText("hello.world") + " "
                         + AJS.I18n.getText("from.atlascamp", 2012)




                         var helloText = "Hello World" + " "
                              + AJS.format("from AtlasCamp {0}", 2012)


                                                                            14
Tuesday, April 3, 2012
Times of Hacking




                                  15
Tuesday, April 3, 2012
Times of Hacking
             Javascript hacks
                                                                            freestyle AJAX
                                          JQuery                                                                    Javascript hacks
                   JQuery                                  JQuery                                        JQuery
                                                                       JQuery
                                         JQuery                                           JQuery
       JQuery
                               Javascript hacks                            JQuery     JQuery          JQuery            JQuery
                                                       JQuery
               JQuery
                                                           underscore.js        Javascript hacks
                            JQuery                                                                             JQuery        JQuery
                                          JQuery       JQuery                                      JQuery
            JQuery                            JQuery                        Prototype
                                                                                               JQuery        JQuery       JQuery
                         JQuery      JQuery                JQuery            JQuery
                   Javascript hacks
                                                  JQuery               Javascript hacks                 underscore.js
                                                           JQuery                       JQuery                          JQuery
            JQuery                   freestyle AJAX                                                        JQuery
                                                              JQuery         JQuery          JQuery
                         underscore.js                                                                                                 15
Tuesday, April 3, 2012                                                                                                                 JQu
“
                         It's all too easy to create JavaScript applications
                         that end up as tangled piles of jQuery selectors and
                         callbacks, all trying frantically to keep data in sync
                         between the HTML UI, your JavaScript logic, and
                         the database on your server. For rich client-side
                         applications, a more structured approach is often


                                 ”
                         helpful..
                                                                Introduction to Backbone.js

                                                                                              16
Tuesday, April 3, 2012
Evolution Step 5 (2011)


                         Structure on the client side




                                                        17
Tuesday, April 3, 2012
Evolution Step 5 (2011)


                              Structure on the client side

                         For speed, beauty and maintainability


                                                                 17
Tuesday, April 3, 2012
Evolution Step 5 (2011)


                              Structure on the client side

                         For speed, beauty and maintainability

                                         FTW
                                                                 17
Tuesday, April 3, 2012
More structured approach in JS
                • Backbone.js      • Ember.js
                • SproutCore       • Angular.js
                • Sammy.js         • Batman.js
                • Spine.js         • Mustache
                • Cappucino        • Handlebars
                • Javascript MVC   • Soy (Google Closure Templates)
                                                                      18
Tuesday, April 3, 2012
More structured approach in JS

                         • Backbone.js
                         • Soy (Google Closure Templates)




                                                            19
Tuesday, April 3, 2012
More structured approach in JS

                         • Backbone.js
                         • Soy (Google Closure Templates)


                                 MV C
                                                            19
Tuesday, April 3, 2012
More structured approach in JS

                         M Backbone.js
                          •
                          • Soy (Google Closure Templates)


                                     VC
                                                             19
Tuesday, April 3, 2012
More structured approach in JS

                         M Backbone.js
                          •
                                  V
                          • Soy (Google Closure Templates)


                                         C
                                                             19
Tuesday, April 3, 2012
More structured approach in JS

                         M Backbone.js C
                          •
                                  V
                          • Soy (Google Closure Templates)




                                                             19
Tuesday, April 3, 2012
More structured approach in JS

                         • Backbone.js
                         • Soy (Google Closure Templates)




                                                            19
Tuesday, April 3, 2012
More structured approach in JS


                         • Soy (Google Closure Templates)




                                                            19
Tuesday, April 3, 2012
More structured approach in JS




                                                19
Tuesday, April 3, 2012
Our Road to Soy




                                 20
Tuesday, April 3, 2012
Our Road to Soy
                • AJS.template




                                 20
Tuesday, April 3, 2012
Our Road to Soy
                • AJS.template
                • Mustache




                                 20
Tuesday, April 3, 2012
Our Road to Soy
                • AJS.template
                • Mustache
                • Soy




                                 20
Tuesday, April 3, 2012
Soy Features




                              21
Tuesday, April 3, 2012
Soy Features
                • Simplicity




                               21
Tuesday, April 3, 2012
Soy Features
                • Simplicity
                • Logic and display separation




                                                 21
Tuesday, April 3, 2012
Soy Features
                • Simplicity
                • Logic and display separation
                • Client and server side (Javascript and Java)




                                                                 21
Tuesday, April 3, 2012
Soy Features
                • Simplicity
                • Logic and display separation
                • Client and server side (Javascript and Java)
                • Client-side speed




                                                                 21
Tuesday, April 3, 2012
Soy Features
                • Simplicity
                • Logic and display separation
                • Client and server side (Javascript and Java)
                • Client-side speed
                • Security (auto-escaping)


                                                                 21
Tuesday, April 3, 2012
Soy Features
                • Simplicity
                • Logic and display separation
                • Client and server side (Javascript and Java)
                • Client-side speed
                • Security (auto-escaping)
                • Battle-tested by Google
                                                                 21
Tuesday, April 3, 2012
Soy - Example
        {namespace examples.simple}
        /**
         * Greets a person using "Hello" by default.
         * @param name The name of the person.
         * @param? greetingWord Optional greeting word to use instead of
        "Hello".
         */
        {template .helloName}
          {if not $greetingWord}
            Hello {$name}!
          {else}
            {$greetingWord} {$name}!
          {/if}
        {/template}
                                                                           22
Tuesday, April 3, 2012
Soy Syntax - Types
                          Type                  Examples
                           null                     null
                         Boolean                false, true
                         Integer            123, -857, 0x123
                          Float            0.5, 123.0, 10.1e4
                          String         'Atlassian', '', 'foo-bar'
                           List         [], [1, 'two', 3, [4, 'five']]
                          Map      [:], ['key': 'value', 'key2': 'value2']

                                                                             23
Tuesday, April 3, 2012
Soy Syntax - Operators
                         •   - (unary) not
                         •   * / %
                         •   + - (binary)
                         •   < > <= >=
                         •   == !=
                         •   and
                         •   or
                         •   ?: (ternary)

                                             24
Tuesday, April 3, 2012
Soy - Commands




                                25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}




                                               25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}
                     • {literal}{/literal}




                                               25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}
                     • {literal}{/literal}
                     • {print <expression>}




                                               25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}
                     • {literal}{/literal}
                     • {print <expression>}
                     • {<expression>}




                                               25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}
                     • {literal}{/literal}
                     • {print <expression>}
                     • {<expression>}
                     • {if <expression>},
                       {elseif}, {else}, {/if}

                                                 25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}     • {foreach}, {ifempty}, {/foreach}
                     • {literal}{/literal}
                     • {print <expression>}
                     • {<expression>}
                     • {if <expression>},
                       {elseif}, {else}, {/if}

                                                                                      25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}     • {foreach}, {ifempty}, {/foreach}
                     • {literal}{/literal}       • {for}, {/for}
                     • {print <expression>}
                     • {<expression>}
                     • {if <expression>},
                       {elseif}, {else}, {/if}

                                                                                      25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}     • {foreach}, {ifempty}, {/foreach}
                     • {literal}{/literal}       • {for}, {/for}
                     • {print <expression>}      • {call}, {/call}, {param}, {/param}
                     • {<expression>}
                     • {if <expression>},
                       {elseif}, {else}, {/if}

                                                                                        25
Tuesday, April 3, 2012
Soy - Commands
                     • {template}{/template}     • {foreach}, {ifempty}, {/foreach}
                     • {literal}{/literal}       • {for}, {/for}
                     • {print <expression>}      • {call}, {/call}, {param}, {/param}
                     • {<expression>}            • {sp}, {n}, {lb}, {rb}
                     • {if <expression>},
                       {elseif}, {else}, {/if}

                                                                                        25
Tuesday, April 3, 2012
Soy - defining variables




                                         26
Tuesday, April 3, 2012
Soy - defining variables




                                         26
Tuesday, April 3, 2012
Soy - defining variables




                  Not Supported!
                         Keep business logic away from view!   26
Tuesday, April 3, 2012
Useful functions
                     • {getText('i18n-key', ....)
                     • {contextPath}
                     • {$data|truncate:30}




                                                    27
Tuesday, April 3, 2012
Soy Javascript Compilation

                         {namespace JIRA.Templates.Demo}
                         /**
                         * Simplest Hello world demo
                         * @param name
                         */
                         {template .helloWorld}
                         <div>Hello World, {$name}</div>
                         {/template}



                                                           28
Tuesday, April 3, 2012
28
Tuesday, April 3, 2012
29
Tuesday, April 3, 2012
// This file was automatically generated from demo.soy.
       // Please don't edit this file by hand.

       if (typeof JIRA == 'undefined') { var JIRA = {}; }
       if (typeof JIRA.Templates == 'undefined') { JIRA.Templates = {}; }
       if (typeof JIRA.Templates.Demo == 'undefined')
       { JIRA.Templates.Demo = {}; }


       JIRA.Templates.Demo.helloWorld = function(opt_data, opt_sb) {
          var output = opt_sb || new soy.StringBuilder();
          output.append('<div>Hello World, ',
            soy.$$escapeHtml(opt_data.name), '</div>');
          return opt_sb ? '' : output.toString();
       };


                                                                        29
Tuesday, April 3, 2012
// This file was automatically generated from demo.soy.
       // Please don't edit this file by hand.

       if (typeof JIRA == 'undefined') { var JIRA = {}; }
       if (typeof JIRA.Templates == 'undefined') { JIRA.Templates = {}; }
       if (typeof JIRA.Templates.Demo == 'undefined')
       { JIRA.Templates.Demo = {}; }


       JIRA.Templates.Demo.helloWorld = function(opt_data, opt_sb) {
          var output = opt_sb || new soy.StringBuilder();
          output.append('<div>Hello World, ',
            soy.$$escapeHtml(opt_data.name), '</div>');
          return opt_sb ? '' : output.toString();
       };


                                                                        29
Tuesday, April 3, 2012
Auto-escaping
                     • implicit by default to HTML escaping
                     • {namespace com.example autoescape="XXX"}
                       XXX may be true, false, contextual
                     • disable for a single case with
                       {$templateData|noAutoescape}
                     • sanitized data

                                                                  30
Tuesday, April 3, 2012
Contextual Auto-escaping




                                          31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}




                                                                                         31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}




                                                                                         31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}




                                                                                                  31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}


       <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E"
       onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'">
       &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a>



                                                                                                  31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}


       <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E"
       onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'">
       &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a>



                                                                                                  31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}


       <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E"
       onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'">
       &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a>



                                                                                                  31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}


       <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E"
       onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'">
       &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a>



                                                                                                  31
Tuesday, April 3, 2012
Contextual Auto-escaping
                    /**
                     * @param name
                     */
                    {template .helloWorld autoescape="contextual"}
                    <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a>
                    {/template}

                                                         {“name”: "><script>alert("x&xx")</script>"}


       <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E"
       onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'">
       &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a>



                                                                                                  31
Tuesday, April 3, 2012
Soy @ Atlassian
                • JIRA (gadgets, new project administration, mails, ...)
                • GreenHopper
                • PAC
                • ...




                                                                           32
Tuesday, April 3, 2012
Soy and Atlassian Plugins
            <web-resource key="my-key">

                         <transformation extension="soy">
                             <transformer key="soyTransformer"/>
                         </transformation>

                    <resource type="download" name="my-name.js"
                              location="path/to/my/template.soy"/>
            </web-resource>




                                                                     33
Tuesday, April 3, 2012
Server-side Soy
                • Atlassian Plugin Framework favours Velocity
                • SoyTemplateRenderer/SoyTemplateRendererProvider
                • DefaultVelocityContextProvider (jira-core)
                • SoyData, SoyDataList, SoyDataMap,
                  SoyData.createFromExistingData()



                                                                    34
Tuesday, April 3, 2012
Soy - Coding Example




                                      35
Tuesday, April 3, 2012
Soy - Template Library
                     • {call} in Soy
                     • web-resource <dependency>




                                                   36
Tuesday, April 3, 2012
Backbone.js



                                       37
Tuesday, April 3, 2012
Backbone.js
                     • Event-driven
                     • Models
                     • Views (responsible for keeping markup in sync with
                       model)




                                                                            38
Tuesday, April 3, 2012
Our story with backbone.js




                                            39
Tuesday, April 3, 2012
Our story with backbone.js
                • Version/Component/People management in JIRA
                  (Ignite) - 2011




                                                                39
Tuesday, April 3, 2012
Our story with backbone.js
                • Version/Component/People management in JIRA
                  (Ignite) - 2011
                • JIRA Importers Plugin, JIRA Mail Plugin - 2011




                                                                   39
Tuesday, April 3, 2012
Our story with backbone.js
                • Version/Component/People management in JIRA
                  (Ignite) - 2011
                • JIRA Importers Plugin, JIRA Mail Plugin - 2011
                • RAB - 2011




                                                                   39
Tuesday, April 3, 2012
Our story with backbone.js
                • Version/Component/People management in JIRA
                  (Ignite) - 2011
                • JIRA Importers Plugin, JIRA Mail Plugin - 2011
                • RAB - 2011
                • GH RapidBoard, New Issue Nav - 2011, 2012



                                                                   39
Tuesday, April 3, 2012
Why Backbone




                              40
Tuesday, April 3, 2012
Why Backbone

                         backbone.js




                                       40
Tuesday, April 3, 2012
Why Backbone

                            backbone.js

                         JIRA is a backbone



                                              40
Tuesday, April 3, 2012
Why Backbone



                         JIRA is a backbone
                                   backbone.js



                                                 40
Tuesday, April 3, 2012
Why Backbone.js




                                 41
Tuesday, April 3, 2012
Why Backbone.js
                • Small




                                 41
Tuesday, April 3, 2012
Why Backbone.js
                • Small
                • Flexible




                                 41
Tuesday, April 3, 2012
Why Backbone.js
                • Small
                • Flexible
                • Does not impose any templating technologies




                                                                41
Tuesday, April 3, 2012
Why Backbone.js
                • Small
                • Flexible
                • Does not impose any templating technologies
                • Well documented




                                                                41
Tuesday, April 3, 2012
Why Backbone.js
                • Small
                • Flexible
                • Does not impose any templating technologies
                • Well documented
                • Popular


                                                                41
Tuesday, April 3, 2012
Why Backbone.js
                • Small
                • Flexible
                • Does not impose any templating technologies
                • Well documented
                • Popular
                • Liked by us
                                                                41
Tuesday, April 3, 2012
42
Tuesday, April 3, 2012
DOM / Markup

                                        42
Tuesday, April 3, 2012
Javascript


                         DOM / Markup

                                                 42
Tuesday, April 3, 2012
Javascript


                         DOM / Markup

                                                 42
Tuesday, April 3, 2012
JQuery


                                    Javascript


                         DOM / Markup

                                                          42
Tuesday, April 3, 2012
JQuery


                                    Javascript


                         DOM / Markup

                                                          42
Tuesday, April 3, 2012
AUI                JQuery


                                     Javascript


                         DOM / Markup

                                                           42
Tuesday, April 3, 2012
AUI                JQuery


                                     Javascript


                         DOM / Markup

                                                           42
Tuesday, April 3, 2012
AUI                JQuery


                                     Javascript


                         DOM / Markup

                                                           42
Tuesday, April 3, 2012
AUI                JQuery


                                     Javascript


                         DOM / Markup

                                                           42
Tuesday, April 3, 2012
Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Backbone.js




                         Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Backbone.js




                         Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Backbone.js




                         Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Backbone.js




                         Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
Backbone.js




                         Soy (client)         AUI                JQuery


                                                    Javascript


                                        DOM / Markup

                                                                          42
Tuesday, April 3, 2012
REST API                       Backbone.js




                           Soy (client)         AUI                JQuery


                                                      Javascript


                                          DOM / Markup

                                                                            42
Tuesday, April 3, 2012
REST API                       Backbone.js




                           Soy (client)         AUI                JQuery


                                                      Javascript


                                          DOM / Markup

                                                                            42
Tuesday, April 3, 2012
REST API                       Backbone.js


                Services
                Managers   Soy (client)         AUI                JQuery


                                                      Javascript


                                          DOM / Markup

                                                                            42
Tuesday, April 3, 2012
REST API                       Backbone.js


                Services
                Managers   Soy (client)         AUI                JQuery


                                                      Javascript


                                          DOM / Markup

                                                                            42
Tuesday, April 3, 2012
Possible Future
                • Easier, more powerful and efficient web resource
                  transformations
                • Better support for Soy on the server side (like Velocity
                  or FreeMarker)
                • (?) Dynamic injection of needed resources on-the-fly
                  (inline dialogs)


                                                                             43
Tuesday, April 3, 2012
Looking back...




                                 44
Tuesday, April 3, 2012
Looking back...


               2.5 years ago...




                                  44
Tuesday, April 3, 2012
Looking back...


               2.5 years ago...
               most of this stuff was not possible


                                                     44
Tuesday, April 3, 2012
“    Don’t underestimate the power of the client-side
                         programming. Time to learn Javascript and
                         related frameworks, you old Java fellow
                                                                   ”
                                                             Master Joda, Javascript convert




                                                                                               45
Tuesday, April 3, 2012
TAKE-AWAYS




                 “       Atlassian is moving fast to client-side programming.
                         Technology is there. Are you ready?
                                                               ”
                          #atlascamp


                                                                                46
Tuesday, April 3, 2012
Thank you!




Tuesday, April 3, 2012

Weitere ähnliche Inhalte

Was ist angesagt?

Whats up with wicket 8 and java 8
Whats up with wicket 8 and java 8Whats up with wicket 8 and java 8
Whats up with wicket 8 and java 8Martijn Dashorst
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web IntegrationKazuchika Sekiya
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6Bert Ertman
 
Wicket Introduction
Wicket IntroductionWicket Introduction
Wicket IntroductionEyal Golan
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Hirofumi Iwasaki
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksDmitry Kornilov
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 RecipesJosh Juneau
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowRussell Maher
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Matt Raible
 
Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011Matt Raible
 

Was ist angesagt? (20)

Whats up with wicket 8 and java 8
Whats up with wicket 8 and java 8Whats up with wicket 8 and java 8
Whats up with wicket 8 and java 8
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David DelabasseeJavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
 
Wicket Introduction
Wicket IntroductionWicket Introduction
Wicket Introduction
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworksJSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
 
Practical ERSync
Practical ERSyncPractical ERSync
Practical ERSync
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
Apache Wicket
Apache WicketApache Wicket
Apache Wicket
 
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is NowJMP402 Master Class: Managed beans and XPages: Your Time Is Now
JMP402 Master Class: Managed beans and XPages: Your Time Is Now
 
Wicket 2010
Wicket 2010Wicket 2010
Wicket 2010
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
 
Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011
 

Ähnlich wie Better front-end development in Atlassian plugins

Feature driven agile oriented web applications
Feature driven agile oriented web applicationsFeature driven agile oriented web applications
Feature driven agile oriented web applicationsRam G Athreya
 
11g boot camp weblogic and adf
11g boot camp weblogic and adf11g boot camp weblogic and adf
11g boot camp weblogic and adfChad Thompson
 
Scaling Pinterest
Scaling PinterestScaling Pinterest
Scaling PinterestC4Media
 
Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Ejada
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
Resume Chronological
Resume ChronologicalResume Chronological
Resume ChronologicalMichael Fons
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...Sencha
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performanceJohn McCaffrey
 
SemTechBiz 2012 Panel on Linking Enterprise Data
SemTechBiz 2012 Panel on Linking Enterprise DataSemTechBiz 2012 Panel on Linking Enterprise Data
SemTechBiz 2012 Panel on Linking Enterprise Data3 Round Stones
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
Best Practices to SharePoint Physical and Information Architecture
Best Practices to SharePoint Physical and Information ArchitectureBest Practices to SharePoint Physical and Information Architecture
Best Practices to SharePoint Physical and Information ArchitectureJoel Oleson
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Arun Gupta
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)Jia Mi
 
Oracle web-applications
Oracle web-applicationsOracle web-applications
Oracle web-applicationsurskeshav
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update finalJoshua Long
 
StackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinStackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinBoyd Hemphill
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.jsaortbals
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 

Ähnlich wie Better front-end development in Atlassian plugins (20)

Feature driven agile oriented web applications
Feature driven agile oriented web applicationsFeature driven agile oriented web applications
Feature driven agile oriented web applications
 
11g boot camp weblogic and adf
11g boot camp weblogic and adf11g boot camp weblogic and adf
11g boot camp weblogic and adf
 
Scaling Pinterest
Scaling PinterestScaling Pinterest
Scaling Pinterest
 
Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Upgrading to SharePoint 2013
Upgrading to SharePoint 2013
 
Hybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbaiHybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbai
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Resume Chronological
Resume ChronologicalResume Chronological
Resume Chronological
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine Meetup
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
 
SemTechBiz 2012 Panel on Linking Enterprise Data
SemTechBiz 2012 Panel on Linking Enterprise DataSemTechBiz 2012 Panel on Linking Enterprise Data
SemTechBiz 2012 Panel on Linking Enterprise Data
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
Best Practices to SharePoint Physical and Information Architecture
Best Practices to SharePoint Physical and Information ArchitectureBest Practices to SharePoint Physical and Information Architecture
Best Practices to SharePoint Physical and Information Architecture
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
 
Oracle web-applications
Oracle web-applicationsOracle web-applications
Oracle web-applications
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update final
 
StackEngine Demo - Docker Austin
StackEngine Demo - Docker AustinStackEngine Demo - Docker Austin
StackEngine Demo - Docker Austin
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.js
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 

Mehr von Atlassian

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App ShowcaseAtlassian
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UIAtlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge RuntimeAtlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeAtlassian
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelAtlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemAtlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the HoodAtlassian
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAtlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginAtlassian
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingAtlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterAtlassian
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindAtlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsAtlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamAtlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in MindAtlassian
 

Mehr von Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 

Kürzlich hochgeladen

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Better front-end development in Atlassian plugins

  • 2. Better front-end development in Atlassian plugins The road from back-end to front-end programming Wojciech Seliga JIRA Development Team Lead, Atlassian Co-founder, Spartez 2 Tuesday, April 3, 2012
  • 3. About me • 4+ years with Atlassian • 6+ years doing Atlassian plugin development: • JIRA Importers Plugin • JIRA Drag & Drop Attachments Plugin • JIRA Mail Plugin • ScreenSnipe for JIRA, ScreenSnipe for Confluence ... • Veteran of old-school web development (Java) 3 Tuesday, April 3, 2012
  • 4. A bit of history 4 Tuesday, April 3, 2012
  • 5. A bit of history • 2002 - 2006 - Awesome UI, Web 1.0 4 Tuesday, April 3, 2012
  • 6. A bit of history • 2002 - 2006 - Awesome UI, Web 1.0 WebWork, XWork, JSP, Velocity, Freemarker 4 Tuesday, April 3, 2012
  • 7. A bit of history • 2002 - 2006 - Awesome UI, Web 1.0 WebWork, XWork, JSP, Velocity, Freemarker • 2006 - 2009 - Features, features, features! 4 Tuesday, April 3, 2012
  • 8. A bit of history • 2002 - 2006 - Awesome UI, Web 1.0 WebWork, XWork, JSP, Velocity, Freemarker • 2006 - 2009 - Features, features, features! Mostly back-end technologies 4 Tuesday, April 3, 2012
  • 9. A bit of history • 2002 - 2006 - Awesome UI, Web 1.0 WebWork, XWork, JSP, Velocity, Freemarker • 2006 - 2009 - Features, features, features! Mostly back-end technologies • 2009 - now - new Atlassian UI, Web 2.0+ 4 Tuesday, April 3, 2012
  • 10. Evolution Step 1 - AUI • Confluence 3.0+, JIRA 3.13.5+ • Forms, Controls, Tabs, Inline Dialogs, ..., AJS 5 Tuesday, April 3, 2012
  • 11. Evolution Step 1 - AUI • Confluence 3.0+, JIRA 3.13.5+ • Forms, Controls, Tabs, Inline Dialogs, ..., AJS 5 Tuesday, April 3, 2012
  • 12. Evolution Step 1 - AUI • Confluence 3.0+, JIRA 3.13.5+ • Forms, Controls, Tabs, Inline Dialogs, ..., AJS 5 Tuesday, April 3, 2012
  • 13. Evolution Step 1 - AUI • Confluence 3.0+, JIRA 3.13.5+ • Forms, Controls, Tabs, Inline Dialogs, ..., AJS 5 Tuesday, April 3, 2012
  • 14. Evolution Step 2 - REST • Plugin Framework v2 only (JIRA 4+, Confluence 3.1+) • Easier AJAX for plugin developers unleashed <rest key="helloWorldRest" path="/helloworld" version="1.0"> <description>Hello world sample.</description> </rest> • World of Java annotations (Jersey) 6 Tuesday, April 3, 2012
  • 15. @Path ("priority") @AnonymousAllowed @Consumes ({ MediaType.APPLICATION_JSON }) @Produces ({ MediaType.APPLICATION_JSON }) public class PriorityResource { // injected dependencies and the constructor here ... @GET @Path ("{id}") public Response getPriority(@PathParam ("id") final String id){ final Priority priority = constManager.getPriorityObject(id); if (priority == null) { throw new NotFoundWebException(ErrorCollection.of( i18n.getText("rest.priority.error.not.found", id))); } return Response.ok(PriorityJsonBean.fullBean(priority, baseUrls)) .cacheControl(never()).build(); } } 7 Tuesday, April 3, 2012
  • 16. injectable JS & CSS + REST = WIN 8 Tuesday, April 3, 2012
  • 17. Evolution Step 3 (2010) web resource contexts • Confluence 2.10+, JIRA 4.2+ • Easy resource injection to popular destinations • Easy to define own contexts <web-resource key="quick-edit-issue"> <context>jira.view.issue</context> <context>jira.navigator.advanced</context> <context>jira.navigator.simple</context> <!-- ... --> </web-resource> 9 Tuesday, April 3, 2012
  • 18. Evolution Step 4 (2010) web-resource-transformer <web-resource-transformer key="my-key" class="fqcn.must.implement.WebResourceTransformer"/> 10 Tuesday, April 3, 2012
  • 19. Evolution Step 4 (2010) web-resource-transformer <web-resource-transformer key="my-key" class="fqcn.must.implement.WebResourceTransformer"/> public interface WebResourceTransformer { DownloadableResource transform(Element configElement, ResourceLocation location, String filePath, DownloadableResource nextResource); } 10 Tuesday, April 3, 2012
  • 20. web-resource-transformers 11 Tuesday, April 3, 2012
  • 21. web-resource-transformers • I18n 11 Tuesday, April 3, 2012
  • 22. web-resource-transformers • I18n • L&F 11 Tuesday, April 3, 2012
  • 23. web-resource-transformers • I18n • L&F • context path 11 Tuesday, April 3, 2012
  • 24. web-resource-transformers • I18n • L&F • context path • SASS, LESS 11 Tuesday, April 3, 2012
  • 25. web-resource-transformers • I18n • L&F • context path • SASS, LESS • Soy 11 Tuesday, April 3, 2012
  • 26. I18N 12 Tuesday, April 3, 2012
  • 27. I18N i18n resource file defined in atlassian-plugin.xml hello.world=Hello World from.atlascamp=from AtlasCamp {0} 12 Tuesday, April 3, 2012
  • 28. I18N - web resource transformation definition 13 Tuesday, April 3, 2012
  • 29. I18N - web resource transformation definition <resource name="ourname" type="i18n" location="path/to/i18n/properties/file/no/ext"/> <web-resource key="our-key"> <dependency>com.atlassian.auiplugin:ajs</dependency> <transformation extension="js"> <transformer key="jsI18n"/> </transformation> <resource type="download" name="filename.js" location="path/to/filename.js"/> </web-resource> 13 Tuesday, April 3, 2012
  • 30. I18N transformation 14 Tuesday, April 3, 2012
  • 31. I18N transformation var helloText = AJS.I18n.getText("hello.world") + " " + AJS.I18n.getText("from.atlascamp", 2012) 14 Tuesday, April 3, 2012
  • 32. I18N transformation var helloText = AJS.I18n.getText("hello.world") + " " + AJS.I18n.getText("from.atlascamp", 2012) 14 Tuesday, April 3, 2012
  • 33. I18N transformation var helloText = AJS.I18n.getText("hello.world") + " " + AJS.I18n.getText("from.atlascamp", 2012) var helloText = "Hello World" + " " + AJS.format("from AtlasCamp {0}", 2012) 14 Tuesday, April 3, 2012
  • 34. Times of Hacking 15 Tuesday, April 3, 2012
  • 35. Times of Hacking Javascript hacks freestyle AJAX JQuery Javascript hacks JQuery JQuery JQuery JQuery JQuery JQuery JQuery Javascript hacks JQuery JQuery JQuery JQuery JQuery JQuery underscore.js Javascript hacks JQuery JQuery JQuery JQuery JQuery JQuery JQuery JQuery Prototype JQuery JQuery JQuery JQuery JQuery JQuery JQuery Javascript hacks JQuery Javascript hacks underscore.js JQuery JQuery JQuery JQuery freestyle AJAX JQuery JQuery JQuery JQuery underscore.js 15 Tuesday, April 3, 2012 JQu
  • 36. It's all too easy to create JavaScript applications that end up as tangled piles of jQuery selectors and callbacks, all trying frantically to keep data in sync between the HTML UI, your JavaScript logic, and the database on your server. For rich client-side applications, a more structured approach is often ” helpful.. Introduction to Backbone.js 16 Tuesday, April 3, 2012
  • 37. Evolution Step 5 (2011) Structure on the client side 17 Tuesday, April 3, 2012
  • 38. Evolution Step 5 (2011) Structure on the client side For speed, beauty and maintainability 17 Tuesday, April 3, 2012
  • 39. Evolution Step 5 (2011) Structure on the client side For speed, beauty and maintainability FTW 17 Tuesday, April 3, 2012
  • 40. More structured approach in JS • Backbone.js • Ember.js • SproutCore • Angular.js • Sammy.js • Batman.js • Spine.js • Mustache • Cappucino • Handlebars • Javascript MVC • Soy (Google Closure Templates) 18 Tuesday, April 3, 2012
  • 41. More structured approach in JS • Backbone.js • Soy (Google Closure Templates) 19 Tuesday, April 3, 2012
  • 42. More structured approach in JS • Backbone.js • Soy (Google Closure Templates) MV C 19 Tuesday, April 3, 2012
  • 43. More structured approach in JS M Backbone.js • • Soy (Google Closure Templates) VC 19 Tuesday, April 3, 2012
  • 44. More structured approach in JS M Backbone.js • V • Soy (Google Closure Templates) C 19 Tuesday, April 3, 2012
  • 45. More structured approach in JS M Backbone.js C • V • Soy (Google Closure Templates) 19 Tuesday, April 3, 2012
  • 46. More structured approach in JS • Backbone.js • Soy (Google Closure Templates) 19 Tuesday, April 3, 2012
  • 47. More structured approach in JS • Soy (Google Closure Templates) 19 Tuesday, April 3, 2012
  • 48. More structured approach in JS 19 Tuesday, April 3, 2012
  • 49. Our Road to Soy 20 Tuesday, April 3, 2012
  • 50. Our Road to Soy • AJS.template 20 Tuesday, April 3, 2012
  • 51. Our Road to Soy • AJS.template • Mustache 20 Tuesday, April 3, 2012
  • 52. Our Road to Soy • AJS.template • Mustache • Soy 20 Tuesday, April 3, 2012
  • 53. Soy Features 21 Tuesday, April 3, 2012
  • 54. Soy Features • Simplicity 21 Tuesday, April 3, 2012
  • 55. Soy Features • Simplicity • Logic and display separation 21 Tuesday, April 3, 2012
  • 56. Soy Features • Simplicity • Logic and display separation • Client and server side (Javascript and Java) 21 Tuesday, April 3, 2012
  • 57. Soy Features • Simplicity • Logic and display separation • Client and server side (Javascript and Java) • Client-side speed 21 Tuesday, April 3, 2012
  • 58. Soy Features • Simplicity • Logic and display separation • Client and server side (Javascript and Java) • Client-side speed • Security (auto-escaping) 21 Tuesday, April 3, 2012
  • 59. Soy Features • Simplicity • Logic and display separation • Client and server side (Javascript and Java) • Client-side speed • Security (auto-escaping) • Battle-tested by Google 21 Tuesday, April 3, 2012
  • 60. Soy - Example {namespace examples.simple} /**  * Greets a person using "Hello" by default.  * @param name The name of the person.  * @param? greetingWord Optional greeting word to use instead of "Hello".  */ {template .helloName} {if not $greetingWord} Hello {$name}! {else} {$greetingWord} {$name}! {/if} {/template} 22 Tuesday, April 3, 2012
  • 61. Soy Syntax - Types Type Examples null null Boolean false, true Integer 123, -857, 0x123 Float 0.5, 123.0, 10.1e4 String 'Atlassian', '', 'foo-bar' List [], [1, 'two', 3, [4, 'five']] Map [:], ['key': 'value', 'key2': 'value2'] 23 Tuesday, April 3, 2012
  • 62. Soy Syntax - Operators • - (unary) not • * / % • + - (binary) • < > <= >= • == != • and • or • ?: (ternary) 24 Tuesday, April 3, 2012
  • 63. Soy - Commands 25 Tuesday, April 3, 2012
  • 64. Soy - Commands • {template}{/template} 25 Tuesday, April 3, 2012
  • 65. Soy - Commands • {template}{/template} • {literal}{/literal} 25 Tuesday, April 3, 2012
  • 66. Soy - Commands • {template}{/template} • {literal}{/literal} • {print <expression>} 25 Tuesday, April 3, 2012
  • 67. Soy - Commands • {template}{/template} • {literal}{/literal} • {print <expression>} • {<expression>} 25 Tuesday, April 3, 2012
  • 68. Soy - Commands • {template}{/template} • {literal}{/literal} • {print <expression>} • {<expression>} • {if <expression>}, {elseif}, {else}, {/if} 25 Tuesday, April 3, 2012
  • 69. Soy - Commands • {template}{/template} • {foreach}, {ifempty}, {/foreach} • {literal}{/literal} • {print <expression>} • {<expression>} • {if <expression>}, {elseif}, {else}, {/if} 25 Tuesday, April 3, 2012
  • 70. Soy - Commands • {template}{/template} • {foreach}, {ifempty}, {/foreach} • {literal}{/literal} • {for}, {/for} • {print <expression>} • {<expression>} • {if <expression>}, {elseif}, {else}, {/if} 25 Tuesday, April 3, 2012
  • 71. Soy - Commands • {template}{/template} • {foreach}, {ifempty}, {/foreach} • {literal}{/literal} • {for}, {/for} • {print <expression>} • {call}, {/call}, {param}, {/param} • {<expression>} • {if <expression>}, {elseif}, {else}, {/if} 25 Tuesday, April 3, 2012
  • 72. Soy - Commands • {template}{/template} • {foreach}, {ifempty}, {/foreach} • {literal}{/literal} • {for}, {/for} • {print <expression>} • {call}, {/call}, {param}, {/param} • {<expression>} • {sp}, {n}, {lb}, {rb} • {if <expression>}, {elseif}, {else}, {/if} 25 Tuesday, April 3, 2012
  • 73. Soy - defining variables 26 Tuesday, April 3, 2012
  • 74. Soy - defining variables 26 Tuesday, April 3, 2012
  • 75. Soy - defining variables Not Supported! Keep business logic away from view! 26 Tuesday, April 3, 2012
  • 76. Useful functions • {getText('i18n-key', ....) • {contextPath} • {$data|truncate:30} 27 Tuesday, April 3, 2012
  • 77. Soy Javascript Compilation {namespace JIRA.Templates.Demo} /** * Simplest Hello world demo * @param name */ {template .helloWorld} <div>Hello World, {$name}</div> {/template} 28 Tuesday, April 3, 2012
  • 80. // This file was automatically generated from demo.soy. // Please don't edit this file by hand. if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Templates == 'undefined') { JIRA.Templates = {}; } if (typeof JIRA.Templates.Demo == 'undefined') { JIRA.Templates.Demo = {}; } JIRA.Templates.Demo.helloWorld = function(opt_data, opt_sb) { var output = opt_sb || new soy.StringBuilder(); output.append('<div>Hello World, ', soy.$$escapeHtml(opt_data.name), '</div>'); return opt_sb ? '' : output.toString(); }; 29 Tuesday, April 3, 2012
  • 81. // This file was automatically generated from demo.soy. // Please don't edit this file by hand. if (typeof JIRA == 'undefined') { var JIRA = {}; } if (typeof JIRA.Templates == 'undefined') { JIRA.Templates = {}; } if (typeof JIRA.Templates.Demo == 'undefined') { JIRA.Templates.Demo = {}; } JIRA.Templates.Demo.helloWorld = function(opt_data, opt_sb) { var output = opt_sb || new soy.StringBuilder(); output.append('<div>Hello World, ', soy.$$escapeHtml(opt_data.name), '</div>'); return opt_sb ? '' : output.toString(); }; 29 Tuesday, April 3, 2012
  • 82. Auto-escaping • implicit by default to HTML escaping • {namespace com.example autoescape="XXX"} XXX may be true, false, contextual • disable for a single case with {$templateData|noAutoescape} • sanitized data 30 Tuesday, April 3, 2012
  • 83. Contextual Auto-escaping 31 Tuesday, April 3, 2012
  • 84. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} 31 Tuesday, April 3, 2012
  • 85. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} 31 Tuesday, April 3, 2012
  • 86. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} 31 Tuesday, April 3, 2012
  • 87. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E" onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'"> &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a> 31 Tuesday, April 3, 2012
  • 88. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E" onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'"> &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a> 31 Tuesday, April 3, 2012
  • 89. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E" onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'"> &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a> 31 Tuesday, April 3, 2012
  • 90. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E" onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'"> &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a> 31 Tuesday, April 3, 2012
  • 91. Contextual Auto-escaping /** * @param name */ {template .helloWorld autoescape="contextual"} <a href="/Demo?name={$name}" onclick="var x = {$name}">{$name}</a> {/template} {“name”: "><script>alert("x&xx")</script>"} <a href="/Demo?name=%3E%3Cscript%3Ealert%28%22x%26xx%22%29%3C%2Fscript%3E" onclick="var x = 'x3ex3cscriptx3ealert(x22xx26xxx22)x3c/scriptx3e'"> &gt;&lt;script&gt;alert(&quot;x&amp;xx&quot;)&lt;/script&gt;</a> 31 Tuesday, April 3, 2012
  • 92. Soy @ Atlassian • JIRA (gadgets, new project administration, mails, ...) • GreenHopper • PAC • ... 32 Tuesday, April 3, 2012
  • 93. Soy and Atlassian Plugins <web-resource key="my-key"> <transformation extension="soy"> <transformer key="soyTransformer"/> </transformation> <resource type="download" name="my-name.js" location="path/to/my/template.soy"/> </web-resource> 33 Tuesday, April 3, 2012
  • 94. Server-side Soy • Atlassian Plugin Framework favours Velocity • SoyTemplateRenderer/SoyTemplateRendererProvider • DefaultVelocityContextProvider (jira-core) • SoyData, SoyDataList, SoyDataMap, SoyData.createFromExistingData() 34 Tuesday, April 3, 2012
  • 95. Soy - Coding Example 35 Tuesday, April 3, 2012
  • 96. Soy - Template Library • {call} in Soy • web-resource <dependency> 36 Tuesday, April 3, 2012
  • 97. Backbone.js 37 Tuesday, April 3, 2012
  • 98. Backbone.js • Event-driven • Models • Views (responsible for keeping markup in sync with model) 38 Tuesday, April 3, 2012
  • 99. Our story with backbone.js 39 Tuesday, April 3, 2012
  • 100. Our story with backbone.js • Version/Component/People management in JIRA (Ignite) - 2011 39 Tuesday, April 3, 2012
  • 101. Our story with backbone.js • Version/Component/People management in JIRA (Ignite) - 2011 • JIRA Importers Plugin, JIRA Mail Plugin - 2011 39 Tuesday, April 3, 2012
  • 102. Our story with backbone.js • Version/Component/People management in JIRA (Ignite) - 2011 • JIRA Importers Plugin, JIRA Mail Plugin - 2011 • RAB - 2011 39 Tuesday, April 3, 2012
  • 103. Our story with backbone.js • Version/Component/People management in JIRA (Ignite) - 2011 • JIRA Importers Plugin, JIRA Mail Plugin - 2011 • RAB - 2011 • GH RapidBoard, New Issue Nav - 2011, 2012 39 Tuesday, April 3, 2012
  • 104. Why Backbone 40 Tuesday, April 3, 2012
  • 105. Why Backbone backbone.js 40 Tuesday, April 3, 2012
  • 106. Why Backbone backbone.js JIRA is a backbone 40 Tuesday, April 3, 2012
  • 107. Why Backbone JIRA is a backbone backbone.js 40 Tuesday, April 3, 2012
  • 108. Why Backbone.js 41 Tuesday, April 3, 2012
  • 109. Why Backbone.js • Small 41 Tuesday, April 3, 2012
  • 110. Why Backbone.js • Small • Flexible 41 Tuesday, April 3, 2012
  • 111. Why Backbone.js • Small • Flexible • Does not impose any templating technologies 41 Tuesday, April 3, 2012
  • 112. Why Backbone.js • Small • Flexible • Does not impose any templating technologies • Well documented 41 Tuesday, April 3, 2012
  • 113. Why Backbone.js • Small • Flexible • Does not impose any templating technologies • Well documented • Popular 41 Tuesday, April 3, 2012
  • 114. Why Backbone.js • Small • Flexible • Does not impose any templating technologies • Well documented • Popular • Liked by us 41 Tuesday, April 3, 2012
  • 116. DOM / Markup 42 Tuesday, April 3, 2012
  • 117. Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 118. Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 119. JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 120. JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 121. AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 122. AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 123. AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 124. AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 125. Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 126. Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 127. Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 128. Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 129. Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 130. Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 131. Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 132. Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 133. REST API Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 134. REST API Backbone.js Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 135. REST API Backbone.js Services Managers Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 136. REST API Backbone.js Services Managers Soy (client) AUI JQuery Javascript DOM / Markup 42 Tuesday, April 3, 2012
  • 137. Possible Future • Easier, more powerful and efficient web resource transformations • Better support for Soy on the server side (like Velocity or FreeMarker) • (?) Dynamic injection of needed resources on-the-fly (inline dialogs) 43 Tuesday, April 3, 2012
  • 138. Looking back... 44 Tuesday, April 3, 2012
  • 139. Looking back... 2.5 years ago... 44 Tuesday, April 3, 2012
  • 140. Looking back... 2.5 years ago... most of this stuff was not possible 44 Tuesday, April 3, 2012
  • 141. Don’t underestimate the power of the client-side programming. Time to learn Javascript and related frameworks, you old Java fellow ” Master Joda, Javascript convert 45 Tuesday, April 3, 2012
  • 142. TAKE-AWAYS “ Atlassian is moving fast to client-side programming. Technology is there. Are you ready? ” #atlascamp 46 Tuesday, April 3, 2012