Hello everyone and especially Jetbrains employee. I would like to talk about plugin development for Teamcity: what I think can be improved.
First of all, my name is Grigory. Currently I work at mail.ru as build manager. Beside my casual responsibilities I do some python/Java programming to improve infrastructure, QA Team workflow and automate some routine tasks. I’m not a professional developer, so I could be wrong in some cases.
Why plugins are important?
First, I would like to discuss why plugins rock. In my humble opinion, JetBrains team should concentrate theirs work on core features of Teamcity: performance, stability, persistence etc. Everything else should be implemented with plugins. For now, a lot of plugins is created and a lot of bundled - that is great! Plugins enlarge functionality, they can add specific features, that core team don’t have time for. So, plugins are just great, I think we all know that. Especially, because community is huge power - motivated and interested person can do much more even if he doesn’t get reward. He got more - satisfaction.
Problems and solutions
Some time ago I’ve made a couple plugins for Jira (good issue tracker by Atlassian). So I will compare plugin development with this platform.
- Plugin template: what do we have with JetBrains is zip archive with some sample plugin. It has examples of some common things, jsp code, controllers, etc. Nice. But what if I know that already? I want to start to write new plugin from scratch, without any samples and other trash. Recently I’ve found repository on github with plugin template. That is a good start - why not to make it official? As far as I know, there is public repository with all JetBrains products. Additional benefit: you can create additional branch for new version of TC and everyone can easily get exectly that version he needs.
- Build system and dependencies: ANT was good. Long, long time ago. I think, it’s time to upgrade. I check out your svn repository with plugin samples - almost 4Gb. Maaann... All dependencies lay in lib. That’s not cool, not at all. Additionally to item 1, I suggest to replace ant with maven and add all Teamcity dependencies to public repositories. Or create your own. If you ever know, it’s so convenient to say what you want - and maven just get it. Awesome! And no additional lib/*jars. Another option is Gradle.
- Documentation: if you want developers, you have to update your docs. What would I suggest. Introduction: requirements, where to get plugin template (or sample plugin), how to build (with Idea and from command line), platform specific things should be highlighted. Than there could be several pages, each describing separate technology, or feature. Also, check forum for frequent questions and update docs to eliminated them.
So, that were main topic. Next is unsorted thoughts, but I hope, it will help you.
- I love REST. Why don’t you use it in plugin development? I saw some classes for Ajax handling - for Jira all ajax call I did with my REST API.
- OSGi - when developing plugins for Jira, I can just Shift-F5 and plugin automagically rebuilded and redeployed. Take a look in this direction - this way plugins can be installed/uninstalled without Teamcity restart. Also very handy for plugin development.
- Want more examples in docs for simple things: how to get current user, hot to store setting for user, how to make ajax call, how to catch error in controller and propagate it to frontend, how to create dialog, how to get jQuery (for those, who didn’t know it’s $j) and much more. Some FAQ and best practices for quick start.
- Tests - would be cool to have howto on testing. Basic junit tests and something for web testing (Selenium).
- I18n - neat feature, but not obligatory. Would be nice to replace all hardcoded text values with internalization constants, so translation would be possible. We don’t mind default English interface, but as additional feature if would be nice (Spring should support i18n).
So, that is more or less I want to say.
I encourage you to checks Atlassian pages on plugin development documentation. Also, find some time and create simple plugin for Jira/Confluence just to feel difference.
Sorry, if my post looks negative - it’s not. It is constructive critics :) I don’t know a man in our company (and as a buildmanager I know everyone), who doesn’t like products of Jetbrains - we use TC as CI, our core server programmers use Idea and some uses PyCharm. Your products are really great! All I ask, that we could develop plugins with pleasure :)
If you have any questions, feel free to ask.