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.

11 Replies to “Learning Java from a .NET Developer’s Perspective”

  1. 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

  2. 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

  3. 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.–

  4. Pingback: Discount Windows 7
  5. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *