Implementing a custom
JIRA UI using plugins 2.0Andreas Knecht
Plugins 2 & REST
Tuesday, November 2, 2010
Overview
• How to implement a custom UI
• How to implement a REST resource
• Demo
• svn co https://labs.atlassian.com/svn/...
Custom UI
• Why?
• Building Blocks
oServlet Filters
oWebwork actions
oHTML/JS + REST
Tuesday, November 2, 2010
This is not a talk about REST!
Tuesday, November 2, 2010
JIRA Web-Interface for the iPhone
• Easy to use interface on the iPhone
• Plugins 2 plugin
• Most of the work done client-...
Plugin structure
Tuesday, November 2, 2010
Some stats
• 2000+ downloads
since November 09
• ~7000 LOC
• 20 20% days to
develop
• 8 features
0
85
170
255
340
11/0902/...
Custom UI - Filters
• Redirect certain users
• Inject content into pages
Tuesday, November 2, 2010
Custom UI - Define a Filter
• URL-Pattern
• Location
oafter-encoding, before-login, before-decoration,
before-dispatch
Tues...
Custom UI - Webwork
• Full MVC UI framework
• Views, Commands, Validation, Templating
• /secure/* is not secure
• roles-re...
Securing Webwork!
http://localhost:2990/jira/OrderForm!default.jspa?id=10001
http://localhost:2990/jira/OrderForm.jspa?id=...
REST
• Simple for small data
• What about 100000
issues?
vs
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2]
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2]
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details
Tuesday, November 2, 2010
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details.comments[1]
Tuesday, November...
Expands to the Rescue
.../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details.comments[1]
Tuesday, November...
How do expands work?
• Lists vs Objects
Tuesday, November 2, 2010
How to expand lists!
Tuesday, November 2, 2010
How to expand objects!
Tuesday, November 2, 2010
How to expand objects
• REST provides com.atlassian.plugins.rest.common.expand.EntityExpanders
...
Tuesday, November 2, 20...
REST
• Backend doesnʼt always support expands
• Tricky to implement expands
• #protip: Use services
Tuesday, November 2, 2...
Services keep you safe!
Tuesday, November 2, 2010
Demo
• Implement ʻAdd Commentʼ feature
• Requires some client side JS
• Server side REST resource
• Tools
Tuesday, Novembe...
Summary
• Use HTML/JS as much as possible
oFaster development turnaround
oGood frameworks (jQuery, GWT, jQTouch...)
• If o...
Questions
https://labs.atlassian.com/browse/IPHONE
Tuesday, November 2, 2010
Upcoming SlideShare
Loading in...5
×

AtlasCamp 2010: Implementing a custom JIRA UI using plugins 2.0 - Andreas Knecht

2,094

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,094
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

AtlasCamp 2010: Implementing a custom JIRA UI using plugins 2.0 - Andreas Knecht

  1. 1. Implementing a custom JIRA UI using plugins 2.0Andreas Knecht Plugins 2 & REST Tuesday, November 2, 2010
  2. 2. Overview • How to implement a custom UI • How to implement a REST resource • Demo • svn co https://labs.atlassian.com/svn/IPHONE/trunk Excellent resource - This is a great app, not just because it looks good. It's also a great resource for JIRA 4.0 REST plugin development. Matt Doar (PAC - 2 Dec 09) “ ” Tuesday, November 2, 2010
  3. 3. Custom UI • Why? • Building Blocks oServlet Filters oWebwork actions oHTML/JS + REST Tuesday, November 2, 2010
  4. 4. This is not a talk about REST! Tuesday, November 2, 2010
  5. 5. JIRA Web-Interface for the iPhone • Easy to use interface on the iPhone • Plugins 2 plugin • Most of the work done client-side • Custom REST interface Tuesday, November 2, 2010
  6. 6. Plugin structure Tuesday, November 2, 2010
  7. 7. Some stats • 2000+ downloads since November 09 • ~7000 LOC • 20 20% days to develop • 8 features 0 85 170 255 340 11/0902/10 05/10 08/10 Downloads Tuesday, November 2, 2010
  8. 8. Custom UI - Filters • Redirect certain users • Inject content into pages Tuesday, November 2, 2010
  9. 9. Custom UI - Define a Filter • URL-Pattern • Location oafter-encoding, before-login, before-decoration, before-dispatch Tuesday, November 2, 2010
  10. 10. Custom UI - Webwork • Full MVC UI framework • Views, Commands, Validation, Templating • /secure/* is not secure • roles-required=”admin” does not work Tuesday, November 2, 2010
  11. 11. Securing Webwork! http://localhost:2990/jira/OrderForm!default.jspa?id=10001 http://localhost:2990/jira/OrderForm.jspa?id=10001 Tuesday, November 2, 2010
  12. 12. REST • Simple for small data • What about 100000 issues? vs Tuesday, November 2, 2010
  13. 13. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json Tuesday, November 2, 2010
  14. 14. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2] Tuesday, November 2, 2010
  15. 15. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2] Tuesday, November 2, 2010
  16. 16. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details Tuesday, November 2, 2010
  17. 17. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details Tuesday, November 2, 2010
  18. 18. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details.comments[1] Tuesday, November 2, 2010
  19. 19. Expands to the Rescue .../rest/iphone/1.0/filter/10000.json?expand=result[1:2].issue.details.comments[1] Tuesday, November 2, 2010
  20. 20. How do expands work? • Lists vs Objects Tuesday, November 2, 2010
  21. 21. How to expand lists! Tuesday, November 2, 2010
  22. 22. How to expand objects! Tuesday, November 2, 2010
  23. 23. How to expand objects • REST provides com.atlassian.plugins.rest.common.expand.EntityExpanders ... Tuesday, November 2, 2010
  24. 24. REST • Backend doesnʼt always support expands • Tricky to implement expands • #protip: Use services Tuesday, November 2, 2010
  25. 25. Services keep you safe! Tuesday, November 2, 2010
  26. 26. Demo • Implement ʻAdd Commentʼ feature • Requires some client side JS • Server side REST resource • Tools Tuesday, November 2, 2010
  27. 27. Summary • Use HTML/JS as much as possible oFaster development turnaround oGood frameworks (jQuery, GWT, jQTouch...) • If our REST API doesnʼt do it for you... Tuesday, November 2, 2010
  28. 28. Questions https://labs.atlassian.com/browse/IPHONE Tuesday, November 2, 2010
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×