Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating a project from C# to Java

With some changes in the staffing at the office, the levels of C# expertise has dropped off precipitously and there are now more Java developers. It has gotten to the point where the higher-ups are considering moving an existing .NET project written in C# into the Java world.

Aside from the obvious problem of starting completely from scratch what are the possible ways that this company can accomplish a successful move of development on a project from .NET C# into Java?

like image 432
TheTXI Avatar asked Apr 11 '09 19:04

TheTXI


4 Answers

Regardless of the languages involved, the management of this company sounds insane. For anything other than a trivial application, how can it be economically sensible to rewrite an entire code base from scratch instead of just hiring a single person with some skills in the right language? Is this a business with that well-known problem: too much spare cash?!

How long has the existing code been in development? If it's barely started, I could understand this. If it's seen a release and has active users, it will never make sense to throw it away. If you donated the C# code to a start-up with the right skills, think how much of a head start they would have over you.

like image 163
Daniel Earwicker Avatar answered Sep 25 '22 01:09

Daniel Earwicker


Before you finish converting the .NET project into Java, all those Java developers who were part of the conversion project will have learned C#. So then you don't anymore need to convert it to Java (and you can throw away all Java code which was produced in the conversion), because now you have a development team which can do both Java and C#. Problem solved. :D

like image 22
Esko Luontola Avatar answered Sep 25 '22 01:09

Esko Luontola


Here are things to consider:

  • Is this big project? If Yes, try to stick with C#
  • Is this medium sized project with components? If No, try to stick with C#
  • Is this small project meant to be deployed on windows only? If yes, try to stick with C#
  • Is this old source code? If Yes, try to stick with C#
  • Do you use windows OS specific APIs? If Yes, try to stick with C#
  • Do you use any third party APIs without Java counterpart? If Yes, try to stick with C#
  • Do you use .Net in "deep"(data binding, User controls etc.)? If yes, try to stick with C#
  • Migration time is more acceptable than getting new/converted C# guys? If no, try to stick with C#
  • Do you think end users will not be receptive of changes, if you are to use Java framework which will change presentation? If yes, try to stick with C#
  • Check commercials

If you decide to convert:

  • Go per component
  • Go per layer
  • Have lots of tests
  • Check if there are tools to help (however small help may be) with migration
like image 26
isntn Avatar answered Sep 27 '22 01:09

isntn


Just to add to Brian and Eric's opinions, I would say that picking up C# for a Java developer should be straightforward in my opinion. They are conceptually very similar languages and I would suggest training your Java developers to gain some C# skills so you won't be forced to go to the hassle of a migration process.

like image 38
Pablo Santa Cruz Avatar answered Sep 27 '22 01:09

Pablo Santa Cruz