Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving from .NET to Java [duplicate]

Possible Duplicate:
Tips for moving from C# to Java?

As a fairly experienced .NET developer (since 1.0), I've seen quite a few interesting jobs in the local area which are primarily focused on Java EE, ESB, WebSphere, JSP etc. Now, I'm quite familiar with most .NET "techs", but Java is a mystery. I did a bit of J2SE programming at University (2003 ish), but nothing much since.

Has anyone made the same transition (or the opposite one) and could share some info, caveats, anything really! How comparable are the .NET and Java skillsets, and how easily can one make the transition?

like image 217
Jamie Avatar asked Aug 19 '10 10:08

Jamie


People also ask

Is it easy to switch from .NET to Java?

NET, learning Java will not be a problem. If you also have the option of switching from . NET to Java, don't hesitate, do it now. Start with small home projects and online courses in your spare time at home.

How do I migrate from .NET to Java?

While Microsoft already has had a tool to migrate Java code to the company's . Net application development platform, Stryon is turning the tables. Stryon's iNet product migrates applications and Web services from Visual Basic . Net, C#, and J# to Java without the need to rewrite the code, according to Stryon.

Is .NET copy of Java?

NET is merely a Microsoft's clone of Java, implying that the differences, if any, are cosmetic and insignificant.

Is .NET core faster than Java?

dotnet core performance, both are moderately easier to learn and use. But you may find Java a little bit harder as it has more resources and documentation for the long years of app development and community impact.


3 Answers

I've faced the same problem going the other way: Java EE to .NET.

I don't have too much trouble with mapping language constructs between the two languages. It's not difficult to figure out relational database access in one language or the other. Loops are loops, ifs are ifs, kids. No worries there.

I've read Jon Skeets "C# In Depth", so I've gotten an appreciation for some of the nice things that have been added to C# that go beyond Java: LINQ, closures, delegates, etc.

My problems had more to do with the other details.

Visual Studio is a mystery to me. I'm used to IntelliJ. ReSharper helps. But like any other IDE, until you become familiar with it you're going to be stumbling around, trying to map something that you know how to do well on another system to the new one. Visual Studio Express doesn't appear to be the same thing.

I'm also ignorant of organizing, packaging, and deploying applications. I'm in the dark on .NET modules, deployment to IIS instead of a Java EE app server like WebLogic, etc.

Using JUnit and TestNG in my Java projects is second nature. I don't have the same level of comfort with NUnit.

I simply don't have it on the tips of my fingers. It's like a person in a foreign country with a guide book to the language: "How do I say that?" I'm simply not fluent in .NET.

I could really use a good project and a month long pairing with an experienced guide to get me over the hump. But that's not my role on projects, so I'm stuck.

I'm more comfortable taking that same path with Python. I have PyCharm from JetBrains, so the IDE is a non-issue. Python modules are as plentiful and easy to use as 3rd party open source stuff that I'm used to. I've got a great book "Core Python" that's walking me through. And the more I use the language, the more I like it. I have the same packaging and deployment issues, but I'm more confident that I'll solve them on my own with Python than with .NET.

like image 91
duffymo Avatar answered Oct 19 '22 06:10

duffymo


In my opinion the difference between Java and .NET (C#) is not that big, from a language perspective. I myself frequently use both although I'm using more Java than C#.

The problem is more the platform below and the class libraries that have a different structure and provide sometimes different concepts for the same thing. The main thing in my feeling is here that .NET is more driven by bundled/vendor libraries directly from Microsoft whereas on the Java Plattform most libraries and frameworks are coming from the platform-external sources.

So the best thing in that regard is looking at frequent problems you solved in .NET and try to solve them (partly) in Java to get a feel for the libraries and frameworks used there.

Another thing that is different between the platforms might be the concept of an Application Server in a Java EE environment, since I think .NET has no equivalent concept to host applications.

Sidenote regarding the IDE

Especially in respect of Refactoring support the Java Tooling you'll find in Eclipse, IntelliJ, NetBeans is much richer than in Visual Studio out of the box. Though ReSharper seems to add much of the missing functionality to Visual Studio.

like image 38
Johannes Wachter Avatar answered Oct 19 '22 05:10

Johannes Wachter


As long as you stay away from complex classloader interactions, the language and standard library should feel home, what can be intimidating for somebody that comes from Microsoft shops is the overwhelming amount of libraries and middleware options, while the language is simple, the ecosystem is deep, very deep, and there is no real standard choice.

I would concentrate on the 'standard' techs in the J2EE tutorial for most enterprise shops, but if you ever get technical lead on a project, be ready to spend a lot of time researching the optimal set of tools for your style.

like image 20
Josselin Pujo Avatar answered Oct 19 '22 05:10

Josselin Pujo