Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-907

OSGI Rendering bundles for XWiki in mobile devices

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • None
    • 1.0 B5
    • {Unused} Core
    • None
    • J2ME CDC + FP
    • OSGI, Render, Component, mobile

    Description

      Rationale:
      As Vincent explained in http://www.xwiki.org/xwiki/bin/view/Idea/ArchitectureV2, it would be good if XWiki 2.0 moves to a component oriented architecture.

      I've started working on a XWiki mobile client which shall run with J2ME CDC. I find the idea of working with OSGI compatible components very good since it will facilitate the integration of XWiki components in the XWiki mobile client.

      Besides OSGI was thought with embedded devices in mind, and there are really fast OSGI frameworks specially adapted to limited environments (ie http://concierge.sourceforge.net/).

      Because the Xwiki mobile version uses an adapted Radeox build (java.util.regex not available), I've started adapting the renderers plugins for this version with a OSGI component oriented architecture.

      The dev repository is available in http://pablo.rfc1149.net/mercurial/mxwiki.

      What has been done:

      Each renderer plugin is a bundle, which register an OSGI service of type XWikiRendererService, this service has a priority which is configurable in the bundle manifest.

      There is another bundle called RendererManager who listen for XWikiRendererService, each time a new renderer is started it is added to the Manager who insert it (using the priority as the order) in the renderer chain.

      When we want to render something we simply call the RendererManager service which passes the content through the entire chain, except if one of the renderers ask to stop the chaining.

      I have reworked the XWikiRenderer interface so that it uses Readers and Writers instead of plain String, I find this cleaner and in certains cases it will be faster.

      This correspond I think to the architecture Vincent outlined in his proposition.

      I post this here so we can discuss the pros and cons of this proposal implementation. The code in the repository is fully documented and contains unit test.

      This is only a proposal, and I am willing to rework it as much as necessary to accomodate it to what the XWiki 2.0 team think would be best.
      But I think it can be a good starting point to coordinate efforts between the XWiki mobile version and the main XWiki developpement.

      (I have not used Plexus since it appears to be somewhat heavy for J2ME, but since plexus has a OSGI passerelle this should not be a problem?)

      Please give me some feedback

      Attachments

        Activity

          People

            vmassol Vincent Massol
            oliveira Pablo Oliveira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: