Hi all,
I did some testing with IKVM and basex-6.3.2.jar and it turns out to be as simple as calling ikvmc on the .jar file to get a working basex-6.3.2.dll for .NET
I adapted the DB example from http://www.inf.uni-konstanz.de/dbis/basex/code/DatabaseExample an it run without problems.
Now I am curious what others have experienced using basex on .NET. And of course: what are chances that this could be supported in the future (like Saxon.net, for example)
Best Regards,
Maximilian
Maximilian,
We use it extensively, though we've spent a large amount of effort "wrapping" BaseX in native .NET interfaces. There are several complications to using it "out of the box". One of the trickiest is that even though IL accepts methods and fields with the same name as is common in Java, none of the .NET compilers will resolve those calls and will treat them as ambiguous. This pops up in several places and makes it difficult/impossible to use. Our solution was to create a post-IKVM process where we use Cecil to find and the rewrite the IL where this occurs. You could also just change the Java before compiling with IKVM, but that might create a maintenance headache. We also needed to integrate BaseX with Saxon in order to run XSLT. To do so we created custom implementations of the DOM objects in System.Xml (such as XmlDocument, XmlNode, XmlElement, etc.). We can then feed these into any other library that expects System.Xml objects. We've also created our own set of objects through which we access all BaseX functionality (so we're never calling BaseX Java code directly except through the wrapper). This makes it much easier to use from other applications.
In short, it can be an uphill battle, but it works very, very well once you work out the kinks. We're running BaseX successfully in a 100% native .NET environment on Mono on Windows, Linux, and Solaris with great results (it works well under the Microsoft CLR too). We've considered offering our wrapper as a commercial product once we get around to gauging interest, writing documentation, etc., but that probably won't be for several more months if at all.
Dave
From: basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] On Behalf Of Maximilian Gärber Sent: Monday, November 22, 2010 4:02 PM To: basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] basex 6.3.2 and .NET
Hi all,
I did some testing with IKVM and basex-6.3.2.jar and it turns out to be as simple as calling ikvmc on the .jar file to get a working basex-6.3.2.dll for .NET
I adapted the DB example from http://www.inf.uni-konstanz.de/dbis/basex/code/DatabaseExample an it run without problems.
Now I am curious what others have experienced using basex on .NET. And of course: what are chances that this could be supported in the future (like Saxon.net, for example)
Best Regards,
Maximilian
Hi Dave,
looks like it's not as easy as it seemed first... thank you for the pointers!
Would it be possible for you to provide a list of those ambiguous method/field names? If it doesn't affect the APIs too much, maybe the basex developers would take those conflicts into account regarding naming conventions?
Best,
Maximilian
2010/11/22 Dave Glick dglick@dracorp.com
Maximilian,
We use it extensively, though we’ve spent a large amount of effort “wrapping” BaseX in native .NET interfaces. There are several complications to using it “out of the box”. One of the trickiest is that even though IL accepts methods and fields with the same name as is common in Java, none of the .NET compilers will resolve those calls and will treat them as ambiguous. This pops up in several places and makes it difficult/impossible to use. Our solution was to create a post-IKVM process where we use Cecil to find and the rewrite the IL where this occurs. You could also just change the Java before compiling with IKVM, but that might create a maintenance headache. We also needed to integrate BaseX with Saxon in order to run XSLT. To do so we created custom implementations of the DOM objects in System.Xml (such as XmlDocument, XmlNode, XmlElement, etc.). We can then feed these into any other library that expects System.Xml objects. We’ve also created our own set of objects through which we access all BaseX functionality (so we’re never calling BaseX Java code directly except through the wrapper). This makes it much easier to use from other applications.
In short, it can be an uphill battle, but it works very, very well once you work out the kinks. We’re running BaseX successfully in a 100% native .NET environment on Mono on Windows, Linux, and Solaris with great results (it works well under the Microsoft CLR too). We’ve considered offering our wrapper as a commercial product once we get around to gauging interest, writing documentation, etc., but that probably won’t be for several more months if at all.
Dave
From: basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] On Behalf Of Maximilian Gärber Sent: Monday, November 22, 2010 4:02 PM To: basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] basex 6.3.2 and .NET
Hi all, I did some testing with IKVM and basex-6.3.2.jar and it turns out to be as simple as calling ikvmc on the .jar file to get a working basex-6.3.2.dll for .NET I adapted the DB example from http://www.inf.uni-konstanz.de/dbis/basex/code/DatabaseExample an it run without problems. Now I am curious what others have experienced using basex on .NET. And of course: what are chances that this could be supported in the future (like Saxon.net, for example)
Hi Maximilian, hi Dave,
we frequently get requests for a .net version of BaseX, and IKVM would be our favorite choice. Currently, we clearly don't have the human resources to look deeper into this; this is why, some time ago, we've also pondered to make it an commercial option.
Still, we are always interested in hints how a future conversion could be simplified. Christian
On Tue, Nov 23, 2010 at 11:18 AM, Maximilian Gärber mgaerber@arcor.de wrote:
Hi Dave,
looks like it's not as easy as it seemed first... thank you for the pointers!
Would it be possible for you to provide a list of those ambiguous method/field names? If it doesn't affect the APIs too much, maybe the basex developers would take those conflicts into account regarding naming conventions?
Best,
Maximilian
2010/11/22 Dave Glick dglick@dracorp.com
Maximilian,
We use it extensively, though we’ve spent a large amount of effort “wrapping” BaseX in native .NET interfaces. There are several complications to using it “out of the box”. One of the trickiest is that even though IL accepts methods and fields with the same name as is common in Java, none of the .NET compilers will resolve those calls and will treat them as ambiguous. This pops up in several places and makes it difficult/impossible to use. Our solution was to create a post-IKVM process where we use Cecil to find and the rewrite the IL where this occurs. You could also just change the Java before compiling with IKVM, but that might create a maintenance headache. We also needed to integrate BaseX with Saxon in order to run XSLT. To do so we created custom implementations of the DOM objects in System.Xml (such as XmlDocument, XmlNode, XmlElement, etc.). We can then feed these into any other library that expects System.Xml objects. We’ve also created our own set of objects through which we access all BaseX functionality (so we’re never calling BaseX Java code directly except through the wrapper). This makes it much easier to use from other applications.
In short, it can be an uphill battle, but it works very, very well once you work out the kinks. We’re running BaseX successfully in a 100% native .NET environment on Mono on Windows, Linux, and Solaris with great results (it works well under the Microsoft CLR too). We’ve considered offering our wrapper as a commercial product once we get around to gauging interest, writing documentation, etc., but that probably won’t be for several more months if at all.
Dave
From: basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] On Behalf Of Maximilian Gärber Sent: Monday, November 22, 2010 4:02 PM To: basex-talk@mailman.uni-konstanz.de Subject: [basex-talk] basex 6.3.2 and .NET
Hi all, I did some testing with IKVM and basex-6.3.2.jar and it turns out to be as simple as calling ikvmc on the .jar file to get a working basex-6.3.2.dll for .NET I adapted the DB example from http://www.inf.uni-konstanz.de/dbis/basex/code/DatabaseExample an it run without problems. Now I am curious what others have experienced using basex on .NET. And of course: what are chances that this could be supported in the future (like Saxon.net, for example)
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de