Ticket #518 (closed Enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

Webclient framework: multiple plugin init levels

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.2
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc: dgf, Malte, ziegi
Complexity: 2 Area: Application Framework / API
Module: deepamehta-webclient


Currently a plugin can do initialization at 2 stages: a) instantiation time, b) "init" event, which is fired once all plugins are instantiated. In conjunction with #505 it turned out that 2 initialization stages are not enough. Subject of this ticket is the introduction of 2 additional "init" events, namely "init2" and "init3".

Consider this scenario:

  1. At "init" time the Topicmaps plugin collects the Topicmap Renderers provided by the installed plugins. ("init" time is the most possible early situation as all installed plugins must be already instantiated. Otherwise some Topicmap Renderers might be missed.)
  1. At "init2" time 3rd party plugins register their Customizers at certain Topicmap Renderers. This must happen after init as the 3rd party plugin must be sure the respective Topicmap Renderer is available already.
  1. At "init3" time the Topicmaps plugin displays the initial topicmap. This must happen after init2 as the Topicmaps plugin must be sure all Topicmap Renderer Customizers are already registered.

The Webclient would fire the "init", "init2", and "init3" events consecutively.

Change History

comment:1 Changed 11 years ago by Jörg Richter

Webclient: introduce 2 new init events (#518).

2 new init events enable interwoven plugin initialization:

  • "init_2"
  • "init_3"

They are fired consecutively after "init".

See #518.

comment:2 Changed 11 years ago by jri

  • Status changed from new to accepted

comment:3 Changed 11 years ago by Jörg Richter

  • Status changed from accepted to closed
  • Resolution set to fixed

Topicmaps: prepare for renderer customizers (#518).

The initial topicmap is rendered at "init_3" time.
This allows 3rd party plugins to register their topicmap renderer customizers at "init_2" time. That is before the initial topicmap is rendered.

Furthermore: the Topicmaps plugin provides a public get_topicmap_renderer() method:

function get_topicmap_renderer(renderer_uri)

It allows 3rd party plugins to access the installed topicmap renderers in order to add customizers to them (yet to come). 3rd party plugins access a renderer like this:


Close #518.

Note: See TracTickets for help on using tickets.