Changes between Version 4 and Version 5 of PluginDevelopmentGuide


Ignore:
Timestamp:
07.04.2013 17:54:48 (7 years ago)
Author:
jri
Comment:

The plugin turn-around cycle

Legend:

Unmodified
Added
Removed
Modified
  • PluginDevelopmentGuide

    v4 v5  
    55DeepaMehta is made to be extensible by 3rd-party developers. Developers extend DeepaMehta by developing plugins (resp. "modules" resp. "applications" which is all synonymous). 
    66 
    7 == Setup the development environment == 
    8  
    9 The best way to start with DeepaMehta plugin development is to build DeepaMehta from source. This way you get a hot-deploy environment, that is DeepaMehta redeploys your plugin automatically once you compile it. This is very handy while development. 
     7== Build DeepaMehta from source == 
     8 
     9The best way to develop DeepaMehta plugins is to build DeepaMehta from source first. This way you get a hot-deploy environment, that is DeepaMehta redeploys your plugin automatically once you compile it. This is very handy while plugin development. 
    1010 
    1111Requirements: 
     
    2424}}} 
    2525 
    26 This builds all components of the DeepaMehta Standard Distribution and installs them in your local Maven repository. 
    27  
    28 After a minute or so you'll see: 
     26This builds all components of the DeepaMehta Standard Distribution and installs them in your local Maven repository. You'll see a lot of information logged, cumulating in: 
    2927 
    3028{{{ 
     
    3937 
    4038 
    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 
     41This 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 
     43Let'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 
     45Developing 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 
     47Of 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 
     51From 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 
     53To create the //DeepaMehta 4 Tagging// plugin setup a directory structure as follows: 
    5454 
    5555{{{ 
     
    6464                plugin.properties 
    6565}}} 
    66  
    67 The plugin 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. 
    6866 
    6967Create the file **`pom.xml`** with this content: 
     
    151149}}} 
    152150 
    153 This starts DeepaMehta in development mode, that is with hot-deployment activated. You'll see a lot of information logged, commulating with: 
     151This starts DeepaMehta in development mode, that is with hot-deployment activated. You'll see a lot of information logged, cumulating with: 
    154152 
    155153{{{