41 | | == A very simple plugin: Tagging == |
42 | | |
43 | | Let's start with a very simple plugin. This plugin will just create a new topic type called `Tag`. Once the plugin is installed the topic type will appear in the DeepaMehta webclient's //Create// menu, so you can create instances. And you will be able to fulltext search for tags. |
44 | | |
45 | | Developing such a simple plugin involves no Java coding at all. All is declarative, mainly in JSON format. |
46 | | |
47 | | Of course the topic type could be created interactively as well, by using DeepaMehta's type editor. However, being packaged as a plugin you can publish it. When other DeepaMehta users install your plugin they can use your type definitions. |
48 | | |
49 | | === Create the plugin === |
50 | | |
51 | | You create the plugin just by creating directories and text files. A DeepaMehta plugin project adheres to a certain directory structure and file name conventions. |
52 | | |
53 | | Setup a directory structure as follows: |
| 39 | == The plugin turn-around cycle == |
| 40 | |
| 41 | This section illustrates how to begin a plugin project, how to build and how to deploy a plugin, and how to re-deploy the plugin once you made changes in its source code. In other words, this section illustrates the plugin development turn-around cycle. |
| 42 | |
| 43 | Let's start with a very simple plugin called //DeepaMehta 4 Tagging//. This plugin will just create a new topic type called `Tag`. Once the plugin is activated the topic type will appear in the DeepaMehta webclient's //Create// menu, so you can create tag topics and associate them with arbitrary topics. And you will be able to fulltext search for tags. |
| 44 | |
| 45 | Developing a plugin whose only purpose is to provide new topic type definitions requires no Java or JavaScript coding. All is declarative, mainly in JSON format. |
| 46 | |
| 47 | Of course the topic type could be created interactively as well, by using the DeepaMehta webclient's type editor. However, being packaged as a plugin means you can distribute it. When other DeepaMehta users install your plugin they can use your type definitions. |
| 48 | |
| 49 | === Begin a plugin project === |
| 50 | |
| 51 | From the developer's view a DeepaMehta plugin is just a directory on your hard disc. The directory can have an arbitrary name and exist at an arbitrary location. By convention the plugin directory begins with `dm4-` as it is aimed to the DeepaMehta 4 platform. The directory content adheres to a certain directory structure and file name conventions. The files are text files (xml, json, properties, java, js, css) and resources like images. |
| 52 | |
| 53 | To create the //DeepaMehta 4 Tagging// plugin setup a directory structure as follows: |