All Versions
Gadgets and Dashboards 3.0Gadgets and Dashboards 2.0
Gadgets and Dashboards 1.0
More...
Documentation under development
This page compares JIRA portlets with gadgets.
On this page:
From a user's perspective...
In JIRA versions prior to 4.0, you could configure your dashboard by adding portlets. In JIRA 4.0 and later, portlets have been converted to industry-standard gadgets.
From a developer's perspective...
In the portlets world, you do everything server-side (on the server where the data is held) and use your portlet class and your Velocity templates to render the UI.
In the gadgets world, the UI is rendered entirely using HTML and JavaScript (on the dashboard server). To get dynamic data into the gadget, you will make Ajax calls using makeRequest
back to the originating server.
Why a special API for making requests? When we render gadgets, even if the gadget specification is coming from your server out there, it is pulled into the dashboard server and parsed and rendered into HTML on the dashboard server. So your JavaScript can only talk to the server where the dashboard is running. The makeRequest
call will proxy back (in a process that is called 'phoning home') to the originating server to request data, using one of the following:
Here is a summary of the difference between gadgets and portlets, from the perspective of a JIRA portlet developer:
We have built a bridge so that you do not have to convert all the JIRA portlets to gadgets right away. Instead, you can use the bridge to display your existing portlet's output on your JIRA gadgets dashboard.
The bridge will not work for all the portlets. Some portlets contain advanced Ajax functionality that will not be pulled into the gadget properly. But you should be able to make backwards-compatible changes to most portlets that will allow them to work in the bridge as well as in older versions of JIRA.
Note: The bridge is applicable to existing portlets only and is an interim solution. Such legacy portlets can run only on:
Test before deploying to JIRA 4 in production
Be sure to test your portlets in a JIRA 4 dashboard before deploying to a production instance of JIRA 4.
We will have more information from this page after the Atlassian Summit. Tim is doing a presentation that we can adapt for this page.
There are three options for converting a portlet to a gadget:
gadgets.io.makeRequest
to get those contents, and replaces the body of the gadget with the retrieved contents.
gadgets.io.makeRequest
, and DOM manipulation in JavaScript to handle the UI.
Using Atlassian REST APIs in your Gadget
Writing an Atlassian Gadget
Gadgets and Dashboards Development Hub
Writing a Plugin Upgrade Task for JIRA 4.0 (in the JIRA documentation)