How to port an open source project?

I am curious how people port open source projects like Lucene and Hibernate from Java to .NET? Is this a simple matter of using the Java Language Conversion Assistant 2.0 released by Microsoft?

+6
java c # open-source code-conversion
source share
2 answers

Unfortunately, usually for large projects it usually takes a lot more effort. What is effective in one language may not be in another, and most importantly, what exists in one language may not be in another. For example, it took NHibernate years to migrate, and they still do it (although adding features all the time, like Linq).

Usually it is a matter of placing and porting classes one by one, optimizing where possible, changing structures where necessary. Things like generics, aliases and boxing all change in the port. Then, after you are done, there is often a lot of optimization left (of course, this is not necessary ...), maybe these are events, maybe static and extension methods, maybe something new that your new language offers / platform that the old did not.

Think of it this way, why port it to .Net? I would say that you are in one of two situations, one of which you are stuck with using .Net because of work (doh, sorry!), Or you like .Net because it gives you some advantage. In the second category, this means that you selected it in Java, so when porting you would like to take advantage of all the features that you selected .Net in the first place.

+11
source share

As Nick said, it's not that simple. This is much more than just porting the code, especially if the architecture of the application you want to use is not so great. You want to use the functions of the language you are porting to, and sometimes these are design decisions that you can change because they seem wrong to you. I will not repeat what Nick said, but would like to add the following.

I would recommend that you follow the development of Noda Time, which is an attempt by Jon Skeet to ship Joda Time from Java to .Net. John actually documents the experience on the following blog:

http://noda-time.blogspot.com/

I would recommend following the blog, the google groups page for this project, and the google code project. Google groups and codepage links can be found on one of the blog posts.

+4
source share

All Articles