Slashdot Mirror


Java, Where To Start?

I'm a web developer who has design and programming experience. So, VB, ASP, PHP, Coldfusion, Perl, even C and C++ I have in my belt. I also use Dreamweaver and/or do a lot of my HTML/XHTML/JavaScript coding by hand. So, the DOM, DHTML, etc, all good to me and even OOP thinking and design I have when I code. And I even have MySQL and other databases, again, not an issue here. So, my weak point is — Java — I see so many jobs out there with J2EE, Hibernate, Eclipse, Netbeans. Beside the obvious, which is to learn Java the core language, I don't know where else to go from there. There is so much! What should I read? in what order? What software do I require? UML? Swing? I mean, what is the curriculum required for someone to say they are a solid Java developer? Even assuming I have to go through Java itself, what are the good books out there?

23 of 558 comments (clear)

  1. Read some core Java books by Anonymous Coward · · Score: 1, Interesting

    I would read:
    Head First Design Patterns
    Effective Java
    Pragmatic Programmer
    I found it useful when I was learning the language to have Java in a nutshell

    If you want to do Java web programming learn Struts.

  2. My opinion of what Java APIs are worth learning by hattig · · Score: 3, Interesting

    The language itself won't be a problem if you've done C and C++, nor should OO concepts. So the difficulty is with APIs - what is worth it, and what isn't.

    In terms of Java APIs (core or otherwise), I'd learn in roughly this order:

    * Collections
    * Reflection
    * IO
    * Servlets & JSPs then Struts, Tiles, Spring, etc
    * JDBC, then Hibernate
    * Axis (web services) and Apache HTTPClient

    You don't need to learn them off by heart - I've seen people advance very slowly because they're trying to do that. It is enough to know what is what, so that when you have a problem, you know there is a solution, and where it is.

    In terms of interfaces, I wouldn't bother with Swing or AWT really, until you need them. SWT ain't too bad (Eclipse uses it, and it's cross platform enough - Windows, Linux, Mac, Pocket PC, ...). Maybe you could be fancy and learn Fenggui instead! Then you could learn JOGL and write 3D games and the like.

    Oh, and learn how to do Java on the command line first, use ANT to build and compile and deploy, then try Eclipse or NetBeans as an IDE. This way you'll avoid all the niceties that the IDE gives you that inhibits your initial learning.

    I wouldn't bother with half of the enterprise wank, like Enterprise Beans and all that.

  3. Re:What about C# by Anonymous Coward · · Score: 1, Interesting

    In what ways is C# better than Java? Same with Visual Studio being better than Eclipse. You're making one of those "more better" statements without actually qualifying it.

    My recipe for learning Java is to get Netbeans, Findbugs and PMD and start here.

    http://www.netbeans.org/kb/index.html

    You should also learn Groovy/Grails for getting stuff done quickly. Netbeans 6.5 will ship with these plugins. It's pretty cool stuff.

  4. Groovy by mgkimsal2 · · Score: 5, Interesting

    I'd suggest starting with Groovy (http://groovy.codehaus.org/) then perhaps move in to Grails (http://grails.org). Groovy is a dynamic language that runs *on* the JVM, and can co-exist with native Java code, but requires far less boilerplate code to get anything done. If you're coming from a dynamic language background, Groovy will be a bit easier to understand.

    This will allow you to get involved with Java technologies without as steep a learning curve as you'd require if you were doing it 'from scratch'. You can incorporate as much 'other' Java tech as you want as you go along, but you'll be up and running fast with Groovy.

    http://michaelkimsal.com/blog/grails-for-php-developers/grails-for-php-developers-part-1 is few part series on did on Groovy and Grails for people coming to it from non-Java backgrounds. Never quite finished the series, but it's someplace to look to see if it's something to investigate further.

    Good luck!

  5. Re:Thinking in Java by Pengo · · Score: 2, Interesting

    Yup, I agree 100%.

    I started reading this book from the internet in 1999 when I started my career in programing Java. It was a great place to start, there might be better material out now but that's what gave me my jump start.

  6. Re:I beg to disagree by MrNaz · · Score: 4, Interesting

    Come on now. I'm getting tired of all the "I'm thinking of learning $fooCommonThing and I need Slashdot to spoon feed me Google results." type questions.

    I cannot believe this made front page when there are other, rather good questions in the firehose that would result in good dialog and idea exchange, but that get rejected.

    Seriously, is there some shortage on Java dicumentation out there or something? Granted, I don't know the language as I never had a need for it, but I can't trip over without falling into a pile of Java tutorials.

    Here's my answer to this particular Ask Slashdot.

    --
    I hate printers.
  7. Re:Wrox Press by multipartmixed · · Score: 2, Interesting

    Does Java uses finalizers? If so, how do they differ from C++ destructors?

    (Honest question - I'm not a Java guy but IIRC I found the finalizer concept in Java useful in understanding finalization (called during GC) in Spidermonkey.)

    --

    Do daemons dream of electric sleep()?
  8. Re:Start simple. by fbjon · · Score: 2, Interesting
    I agree. The standard library is the most important library of them all. Many people seem to fancy rolling their own when they need something, without realising that it's already in the standard library. For instance, a couple of years went by before I realised that there's a Logger class to handle all logging needs.

    As far as I know and can see, there are no must-have frameworks or libraries, only sometimes-good-to-use frameworks and libraries.

    Speaking of exceptions, do not catch Exception, and do not catch Throwable, unless you know exactly why you should do that.

    --
    True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
  9. Re:Don't by alex4u2nv · · Score: 4, Interesting

    I would have to agree here, as someone who knows J2EE.

    I studied J2EE application development a couple years ago, when it was supposed to be the "new" next big thing.

    I was already bought, and for all my term papers, in every language course that I wrote, was touting how the future was Java and J2EE.

    In the real world? Its not. I would say, stick with the languages under your belt as they're the most marketable tools in the world.

    My opinion was completely reversed, because in a world where opensource is aspiring and component based development is becoming cleaner and easier, the languages with most opensource software, such as C/C++, PHP, Perl, MySQL, etc will grow even faster.

    Look at it this way, Php 4.x as a non object oriented language, and php 5 as a 80% object oriented language has more freely available software available for coupling than Java does.

    Client/Server Development -- I would focus on the Javascript framworks, Flex, Google Gears, Adobe AIR, etc. + what you already know.

  10. Re:managers just don't care about skill level by thermian · · Score: 3, Interesting

    In my experience, managers don't tend to care one whole hell of a lot about the skill level of local employees when a job goes offshore. You could be the worst or the best; at the end of the week, you are still laid off so that Anand & Prasun can have your job.

    Then don't work for companies like that.

    Any heavily outsourced software house is screwed if its working against another which has skilled, highly motivated staff. Outsource workers have a task to do, they do it, and they cease to care. You don't get innovation that way, you just get lines of code.

    --
    A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
  11. Re:Don't by Z00L00K · · Score: 4, Interesting

    Maybe, but I'll say that it's not a bad thing to be able to know Java.

    There are benefits and there are drawbacks with Java, as there are with other languages. The drawback with Java is that you don't have any control over memory management, but the benefit is that it's easy to program in if you have been working with C and C++. And you will at least not suffer from some weird bugs that you can get in C or C++.

    For beginners in Java I usually recommend JavaRanch.

    And to develop I recommend Eclipse. It works fine and can give you instant feedback on many issues. Of course - it has some quirks too, but so does every tool.

    And if you want to select a more extreme language I would recommend Erlang. It has a completely different approach than normal procedural languages, but sometimes it makes more sense.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  12. Re:What about C# by Z00L00K · · Score: 2, Interesting

    I wouldn't say that C# is easier or more powerful. It's similar to Java, but also different.

    And personally I don't like the Visual Studio environment. It has some advantages if you develop specifically for Microsoft environment, but if not you are at a dead end. (Yes I know that Mono exists, but still)

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  13. Re:Wrox Press by Reality+Master+101 · · Score: 2, Interesting

    I would avoid Wrox on general principles. This was hammered home to me when I was offered a contract to write a single chapter for a Wrox book. Apparently they go out and find people who will work *extremely* cheap. I mean, the pay was in the three digits -- I turned them down, needless to say. And as near as I could tell, they didn't do much vetting of my expertise. They just take all these chapters and throw them together into a book. You're just not going to get a cohesive publication that way.

    They put a positive spin on this by saying it's written "by programmers for programmers", but I was pretty soured on the quality of their stuff after this experience. Maybe some of their stuff is better organized or better paid these days. This was probably 5-10 years ago.

    --
    Sometimes it's best to just let stupid people be stupid.
  14. A straight answer: servlets, then JSP by ewg · · Score: 2, Interesting

    A straight answer: leverage your knowledge of web development by starting with servlets, then move on to JSP.

    Regarding tools, I've had good results with NetBeans with both novice and veteran Java developers. The "Web & Java EE" bundle comes with both Apache Tomcat.

    --
    org.slashdot.post.SignatureNotFoundException: ewg
  15. Re:Dont do it. Go C# instead. by k33fb · · Score: 2, Interesting

    Rather than conentrating on java, the most important things to look at are:

    1) Good OO-Design Programming (along with design patterns, the latest in thing , "Head First Design Patterns" is a good book). My workplace (a .net shop) employs Java developers over .NET candidates where they are strong in these.

    2) Expose yourself to different syntaxes & programming paradigms: Doing this will help you pick up any framework. For example functional programming is beoming increasingly important in the .net world for certain tasks.

    I'd personally go with .Net, it has made huge strides in the latest release (3.5, especially with sp1), even .net 2.0 was pretty good. It doesn't suffer from the lack of integration in the technology stack that Java has which I hear about when talking to my Java Colleagues, also productivty seems higher, though this might be aprocryphal.

    Take a look at http://weblogs.asp.net/scottgu/archive/2007/07/16/linq-to-sql-part-5-binding-ui-using-the-asp-linqdatasource-control.aspx for an example of a tiered application and the screen-cast at http://weblogs.asp.net/scottgu/archive/2007/12/14/new-asp-net-dynamic-data-support.aspx to see what has been acheieved in terms of productivity

  16. Helpful Stuff from Java based CS degree by uberzip · · Score: 2, Interesting

    My CS degree from University of Washington was based on Java. These are all recommendations from working through that degree. To learn the basics of Java I highly recommend Sun's books online. They are as well written as most things out there and I never found a need to use much else. The class library for Java is also much more straight forward and enlightening that anything Microsoft makes. Before I got itno the online resoursces, I actually referenced a lot of C# primer plus as the two languages are so similar. For Servlets and JSP I really like Murach's Java Servlets and JSP. Its a good basic intro and it will have a lot that you already know. However, its one of the best written books I've read and gets right to the point rather than filling pages with bloat. I'm really a big fan of Murach's books... they come out at a slower pace but have a lot more quality control than other series. For development I highly recommend either starting with Dr. Java or getting Eclipse and downloading the Dr. Java plugin. TextPad is also a good backup compiler to use. On one hand, Dr. Java is very simple and easy to use but has some bugs, but Eclipse is a big IDE to get into at first and start loading plugins can be confusing if you're not use to it. However, either way Dr. Java is an incredible learning resource. It allows you to play with Java in real time, so if you make an object, you can go into the Dr. Java interactions window and make an instance of your object and call its methods to see how it works all without making a wrapper class to test it. You can also play with core Java code too. So you can go in and type something like: int x = 8*2; x; and it will print out the value of x for you. All done without compiling or even having a file open. Its really nice to use to get use to how arrays and various other data structures work in Java. I also like some of the Java Data Structures and Algorithm textbooks just because those are good ways to see how the basics of the language work. However, I have always found for things like Swing, JOGL (openGL in Java), multithreaded programing or multiprocessor programming, etc I just prefer to use the resources online on Sun's site or through a google search. So many universities use Java now that you will get lots of .edu sites with really good tutorials. I can't stress how good of a resource Dr. Java is though.

  17. Re:Job or knowledge? by dubl-u · · Score: 2, Interesting

    I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program,

    Just for those who think he's kidding:

    Having people do "Hello World" on the whiteboard is one of my standard interview questions. I'm pretty good at weeding out the enterprise 'tards by resume alone, but I'm still surprised how many people are unable to write a working "Hello World" program from scratch. Maybe a third of my first-round interviewees fail this.

  18. Re:Don't by Ashcrow · · Score: 2, Interesting

    I more or less agree. Java really is the language of the now ... and it's a huge language. The problem with picking it up this late in it's life is that by the time your marketable with the language you will probably only be working on legacy upkeep applications.

    Learning Java is a good thing, but like John said pick up Ruby or Python to be marketable in the future (or Erlang as it seems it's getting some steam as well), and Java so that you can understand this gen's applications.

    Book wise I've heard "Head First Java" is quite good (though it is probably out of date). I personally liked the books directly from Sun. I also recommend you look at Java security as there are a lot of folks who can write Java, not very many who can write Java in a secure manor (or so it seems from experience).

  19. How to get foot in door for Java job? by Anonymous Coward · · Score: 1, Interesting

    I am in a similar situation than OP. I have been falling into Microsoft's .NET trap and for the last 8 years rewriting the same apps in the next version of the framework (VP goes to M$ seminar, sees new cool stuff, buys latest Visual Studio for the whole team, half the old code wont compile so we have to rewrite).

    I got pretty tired of a framework where you expend half your development time working around its limitations and bugs instead of getting the job done so I quit that job and started looking for something else like Java. Now, it seems you need 5+ years experience in J2EE or some other crap to get the foot in the door.

    Is there anybody out there willing to hire programmers with solid OO experience but little Java?

    Should I just study Java for like a month and then change my resume claiming 5+ years experience?

  20. Start Here by peterofoz · · Score: 2, Interesting
    I also looked into this. The hard part about Java isn't the language. If you have a solid background in C/C++, then Java should be very familiar.

    The tough part is in navigating the huge frameworks. Be it STRUTS or another MVC, then there's all sorts of add-on stuff to learn. Then there's the whole WebSphere or Weblogic administration, tuning thing. In short, you can't learn it all in a timely fashion.

    A agree with another poster that a superficial skim of a library or framework is probably sufficient so you have a basic understanding. In the end, you won't know which one to study until you have a project.

    If you are on-shore USA, then you'll probably not want to be a Java developer, but a project lead, analyst, or integrator. Those are customer or business facing jobs at the interface that are difficult to outsource but require people skills and in-depth knowledge on troubleshooting and delivery.

    As for me, I'm going back to coding in Prolog. It rules.

  21. Re:What does Java lack now? by arevos · · Score: 2, Interesting

    Like what? Name anything and Java probably already has a library for it. Java is just as flexible as anything these days, and wether your thing in running Ruby on Rails on top of the VM with some Java through in the backend or some functional Groovy work Java has options.

    I think you misunderstand me. I'm not criticizing Java's libraries or the JVM. I'm criticizing the Java language.

    As for how its limited, just consider the tools used in other languages. Lisp programmers often use macros in their code, because manipulating Lisp code is extremely easy. Java programmers have libraries for generating bytecode on the fly, but they have nowhere near the ease at which S-expressions can be thrown around. As such, libraries or frameworks written in Java that use bytecode generation are relatively rare. In the Lisp world, you'd be hard pressed to find a library that doesn't use macros somewhere.

    Similarly, Ruby makes a big deal out of blocks. Java can do similar things with anonymous objects, but again, they're very unwieldy and are not used with the same ubiquity as Ruby uses blocks. Ruby can also add methods to classes on the fly; Java can do this too, via bytecode manipulation, but it's horribly complex compared to Ruby, and thus hardly use.

    Another example of a abstraction you don't find in Java is the monad. Used all the time in Haskell, I've never seen a Java implementation. Again, this is because it's so difficult to implement anything that resembles a monad in Java that it's usually not worth the bother.

    Note that I'm not complaining about the JVM here. Scala has monads, Groovy has blocks, and Clojure has macros. It's perfectly possible to use these abstractions in the JVM, but usually completely impractical to try using them with the Java language. My criticism, therefore, lies with more with programmers who don't look beyond the language of Java, rather than the VM or standard library that share the same name.

  22. Re:What does Java lack now? by SuperKendall · · Score: 3, Interesting

    Java programmers have libraries for generating bytecode on the fly, but they have nowhere near the ease at which S-expressions can be thrown around.

    Java is soon adding closures though. Honestly I used to do a lot of Lisp and Scheme and I always though I could represent pretty well want I wanted to do in Java, coming from those as a base - there are just different mechanics to achieve a similar design.

    You have me on monads, though even there there are possibilities, and they are not that difficult (and in fact I have made heavy use in some code of exactly the technique mentioned for one project).

    My criticism, therefore, lies with more with programmers who don't look beyond the language of Java,

    While I agree with that at some level, I would say there are too many people that have not explored the full range of what Java itself can do and how techniques learned in different languages can be applied using a combination of Java and various libraries.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  23. Re:You totally missed the point by IcyHando'Death · · Score: 2, Interesting

    If you have a little Java experience (1 month or more) but want to get into the much larger and rather daunting enterprise world, this course - http://www.javapassion.com/j2ee/ - is truely one of the great Java resources on the web.

    It is the equivalent of a university graduate course on enterprise Java and is offered for FREE by the instructor, Sang Shin, a Sun technology evangelist. It covers a wide range of topics, such as EJB, Struts, Hibernate, Java Server Faces and the Spring framework.

    The course is every bit as demanding of your time as a graduate course would be too, so don't undertake it lightly. It is taught over a 5 month period with weekly reading and assignments which are marked for you. There is a Yahoo! group for the course where you can get any questions answered that you may have.

    Unfortunately, the current session started on July 1 and will run until the end of November, so you probably won't get a chance to register until January -- assuming Sang is kind enough to offer the course yet again (he does this on his own time).