Five Strategies to Accelerate Plugin Dev Lessons from Speakeasy Don Brown Integration Architect, Atlassian
Just one year ago…
 
 
Five Strategies  Discover your plugin with Speakeasy Define interactions with page objects Optimize your dev loop with the SDK Reuse functionality with AUI Encourage feedback
1. Discover your plugin with Speakeasy
Validate your assumptions!
The #1 time waster is not building the plugin poorly, but is building the wrong plugin Me, channeling Eric Ries ” “
Example: Inline Commenting Get stats on how often people comment.  Ask heavy comment authors their gripes. Slowness of commenting causing fewer comments and annoyed users Edit a few heavily commented pages and see if the linked numbers help or hurt Users want to see number of comments on a line Look through last 100 comments, note cause and use of quotes Users want to comment on specific lines in on a page Test Assumption
Social Validation Speakeasy Prototype Plugin
Examine a recent plugin idea and try to identify your assumptions and how you might test them ” “
2. Define Interactions with Page Objects
Overly Simplifying Testing Unit Testing Where? Same VM Awesome for? Method validation Functional Testing Where? External VM Awesome for? Use case validation
Selenium in 30 Seconds
Testing is Like Diets
Selenium the Ugly waitForEntityRowToBeAdded();            // check entity row has been created         assertThat.textPresent("Schultz");         assertThat.textPresent("brown");         assertEquals("Delete", client.getText("link=Delete"));            // now we delete         client.click("link=Delete");         client.waitForAjaxWithJquery();         client.click("//div[@id='delete-application-link-dialog']/div[2]/div[2]/button");         client.waitForAjaxWithJquery();         client.click("//div[@id='delete-application-link-dialog']/div[2]/div[2]/button");  
Reminds Me of These Days: if(request.getParameter(&quot;action&quot;) != null){  String bookname=request.getParameter(&quot;bookname&quot;if(request.getParameter(&quot;action&quot;) != null){         String  bookname=request.getParameter(&quot;bookname&quot;);        String  author=request.getParameter(&quot;author&quot;);       stmt.executeUpdate(&quot;insert into books_details(book_name, author) values('&quot;+bookname+&quot;','&quot;+author+&quot;')&quot;);       rst=stmt.executeQuery(&quot;select * from books_details&quot;);       %>       <html>       <body>       <center>          <h2>Books List</h2>
JSP Solution:  Data Access Objects Selenium Solution:  Page Objects
Boldly go where no functional test has gone before…
This ain’t no theory. . .
Use Now! JIRA 4.x, 5.0 Confluence 3.x, 4.x Bamboo 3.3 FishEye/Crucible, coming soon
Take a look at the Atlassian page object docs and try to write a hello world test for your plugin ” “
3. Optimize the Dev Loop with the SDK
All About the Gap Gap between edit and view Productivity
These Are Your Enemies
Edit -> Refresh js/vm, hotswap changes Gap between edit and view Productivity
Edit -> ‘pi’ -> Refresh java changes Gap between edit and view Productivity
Edit -> CTRL-C ->  atlas-run WEB-INF/lib changes Gap between edit and view Productivity
Speaking of  atlas-run . . .
Run Simultaneously Switch between products Terminal tab per instance
Quickly Spot Errors In your .bashrc file export MAVEN_COLOR=true
Track how many times you alt-tab away from development in a day and try to decrease it ” “
4. Reuse UI with AUI
A few of my favorite things
Tabbed Panels!
Messages!
Dialogs!
Play with the AUI sandbox and try out a few components ” “
5. Make Feedback Dead Simple
JIRA Mobile Connect Automated crash reporting as a JIRA issue Message reporters directly, attached to the issue
JIRA Issue Connector Embeddable JavaScript to allow  users to raise issues for your plugin
Make It Rewarding
Add JIRA Issue Connector to as an optional feature to your plugin for dogfooding ” “
Ruthlessly eliminate unnecessary weight from the start “ ” ”
But before I go. . .
The JIRA Studio Problem How to allow plugins without breaking Studio?
Plugins Missing Potential Lots to know just to get started Java, Maven, XML, tons of APIs, libraries, and frameworks Lots of things to break API changes, memory leaks, runaway functions Limited deployment options Not safe for Studio
Speakeasy is great. . . Easy to get started Just a zip with some JavaScript Safe to experiment Per user allowed Easy to deploy using Git
But. . . Only supports client-side JavaScript DOM as the API is incredibly brittle Very different to “real” plugins
2012 Project: Remote Plugins What if plugins ran on your server like Facebook Applications? What if all you had to install in JIRA Studio was a single XML descriptor file? What if you could write a plugin that could be deployed for JIRA Studio or custom instances without changes?
Let me know. . .  Are you interested in deploying plugins for our JIRA Studio customers? Would you like to use this capability for custom instances? Would you be interested in having early access? Contact me: don@atlassian.com or @mrdonbrown
Body Level One Body Level One Body Level Two Body Level Two Body Level One Body Level Two Body Level One Body Level One Body Level Two Body Level Two Body Level One Body Level Two
Enter take-away information here, short enough to be tweeted & retweeted. Move the closing quotation to the end of the sentence manually. “ ”
Body Level One Body Level One Body Level Two Body Level Two Body Level One Body Level Two
Thank you!
References Speakeasy Page Objects – Coming soon Plugin SDK Multiple products Colorization Atlassian  User Interface (AUI) JIRA Mobile Connect JIRA Issue Connector

AtlasCamp 2011 - Five Strategies to Accelerate Plugin Development

  • 1.
  • 2.
    Five Strategies toAccelerate Plugin Dev Lessons from Speakeasy Don Brown Integration Architect, Atlassian
  • 3.
  • 4.
  • 5.
  • 6.
    Five Strategies Discover your plugin with Speakeasy Define interactions with page objects Optimize your dev loop with the SDK Reuse functionality with AUI Encourage feedback
  • 7.
    1. Discover yourplugin with Speakeasy
  • 9.
  • 10.
    The #1 timewaster is not building the plugin poorly, but is building the wrong plugin Me, channeling Eric Ries ” “
  • 11.
    Example: Inline CommentingGet stats on how often people comment. Ask heavy comment authors their gripes. Slowness of commenting causing fewer comments and annoyed users Edit a few heavily commented pages and see if the linked numbers help or hurt Users want to see number of comments on a line Look through last 100 comments, note cause and use of quotes Users want to comment on specific lines in on a page Test Assumption
  • 12.
  • 13.
    Examine a recentplugin idea and try to identify your assumptions and how you might test them ” “
  • 14.
    2. Define Interactionswith Page Objects
  • 15.
    Overly Simplifying TestingUnit Testing Where? Same VM Awesome for? Method validation Functional Testing Where? External VM Awesome for? Use case validation
  • 16.
  • 17.
  • 18.
    Selenium the UglywaitForEntityRowToBeAdded();            // check entity row has been created         assertThat.textPresent(&quot;Schultz&quot;);         assertThat.textPresent(&quot;brown&quot;);         assertEquals(&quot;Delete&quot;, client.getText(&quot;link=Delete&quot;));            // now we delete         client.click(&quot;link=Delete&quot;);         client.waitForAjaxWithJquery();         client.click(&quot;//div[@id='delete-application-link-dialog']/div[2]/div[2]/button&quot;);         client.waitForAjaxWithJquery();         client.click(&quot;//div[@id='delete-application-link-dialog']/div[2]/div[2]/button&quot;);  
  • 19.
    Reminds Me ofThese Days: if(request.getParameter(&quot;action&quot;) != null){  String bookname=request.getParameter(&quot;bookname&quot;if(request.getParameter(&quot;action&quot;) != null){        String bookname=request.getParameter(&quot;bookname&quot;);        String author=request.getParameter(&quot;author&quot;);       stmt.executeUpdate(&quot;insert into books_details(book_name, author) values('&quot;+bookname+&quot;','&quot;+author+&quot;')&quot;);       rst=stmt.executeQuery(&quot;select * from books_details&quot;);       %>       <html>       <body>       <center>          <h2>Books List</h2>
  • 20.
    JSP Solution: Data Access Objects Selenium Solution: Page Objects
  • 21.
    Boldly go whereno functional test has gone before…
  • 22.
    This ain’t notheory. . .
  • 23.
    Use Now! JIRA4.x, 5.0 Confluence 3.x, 4.x Bamboo 3.3 FishEye/Crucible, coming soon
  • 24.
    Take a lookat the Atlassian page object docs and try to write a hello world test for your plugin ” “
  • 25.
    3. Optimize theDev Loop with the SDK
  • 26.
    All About theGap Gap between edit and view Productivity
  • 27.
  • 28.
    Edit -> Refreshjs/vm, hotswap changes Gap between edit and view Productivity
  • 29.
    Edit -> ‘pi’-> Refresh java changes Gap between edit and view Productivity
  • 30.
    Edit -> CTRL-C-> atlas-run WEB-INF/lib changes Gap between edit and view Productivity
  • 31.
    Speaking of atlas-run . . .
  • 32.
    Run Simultaneously Switchbetween products Terminal tab per instance
  • 33.
    Quickly Spot ErrorsIn your .bashrc file export MAVEN_COLOR=true
  • 34.
    Track how manytimes you alt-tab away from development in a day and try to decrease it ” “
  • 35.
    4. Reuse UIwith AUI
  • 36.
    A few ofmy favorite things
  • 37.
  • 38.
  • 39.
  • 40.
    Play with theAUI sandbox and try out a few components ” “
  • 41.
    5. Make FeedbackDead Simple
  • 43.
    JIRA Mobile ConnectAutomated crash reporting as a JIRA issue Message reporters directly, attached to the issue
  • 44.
    JIRA Issue ConnectorEmbeddable JavaScript to allow users to raise issues for your plugin
  • 45.
  • 46.
    Add JIRA IssueConnector to as an optional feature to your plugin for dogfooding ” “
  • 47.
    Ruthlessly eliminate unnecessaryweight from the start “ ” ”
  • 49.
    But before Igo. . .
  • 50.
    The JIRA StudioProblem How to allow plugins without breaking Studio?
  • 51.
    Plugins Missing PotentialLots to know just to get started Java, Maven, XML, tons of APIs, libraries, and frameworks Lots of things to break API changes, memory leaks, runaway functions Limited deployment options Not safe for Studio
  • 52.
    Speakeasy is great.. . Easy to get started Just a zip with some JavaScript Safe to experiment Per user allowed Easy to deploy using Git
  • 53.
    But. . .Only supports client-side JavaScript DOM as the API is incredibly brittle Very different to “real” plugins
  • 54.
    2012 Project: RemotePlugins What if plugins ran on your server like Facebook Applications? What if all you had to install in JIRA Studio was a single XML descriptor file? What if you could write a plugin that could be deployed for JIRA Studio or custom instances without changes?
  • 55.
    Let me know.. . Are you interested in deploying plugins for our JIRA Studio customers? Would you like to use this capability for custom instances? Would you be interested in having early access? Contact me: don@atlassian.com or @mrdonbrown
  • 56.
    Body Level OneBody Level One Body Level Two Body Level Two Body Level One Body Level Two Body Level One Body Level One Body Level Two Body Level Two Body Level One Body Level Two
  • 58.
    Enter take-away informationhere, short enough to be tweeted & retweeted. Move the closing quotation to the end of the sentence manually. “ ”
  • 59.
    Body Level OneBody Level One Body Level Two Body Level Two Body Level One Body Level Two
  • 60.
  • 61.
    References Speakeasy PageObjects – Coming soon Plugin SDK Multiple products Colorization Atlassian User Interface (AUI) JIRA Mobile Connect JIRA Issue Connector