I created an Atlassian-like web framework

This article is a reprint of the one posted on Blog.


The Atlassian plugin development platform makes use of a variety of Java frameworks, some of which are common. This time, I would like to introduce an Atlassian-like web framework created using those frameworks. The work is posted on GitHub.

Purpose

The aim of this web framework is to "separate the general Java framework from the Atlassian plugin development platform." The following effects are achieved by this.

Java framework

This web framework consists of the following frameworks.

Java EE

Java EE Beans, JSP, Servlet are used to realize the MVC model. The Atlassian plug-in development platform also uses a Java framework called WebWork as an MVC model, but the version is different for each product (JIRA 1.x -platform / jira-architecture / jira-technical-overview / jira-webwork-actions), others 2.x), and excludes it from having to inherit its own abstract class when creating actions. By the way, this WebWork has been integrated into Struts2 since version 2.2.

Spring DI

Spring DI is used for component dependency injection. Do not use annotations in component definitions without using Atlassian Spring Scanner ʻatlassian-plugin.xml (Spring ʻapplicationContext. This is because it is supposed to be defined in (corresponding to xml). As far as I can see many plugins, it seems that the method of defining in ʻatlassian-plugin.xml` is common, and my project also adopts this method. However, Autowired annotation is used for injection to modules such as Servlet and REST resources due to specification problem.

Jersey

Jersey is used to provide RESTful web services. Since data is exchanged exclusively in Json format, it is set to be available in Json. In Atlassian plug-in development, the extensibility of existing screens is poor, and in particular, all data processing triggered by screen operations can only be done through the REST API. Therefore, this feature is used frequently, and I think it makes a lot of sense to be able to develop it separately from the Atlassian plug-in development platform.

ActiveObjects

I am using ActiveObjects as an ORM tool. ActiveObjects uses camelcase as a table and field naming convention, while Atlassian uses uppercase snakecase. developing-your-plugin-with-active-objects / active-objects-faq / column-names) is adopted. Therefore, the framework also conforms to the Atlassian specifications. The Atlassian specification name converter is under the net.java.ao.atlassian package.

Velocity

I am using Velocity as a template engine. I personally prefer Velocity to JSP because it can be written in modern syntax. Atlassian plug-ins are generally used in combination with WebWork, but WebWork is excluded due to the above reasons, so it is used inside Servlet.

Finally

By using this framework, it seems that data processing through REST API can be handled as it is. However, development using modules with high demand such as event listeners and workflows cannot handle it, so I feel that it is more efficient to educate members so that they can develop Atlassian plugins.

Recommended Posts

I created an Atlassian-like web framework
I created an api domain with Spring Framework. Part 2
I searched for a web framework with Gem in Ruby
I summarized the collection framework.