Chinh Do

Learning Java from a .NET Developer’s Perspective

6th February 2009

Learning Java from a .NET Developer’s Perspective

I feel like I am discovering a whole new world. For my latest project, I have to do a lot of stuff in Java (1.6). While I am familiar with Java the language, I am a total newbie when it comes to Java related technologies, frameworks, and tools. Some of the specific Java technologies and tools I am using are JAXB/JAX-WS web services, Spring Framework, WebSphere Application Server, Maven, Rational Software Architect/Eclipse IDE.

Java Learning Resources

Here are some of the resources I found very useful while learning Java and related technologies in the past several weeks:

Portals

  • Java.sun.com – From the creator of Java itself.
  • Dzone – It’s like DotNetKicks but has everything including Java stuff.
  • IBM Redbooks – Tons of reference materials and everything is free.
  • developerWorks: IBM’s version of MSDN. There is a busy community section with forums as well.
  • Safari Books Online offers on-demand digital access to reference books. It’s not free, but it’s a great resource if you can read lots of books in a short time. Subscribe to their unlimited account and read all the books you want for a month. Remember to cancel before the month is over. Also remember that IBM Redbooks are free on the Redbooks site. Don’t waste your Safari points on Redbooks. And even if you have an unlimited Safari account, IBM’s site is still better because it offers PDFs.

Java

Web Services

Spring Framework

Eclipse IDE, Rational Software Developer/Architect

Misc

C# Features I Wish Java Has

I am sure Microsoft was pretty much thinking about Java when they created C#. The Java language itself it very similar to C# in terms of syntax, keywords, and use of punctuations such as semicolons and braces. I have found that most language features in C# have equivalents in Java. However, there are a few notable exceptions which I particularly miss:

  • Code regions – I use code regions extensively in C#. Eclipse does support code outlining but it’s only for existing code structures (methods) and is not nearly as flexible as c# regions.
  • Properties – Java only has fields and methods. “Properties” are implemented as get* and set* methods. I really miss properties, especially after typing 10 getters and setters in a row.
  • var keyword – Another small but very nice feature in C# that helps make code more compact and reduce typing.
  • Verbatim (@) strings – Very handy for regular expressions and other string literals that contain lots of escape characters.

Java is still evolving. Here’s hoping that some of the above features will make it into the next version of the language.

This entry was posted on Friday, February 6th, 2009 at 11:08 pm and is filed under Dotnet/.NET - C#, Java, Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 9 responses to “Learning Java from a .NET Developer’s Perspective”

  1. 1 On February 8th, 2009, Dew Drop - Weekend Edition - February 7-8, 2009 | Alvin Ashcraft's Morning Dew said:

    [...] Learning Java from a .NET Developer’s Perspective (Chinh Do) [...]

  2. 2 On February 9th, 2009, Maxim’s blog » Links for 2009-02-08 said:

    [...] Learning Java from a .NET Developer’s Perspective Very useful list of resources for learning Java if you already familiar with C# [...]

  3. 3 On February 9th, 2009, Amr said:

    great ! I finally found a fellow with the same interest.

    though JAVA’s syntax is similar to C# 2.0 but still getting started with JAVA is one big issue for me. so please advice :

    1- IDE you are using, (the easiest).
    2- web framework you are recommending.

    Thanks

  4. 4 On February 9th, 2009, Chinh Do said:

    Amr, The only IDE I have been using is Eclipse… I find it to be very nice. Re web framework, I am not building any web interface with Java in my current project so I don’t have any info on that. I believe Spring Framework has support for web front ends as well. Chinh

  5. 5 On July 29th, 2009, Mikey said:

    I completely agree.

    Properties were the second thing I missed, the first being the Visual Studio IDE, I was just doing a quick search to figure out if Java has regions (or something similar), turns out it doesnt. :-(

    The @ strings are a little annoying, but not something I can’t live without…

    Another very annoying thing is the API… haphazardly cased, also it’s awesome that all of the UI classes are prefixed with a “J” — you know, just in case you forgot you were in java or something… — I guess that’s the sort of thing that happens to a language when it’s been developed for 15 years by several different companies who couldn’t make up their minds…

    –Amr, it’s a little late, but as for the framework you should use to be most web compatible, I recommend 1.5, as 1.6 isn’t widely supported on Macs/OS-X yet.–

  6. 6 On January 3rd, 2012, Discount Windows 7 said:

    Discount Windows 7…

    [...]Learning Java from a .NET Developer’s Perspective » Chinh Do[...]…

  7. 7 On April 25th, 2012, Tim Heap said:

    great article, lots of really useful links for a diehard c# programmer.
    If you’re using Eclipse you should really look at NetBeans 7.1 instead, it’s far superior especially if you are using Maven.

  8. 8 On April 25th, 2012, Tim Heap said:

    ps are you on linkedin, you would be a really handy guy to know :-)

  9. 9 On April 25th, 2012, Chinh Do said:

    Tim: Thanks for the tip re NetBeans. Yes I am on LinkedIn. Here’s my LinkedIn profile: http://www.linkedin.com/in/chinhdo

Leave a Comment

*