To get a good performance for Concordion.NET based on Concordion and IKVM (https://groups.google.com/forum/#!topic/concordion/uZfO-k0Jmww), it is necessary to provide a C#/.NET implementation of IOUtil. Thus, a mechanism is required to replace the implementation on runtime. What about using the singleton pattern as first, simple approach? In the startup of Concordion.NET tests the singleton reference of IOUtil could be changed to point to the .NET implementation.
Do you think this could be a workable?
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/36c7f40a-8d3b-40ee-a6ac-b1cff36a995b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/765ecf5a-ba74-41f5-89f3-bdcdb1f68db5%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/56AA59DF.7010900%40gmail.com.
Tim, Nigel, thank you for your explanation and for your great ideas how to improve Concordion.
Could we address one topic after the other?
I recognize that I did not explain my problem well – sorry that’s my fault. It was misleading from my side to write “replace IOUtil on runtime” in the headline of this thread so that you had the impression that the problem I am trying to solve is related to file system operations. I apologize for that.
What is the problem I am trying to solve?
The loading of resources (embedded.css and visibility-toggler.js) through the classLoader.getResourceAsStream is too slow on the .NET platform. Nigel, as you explained this is used in ConcordionBuilder and ThrowableRenderer. My approach to solve this problem would be to provide a C# implementation for the IOUtil.readResourceAsString() method.
To make the handling of resources explicit, we could pull out the functionality from IOUtil into some sort of ResourceLoader or ResourceManager. Usally, the Java implementation based on classLoader.getResourceAsStream would be used when Concordion is run on the Java platform. When the ikvmc compiled Concordion classes are executed on the .NET platform, we need a mechanism to instantiate the C# implementation and hand it over to the Concordion classes. What's the simplest thing that could possibly work?
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/1ad14c56-96a5-49ab-8a5d-2558038b2793%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/56AB29CC.1000408%40gmail.com.
Hey Nigel,
Hey Tim,
Yes, we agree on a lot.
Thank you for your additional explanation.
At least it helped to lift the fog in my brain a bit. :o)
Yes, we should make the methods for loading the resources embedded.css and visibility-toggler.js non static.
If you make the changes to the Java code, I am happy with any solution for dependency injection (either by passing instances around or with a factory method).
--
You received this message because you are subscribed to the Google Groups "concordion-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion-de...@googlegroups.com.
To post to this group, send email to concord...@googlegroups.com.
Visit this group at https://groups.google.com/group/concordion-dev.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/7e9a5c8f-b856-4904-b2b0-470de4f17165%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion-dev/CAJifTypjMODYM_0OjJ90DWf8RQz%3DD2dz-UZYc%2B0voo1t6ee24w%40mail.gmail.com.