On Fri, Oct 05, 2001 at 02:35:00PM +0200, Alexander Mueller wrote:
>...
> I wanted to avoid a remake of all of the svn implementation and decided to
> build a java layer that rests upon a native library (using JNI).
>
> Thought it would be faster to have such an interface up. Of course this attempt
> lacks beauty of design (platform independence as major issue). Also it would
> be pretty hard to have local repository access without DAV, because then
> you had to implement really all of the details of svn.
Implementing an SVN library using JNI is the only reasonable way to go.
There is simply too much code to reimplement, if you want that Java client
to use the same WC as the cmdline client.
You could also produce a custom WC model and just use DAV to talk to the SVN
server. That would eliminate the need for library access. But that is still
going to be a lot of code.
<rant>
The whole "non-portable" mindset of Java is its biggest detriment. If people
would get away from that silly notion, then Java might actually make huge
strides. As it is, because of the refusal to use JNI, it means that Java can
only talk to Java, that you can't use native libraries, and because of that
you end up rewriting every single damned program in the universe to fit
inside the closed Java universe. It is really sad. MSFT's C# knows that
interop is necessary, and that is going to cause some real pain to the Java
world -- C# developers are going to see the "Java lockin" -- they'll be able
to actually *use* existing code and get stuff done with stopping to rewrite
everything.
</rant>
Note that we also have the start of some SWIG stuff in the repository. SWIG
is supposed to be able to generate Java bindings. That could be a huge
bootstrap to the problem. Normally, I would recommend using SWIG to do some
bare-bones wrapping of the libraryes, then implement some "convenience" or
"pretty-it-up" classes/functions on top of the bare stuff.
The nice thing about the SWIG basis is that it can automatically keep up and
track changes to the SVN APIs without needing to go and change all of the
custom-written bindings.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:44 2006