[xwiki-devs] Creation of transformation
Hello, As the tests of my project application-glossary <https://github.com/xwiki-contrib/application-glossary> are not working, in spite of my attempts(I will handle then later), I am moving on to implementing the next feature of the application i.e creating transformation. As far as I understand, the transformation requires a cache component from which entries shall be taken for rendering purpose. This cache should get updated when a glossary xobject is added, deleted or modified. For this functionality to take place, it should make use of an Event Listener. Hope I am right till now? I have a question in my mind. The "cache" and the "event Listener" are to be implemented as two separate components. right? What I think is, that the EventListener component should be filled with appropriate methods just like this <https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-component/xwiki-platform-component-wiki/src/main/java/org/xwiki/component/wiki/internal/bridge/DefaultWikiObjectComponentManagerEventListener.java> and then in these methods, the cache should be updated. Is this implementation right? And after this, the rendering part will come.... Thanks Sarthak Gupta
Hi Sarthak,
On 14 Oct 2017, at 09:52, Sarthak Gupta <[email protected]> wrote:
Hello, As the tests of my project application-glossary <https://github.com/xwiki-contrib/application-glossary> are not working
I’ll try to have a look when I’m back from GSOC summit.
, in spite of my attempts(I will handle then later), I am moving on to implementing the next feature of the application i.e creating transformation. As far as I understand, the transformation requires a cache component from which entries shall be taken for rendering purpose. This cache should get updated when a glossary xobject is added, deleted or modified. For this functionality to take place, it should make use of an Event Listener.
Hope I am right till now?
Yes that’s exactly it! What I would suggest is that you implement the Transformation without cache for the first version, you make the app work fully end to end, you release a 1.0 version that the community can try out, and then you start working on version 1.1 which adds the cache to improve performance. WDYT?
I have a question in my mind.
The "cache" and the "event Listener" are to be implemented as two separate components. right?
Correct.
What I think is, that the EventListener component should be filled with appropriate methods just like this <https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-component/xwiki-platform-component-wiki/src/main/java/org/xwiki/component/wiki/internal/bridge/DefaultWikiObjectComponentManagerEventListener.java> and then in these methods, the cache should be updated.
Is this implementation right?
Correct.
And after this, the rendering part will come….
Awesome. Thanks. Let me know if you need more of my/our help. -Vincent
Thanks
Sarthak Gupta
participants (2)
-
Sarthak Gupta -
Vincent Massol