Changes between Version 5 and Version 6 of AnotherPluginDevelopmentGuide
- Timestamp:
- 30.06.2012 13:29:22 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AnotherPluginDevelopmentGuide
v5 v6 12 12 * Migration management. 13 13 14 14 15 = What a plugin can do = 15 16 16 * Provide new topic types or extend ingextisting ones.17 * Provide new topic types or extend extisting ones. 17 18 * Provide and migrate topic instances and associations. 18 19 * Provide application logic. 19 20 * React upon server events. 20 21 * Provide REST resources. 21 * Extend ingthe browser client.22 * Extend the browser client. 22 23 * React upon UI events. 23 24 * Add page and field renderer. … … 25 26 * Extend the REST client. 26 27 28 27 29 = Creating a plugin project = 28 30 … … 36 38 The structure within your plugin project directory is determined by a combination of 37 39 Maven and DeepaMehta conventions. All possible plugin constituents are optional (besides the POM). 38 Obviously a nuseful plugin will provide some (or all) constituents. Which one these are depends40 Obviously a useful plugin will provide some (or all) constituents. Which one these are depends 39 41 on the nature of your plugin. Every snippet on this page can be found in the example reference 40 42 project [https://github.com/dgf/dm4-example dm4-example]. … … 69 71 |||| . . . . . screen.css || 70 72 73 71 74 = Setting up the development environment = 72 75 … … 97 100 '''TBD''' describe 98 101 102 99 103 == Hotdeploy the plugin bundle == 100 104 101 In an ongoing development it make sense to use the hotdeploy setup,that automatically monitors all105 In an ongoing development it makes sense to use the hotdeploy setup that automatically monitors all 102 106 configured bundle archives. To start using it, create a directory where your development should 103 107 take place and [BuildFromSource build] DeepaMehta from source. Then adapt the … … 145 149 individual to your plugin project. These comprise of: 146 150 147 * Human-readable Project name.148 * Project identification in the Maven space (group ID, artifact ID ,and version number).151 * Human-readable project name. 152 * Project identification in the Maven space (group ID, artifact ID and version number). 149 153 * Instructions for the OSGi bundle packager. 150 154 … … 199 203 = Migrations = #migration 200 204 201 There are two ways to create and migrate the model of your plugin. A ninitially setup can be202 described in declarative style. To update exi ting data or change the model in the lifetime205 There are two ways to create and migrate the model of your plugin. A initially setup can be 206 described in declarative style. To update existing data or change the model in the lifetime 203 207 of your plugin project use the programmatic way and implement a Java migration. An order of 204 208 execution is determined with the increasing file name number suffix. To configure the required … … 290 294 291 295 DeepaMehta tries to find out most of the plugin behaviors by convention, nevertheless 292 some of configurations have to be done and these arewritten down in the plugin.properties file.296 some configurations have to be done manually, written down in the plugin.properties file. 293 297 294 298 plugin.properties example: … … 358 362 }) 359 363 360 // register a nadditional create command364 // register a additional create command 361 365 dm4c.register_listener("post_refresh_create_menu", function(type_menu) { 362 366 type_menu.add_separator() … … 395 399 396 400 {{{#!js 397 // a simple field renderer that renders a n example topic name with anadditional CSS class401 // a simple field renderer that renders a example topic name with a additional CSS class 398 402 function ExampleContentFieldRenderer(field_model) { 399 403 this.field_model = field_model … … 420 424 421 425 {{{#!js 422 // a page render that simply renders the value of an example content topic instance426 // a page renderer that simply renders the value of an example content topic instance 423 427 function ExampleContentPageRenderer() { 424 428 … … 645 649 646 650 /** 647 * Increase the count of a nattached <code>Example</code> topic.651 * Increase the count of a attached <code>Example</code> topic. 648 652 */ 649 653 @GET … … 664 668 === Provider === #provider 665 669 666 To provide a n automatically serialisation of your Java domain model classes, yourcan implement670 To provide a automatically serialisation of your Java domain model classes, you can implement 667 671 a specific provider or use the JSONEnabled interface. There is no need for proprietary message 668 672 body writer providers as long as the object implements JSONEnabled. Every object that is about 669 to be send over the wire is supposed to do so. A generic reader provider of courseis a different673 to be send over the wire is supposed to do so. Of course, a generic reader provider is a different 670 674 story and does not yet exist. 671 675