A big focus at AtlasCamp last week was improving the productivity of plugin development. A few of the improvements in the latest Atlassian SDK (aka, AMPS, Atlassian Maven Plugin Suite) contribute a large part to improving the developer feedback loop. Before the latest SDK, developing a plugin usually consisted of the following steps:
- Download Atlassian SDK
- Open generated
pom.xmlinside your IDE
atlas-debug) to start up an instance of the product you’re writing the plugin for
- Figure out what plugin module you need to use by visiting the plugin module types documentation
- Write some code… save
- atlas-cli > pi to re-compile and reload your plugin
- Rinse and repeat steps 5-8 over and over… and over again
If you’ve done this successfully you’ll likely have a dozen or so browser tabs open pointing to developer.atlassian.com and possibly a few other related doc sites. Also, it’s quite possible that several hours or days have passed due to the slow feedback loop of having to switch windows, compile, and reload.
We’re well aware of the pain points of building plugins. We’ve spent some time trying to improve this cycle with a few additions to the SDK and plugin framework that hopefully will save you hours in the dev cycle (and your sanity). The first change streamlines steps #5 and #6 in the list above. We’ve introduced a new
atlas-create-[product]-plugin-module which allows you to create plugin modules through the SDK’s CLI. This new command will prompt you with a list of available modules appropriate for the product you’re building a plugin for. It will also prompt you for all the necessary details and automatically add the changes to your
atlassian-plugin.xml and generate the appropriate code for you.
Here’s a video of the new CLI prompts in action:
The second big improvement to the SDK is the inclusion of a new feature called FastDev. FastDev eliminates the need to manually re-compile and reload your plugin every time you make a change (step #8 above). FastDev is triggered simply by performing a
[shift]-[reload button] in your browser. Once you trigger FastDev it will intelligently scans your plugin’s source directory for changes. If it finds a change, it will automatically trigger a re-compile and re-install of your plugin without you having to leave your browser. As an added bonus, FastDev shows you a log of the maven output directly in the browser in case your code fails. It will also let you know how long it will take before your code is re-compiled and reloaded based on prior re-compile/reload cycles. Here’s a preview of how FastDev works:
The combination of FastDev and the SDK’s module code generation prompts should speed up your ability to create plugins. If you want more information about these two features, Check out Jonathan Doklovic and Zach Davis’ AtlasCamp presentation here. If you haven’t done so already, go ahead and download the latest SDK to take advantage of these new features.
We’ve got more in store in the future, but if you have any suggestions for how to better improve the developer feedback loop, please let us know below.