To list available contexts: kubectl config get-contexts To show the current context: kubectl config current-context…
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
- Dare Obasanjo’s “A Comparison of Microsoft’s C# Programming Lanauge to Sun Microsystems’ Java Programming Langauge” is the most comprehensive comparison of language features I have found. Highly recommended.
- Essential Java Resources, by Ted Neward, developerWorks. Another highly recommended read. Full of useful links.
- Java Tutorials and Java EE Tutorial from Sun Microsystems.
- Managing the Java classpath (Windows), by Elliotte Rusty Harold (developerWorks).
- Threading lightly series from developerWorks: Part 1, Part 3, Part 3. I found this series while searching for the equivalence of C#’s ThreadStatic attribute: the ThreadLocal class.
Web Services
Spring Framework
- Data Access Using Spring Framework JDBC, A.P.Raishekhar (devshed.com).
- Getting started with Maven and Spring, by P. Christian.
- Spring Framework Reference (PDF), SpringSource.
- Spring Framework Best Practices, mydeveloperconnection.com.
Eclipse IDE, Rational Software Developer/Architect
- Keeping Eclipse Running Clean, by Riyad Kalla.
- Eclipse Hidden Treasures, by Zviki Cohen.
- Effective Eclipse: Shortcut Keys, by Tomas Karmar.
- Rational Application Developer V7 Programming Guide, IBM.
Misc
- Maven in 5 Minutes, Apache Maven Project.
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.
[…] Learning Java from a .NET Developer’s Perspective (Chinh Do) […]
[…] Learning Java from a .NET Developer’s Perspective Very useful list of resources for learning Java if you already familiar with C# […]
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
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
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.–
Discount Windows 7…
[…]Learning Java from a .NET Developer’s Perspective » Chinh Do[…]…
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.
ps are you on linkedin, you would be a really handy guy to know 🙂
Tim: Thanks for the tip re NetBeans. Yes I am on LinkedIn. Here’s my LinkedIn profile: http://www.linkedin.com/in/chinhdo
kindly help me to learn spring framework web application. Basically I ASP.Net Developer.