atlassian JIRA 外掛開發(八) — MVC實現
阿新 • • 發佈:2019-01-31
其實自己對MVC模式也甚不瞭解,只是自己看過些,也悟了悟,結合在JIRA的外掛開發上。
JIRA開發個人認為,Atlassian已經將其框架搭建有方,自認為如果瞭解JIRA開發的API和REST,適當結合MVC模式,懂得前後端資料互動方式,自當有所成就,順心之後,必然都是小問題。
由以上可以看出JIRA開發需要兩點:
- JIRA的API和REST掌握;
- MVC有所悟;
這些都是個人感覺。
JIRA外掛前端採用VM模板、後端採用JAVA驅動、
這些均在atlassian-plugin.xml檔案中配置,前後端的資料互動通道在此定義。
<atlassian-plugin key ="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}" />
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
<resource type="i18n" name="i18n" location="tutorial-jira-simple-issue-crud"/>
<web-resource key="tutorial-jira-simple-issue-crud-resources" name="tutorial-jira-simple-issue-crud Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="tutorial-jira-simple-issue-crud.css" location="/css/tutorial-jira-simple-issue-crud.css"/>
<resource type="download" name="tutorial-jira-simple-issue-crud.js" location="/js/tutorial-jira-simple-issue-crud.js"/>
<resource type="download" name="images/" location="/images"/>
<context>tutorial-jira-simple-issue-crud</context>
</web-resource>
<component key="myPluginComponent" class="com.example.plugins.tutorial.MyPluginComponentImpl" public="true">
<interface>com.example.plugins.tutorial.MyPluginComponent</interface>
</component>
<component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties" />
</atlassian-plugin>
class定義C,VM定義V,
待續。。。