Tuesday, April 18, 2006

How to become a Java Developer?

Who is this post for?

Anyone trying to switch careers ( I was in mainframes, asp then php developer then a swing developer before I switched to this web-app java development), or who is already in Java and wants to get to the next level.

What this post is about?

Few years back I was slogging on a swing app without knowing what the market was all about - though the swing app taught me the good and bad about Java - it did not help me in getting a job. This post is a guideline for that directionless soul...

this.post :

Heres some philosophy of mine. Ask yourself - how much did you spend last year on books on technology? If technology is your livelihood, think of it as an investment. You need to invest a lot ( and read a lot ) to get good returns. So do not hesitate to buy books, magazine subscriptions - its worth every penny/paisa/rouble.

Lets start.

Step 1 : Get to know Java's strength.

Assuming it was me years ago, happily coding php in dreamweaver and nodding along with the posters in slashdot who say how bloated and slow java is and how fast and nimble php or any scripting language is...Here are some of the arguments "for" java to that nay sayer that I was.

Java is not for a 10 page web application.
Java is not for a guest book like application.

Java is for an enterprise. Something big - really big - having some 500 plus pages, 100 or more modules.
Java is when you need your app to scale to crazy levels - say 2000 users per second?
Java is when your app has to live and be maintained over a period of - say 10 years?
Java is when your client wants important stuff like transaction, security, clustering, fail safe
Java is when you have a team of 20 or more developers, 10 or more Analysts and a no-nonsense client who will sue your company for any goof ups.

Ask yourself and try to find answers. How has Java become to what it is today? Sun is not microsoft when it comes to hype, marketing - still - how did Java become the next COBOL? ( meaning - something the enterprise trusts, and also there are lot of developers with Java expertise ). Why is there such a huge ecosystem in the Java world?

Frameworks ( Spring, IBatis, nano container, pico container, Struts),
IDEs ( IntelliJ, Eclipse, Netbeans, JDeveloper, WSAD),
Webservers ( Tomcat, Weblogic,Websphere,Oracle App Server,JBoss),
Object Relationship Mapping ( Hibernate, Toplink),
Tools ( JUnit, Ant, Maven, Cruise Control),
EJBs ( Entity, Session and Message Driven )

and the above list is not even 50% complete.

Its a little overwhelming but it all makes sense - each one exists to solve a specific problem. You need not try and understand everything in one go - you simply cannot and even the most experienced developer might not know all. But once you have the fundamentals in place you can quickly master any of the above technologies or the new ones that are being cooked right now.

I have given you a nice path to go from a dabbler to becoming a master - that I found through trial and error and from my friends and co-developers. So rest easy and keep reading.

Check this link - comparision of programming languages to see for yourself how Java is doing.

Step 2 : SCJP, fundamentals

It takes a month of preparation to clear SCJP - Sun's certification program. What do you get out of this?

Very clear understanding of the language's syntax
OO Basics - Polymorphism, Inheritance, Encapsulation - are drilled into you
Collections - A Java Developer's best friend

I strongly suggest you take the SCJP exam. Everything else is built on top of this so its very essential to have a clear understanding of Java.

Books I own : Head First Java, Khalid Mugal's book for SCJP.

Step 3 : Jump into web application world

Download Tomcat.
Download Eclipse. ( Notice the No in Notepad.)

Write a simple hello world servlet and print it on a web page.
Send a string on the response to a JSP page and print the value on the JSP page

Download mysql database server and start it up.

Connect to mysql and try saving some data. Dont worry about the beauty of code, design etc- just get it working.

Move on to Struts and see what MVC is all about. I have 2 posts on struts on my blog. If you have patience try reading them.
Try writing a simple web application - a guestbook - in Struts.

All along you might be asking - why the heck do I need to do so much? Again the answer is these technologies were not designed for a small app in mind. Its for a goliath - an enterprise.

Here are some design tips :

1. Separate the business logic from the Action Servlets. Write unit tests to test the business logic. Write unit tests before you write business logic. This is called Test Driven development (TDD). Net is full of resources - this is a powerful programming style - and my company - thoughtworks - believes in it strongly unlike any other company.

2. Separate stuff like Database connection into seperate objects - and use that object in those objects that need database access.

3. Most important - keep all logic out of your JSPs. Its only for presentation. The most complex logic a JSP page can ever have is iterating a collection and displaying it on the page. If you are curious, explore custom tags - so you can even move most of the logic needed for presentation into java class files.

Books I used : Head First JSP / Servlets, Struts in Action.

Step 4 : Become a smart Java developer - with your best friend - Ant.

Ant probably is the most widely used tool. Get to know Ant - try incorporating starting and stopping tomcat inside your build.xml. So you can do cool things like :

ant startserver
ant stopserver
ant runalltests

ant can also compile your application
ant can deploy your applicaton
ant can win you girls.

Step 5 : Get adventurous

Incorporate hibernate
Try doing some AJAX stuff in your app - its very very easy - and might give you the edge in a job hunt

Step 6 : Next step

Having a fair knowledge of Java, Struts can get you a entry/medium level developer position. To go to the next step you can explore the following areas :

EJBs - Great concept but bad reputation - Read Head First EJB.
Design Patterns - Get to know Factory pattern, Command pattern - my favorite and the rest - Read Head First Design Patterns book.
SOA, Web Services - These buzz words are picking steam this year - find out about them and arm yourself for that curve ball in the interview.

If you have specific questions, email me or post a comment here and I will be more than happy to respond to your question.

Good luck and welcome to the world of Java !!


  1. Anonymous5:56 PM

    Cool scribbles. Keep writing.

  2. Adrian Perry10:58 AM

    As always another winner from venkat. Small but an articulate writeup makes life easier for entry level and med level guys. You tend to get lost in the mesh of technologies, this article acts like a beacon to those people. People who have not tried out his struts app, plz do so, you may learn something from it.
    All in all a good post. Expecting better things in future. The bar is set high now.
    Adrian Perry.

  3. Anonymous4:35 AM

    Thank you very much for this article venkatraman.
    Malek Baroudi

  4. yap this is a real dllicious guide..thanxxxx

  5. Lokesh Bharani9:08 AM

    Nice article Venkat, keep writing.

  6. Anonymous12:33 PM

    Thanks for the inspiring and very informative article Venkat. As a current Tech Support analyst inspiring to jump into a full time Developer role your blog has given provided many great tips on things to start looking through and a great overview of some key technologies. I often find some of Sun's documentation very overwhelming but this has been very beneficial, keep up the good work!


  7. Anonymous10:20 AM

    Great guidance! Thank You very much!!

  8. Anonymous9:49 PM

    It's really good article.Even i am a java developer(having a limited skillset) but i am very confused about my career till i read this post.Thanks :-)

  9. Anonymous12:29 AM

    I am from software background.... after wasting my career for 2 years in mgmt industry.... i am choosing Java as future career....i am just started reading n understand...n ur article is one of those which added to my inspiration to JAVA....
    thanks a lot.... n i look for a great carrer in JAVA programming...bye

  10. Anonymous12:28 AM

    good one , but it could be better if you can come up with ideas that will make beginner's like me to think dynamically and also code at the same time.......
    the books you have suggested have only solved examples which will help us to some extent however if one has to code from the scratch it may not be a good guide.....
    like they say Experience Speaks.....since you are already won the race in java i can expect a few tricks for the query all the beginners have..........thanks for your time ..........bye now

  11. Anonymous12:38 AM

    It was just yesterday that I've decided to become a Java developer. I have to start from the beginning because I am basically from an Admin background. Your advice is key and critical. I appreciate the advice.


  12. Anonymous12:46 AM

    hi venkat, this page is really good and we all like to read more from you.i have a question to ask you.i have just started learning java and j2ee.
    i have compiled and executed almost all the programs from the books,i have a fair idea as to how the code works however i have no clue which method to use and when to use.
    example a client says that he needs something to be done. say im ok with the requirement however i dont know which method to use how to use and when it must be used.it would be really helpful if you can suggest something...thanks regards,carvin.

  13. ADJOSHO10:59 PM


  14. Anonymous3:51 PM

    Thanks its Useful for Novice Programmer and your guidance really usefull for novice java programmer. I m thank of this website and also Mr. venkatraman.

    DhanraJ Koli Maharastra

  15. Anonymous1:05 PM

    Thank you so much. Wish I had found this article 2-3 years ago. Am gonna follow, read & do exactly as u said. Thx Venkat. very helpful post for a person moving from System admin/networking to being java programmer/developer. btw am changing careers.

  16. Anonymous9:25 PM

    Very nice article.Precise and exactly what i needed.

  17. Anonymous10:45 AM

    Great Article !!

  18. Anonymous9:32 AM

    nice one !!!!

  19. Anonymous1:27 AM

    love this article...

  20. Anonymous12:32 PM

    I've been struggling to make a switch to Java development but no progress because of lack of direction . But after reading this blog, I feel I get the right direction. Thanks a lot.

  21. hi i have done core java,servlet,jsp,struts and practice is still going on for hibernate,spring and ejb's now i m difficult to find a job in delhi and ncr so can you tell me how i prepared for the interview and get selected please help me... ur advice send me on this id dilip.razz.roy@gmail.com,i m very grateful to you i m alone and frustrated.

    Thanking You