This page compares JIRA portlets with gadgets.
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:
Use the legacy bridge described GADGETDEV:above.
Convert the portlet to a servlet or webwork plugin module that renders the content pretty much exactly the same way the portlet did. Then write a gadget that uses gadgets.io.makeRequest
to get those contents, and replaces the body of the gadget with the retrieved contents.
Rewrite the portlet as a proper gadget, using a REST API to retrieve the data you need from JIRA using gadgets.io.makeRequest
, and DOM manipulation in JavaScript to handle the UI.
Using Atlassian REST APIs in your Gadget
Writing an Atlassian Gadget
Gadget Developer Documentation
Writing a Plugin Upgrade Task for JIRA 4.0 (in the JIRA documentation)
Rate this page: