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?
I started Visual C++ 5 with a book called "Beginning Visual C++ 5" by Ivor Horton from Wrox Press. When I started in Java I bought a book titled "Beginning Java" by Ivor Horton.
I would start there. Java is really straight forward OO language. The only issue you will have coming from C++ is to let go of destructors and realize Java does not use them. Many from C++ take about 6 months to stop tryng to make a finalizer into a destructor.
Isn't it better to specialise in a few of the varied languages and systems you have worked on, rather than trying to spread yourself thin?
There is truth in the saying 'jack of all trades - master of none'.
So, maybe concentrate on building up the other skills, rather than trying to 'bag' a new technology. I used to try to gain exposure to loads of different technologies but found that when you do so you do at the expense of the 'depth' of knowledge you have in any one.
Thinking in Java is nice. And it's free. http://www.mindview.net/Books/TIJ/
Thinking in Java is a good book on the Java language. You can read it online at the author's web site: http://www.mindview.net/Books/TIJ/
... then learning Java, EJB, etc. ... it should be a walk in the park. You shouldn't even need a book. Just go get the specifications from the Sun site and read them.
Seriously, Java is orders of magnitude more simple than C++. (That's a pro and a con.)
public static void main () {
For basic coding practice, try the free http://javabat.com/ -- it has little coding problems (logic, strings, arrays, recursion) that run right in the browser, so you get immediate feedback. It's great for building skill in the basics, but it's no substitute for building larger programs. Disclaimer: I built it
Dice.com -
Search Java - 14480 hits
Search C# - 7146 hits
Ummm, what? Eclipse is an IDE, Tomcat is a container for web servers. Tomcat and Apache can be used with Eclipse with a nice little plugin for testing.
God, schmod. I want my monkey man!
Sun has developed a program to train for java.
read at the sun site
java is relative simple. Those certification programs give you a guideline what is involved in certain roles. But java is MUCH and lots of simple libraries. that is what people underestimate.
I understand you might not need certification, but the knowledge described there gives a good idea what you need/can put on your CV.
My first Java book was: head first. http://oreilly.com/catalog/9780596004651/
This great if you have little experience with an object oriented language. They state that they are funny...Well sometimes they are :-).
Another way to learn java is to code a little Java mobile App. This is fun, the API is quite limited usually and so you don't need hours of documentation before seeing something nice.
The blackberry IDE was free and really nice to use back in my early days. You get the basic before heading to more serious things.
If you want a Java job, just update your resume to say that you know Java. I have met lots of J2EE experts at work, who would not be able to code a "Hello World" program, if their jobs depended on it. Also learn lots of buzz words.
If you want to learn Java for knowledge, join a community college, install Eclipse and get started.
As a person in charge of desktop imaging and 3rd level support at a company of 100,000 desktop and notebooks, I'd first say, "don't use Java at all". My second thought is, "well, if you must use it at all, use it only on the server.".
Unfortunately Sun, in its infinite wisdom, has no idea at all how to patch. They have security vulnerabilities all the time and they make you install a completely new version of Java in a new folder each time. Their "updates" leave the older vulnerable versions behind (and still accessible by malicious code). Their updates break applications all the time. We are constantly having to deal with issues like the current one we have: there are known vulnerabilities in JVM 1.6.0_05b13, but there are some serious problems with deploying the "fixed" version as it causes bizarre error messages and slows Internet Explorer down. Both are acknowledged bugs, but won't be fixed soon. So you end up stuck between securing the systems and having the systems actually work right.
Sun Java is a continual nightmare.
I'll say one thing from Microsoft - when you could use MS Java it never (not once in the several years we supported it) broke apps and patches were actually PATCHES and not whole new broken versions.
Java - just say no until they actually learn how to update and patch correctly.
Java is a good language to learn for the current marketplace.
The real problem thats putting people at risk of outsourcing is not the choice of language.
Its all about your skill as a programmer. If you're average, then there are plenty of average coders willing to work for less in India.
No, you've got to be better then average, great even, and that takes a lot of work.
A learning experience is one of those things that say, 'You know that thing you just did? Don't do that.' - D. Adams
Please, for the love of God, forget the frameworks. They come and go pretty quickly and each one is usually over-hyped to begin with.
Learn to be a great Java programmer. That means knowing the standard library in and out. Develop really good OO modeling skills. Learn what it means to write robust code. Understand and use exceptions effectively instead of littering blank catch blocks everywhere. All of these skills will serve you far better than knowing what arguments the RegistrarClassFactoryStubGeneratorJarBridge uses in its create() method. From there, as needs come up, you can experiment with higher-level abstractions. But please do NOT become one of those people that 'learns' that all database access should be handled through *insert-ridiculously-overcomplicated-framework-with-50-config-files-that-must-be-in-special-places.*
Aside: the reason Rails became so popular is because it managed to 'just work' without all of this inane configuration and magic files. The Java community is practically in love with complexity, since it is very enterprise-y.
The key is the libraries: that's where it goes from being merely another OO language to being able to do something useful. I'd start by getting a simple "hello world" program running, then thinking up a home project which allows you to start adding features and functions.
Most of the documentation I've seen is pretty poor - it gives argument lists and describes functionality in isolation, but misses out the higher level WHY you would want to use a function. Learning that is where the gold is.
politicians are like babies' nappies: they should both be changed regularly and for the same reasons
Java's an entire ecosystem unto itself these days. So there's no simple answer - you have to figure out what kind of apps you want to be involved in building, then that will inform your choice of Java based technologies. For the most part I do enterprise web site development, and that mostly on the server-side, so I'm a Java EE/Hibernate/Spring/Eclipse person. Plenty of professional experienced Java developers will never use any of those technologies!
Once you've figured out what kind of apps you want to be building, I'd suggest visiting the Sun Forums if you have any technical question and then poking around the Java.net site, theserverside.org, JavaRanch and the java usenet newsgroups to get a better feel for what's out there and how it's rated by developers. Feel free to drop me an email if you have any questions that you want to ask offline.
Ignore the naysayers - for the most part they don't know what they're talking about. Sure you should have other languages under your belt, sure there's offshore competition, but still, Java experts are in demand and they will be for a long time yet.
--- These are not words: wierd, genious, rediculous
Ok, you're missing my point, which is that Eclipse and Tomcat have absolutely nothing to do with each other. You don't need to "switch" from one to the other because they are used for entirely different purposes. Yes, they're both tools, but it doesn't make any sense to tell the parent that you switched because one is used to write code and the other is used to serve applications. It makes you sound like you don't know what you are talking about, and will only confuse new developers.
God, schmod. I want my monkey man!
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.
I don't understand your logic. Java is fast, powerful, portable, and clean. Just because a lot of other people have realized how great it is doesn't mean that one shouldn't learn it. Java seems to be one of those things that people don't want to use just because it's "too" good.
while(1) attack(People.Sandy);
As someone who's worked in Java with some of those 100.000 guys in India, they may know Java, but most don't know java well. The vast majority of programmers either here or there can solve a problem, but not consider the security risks in their solution, nor necessarily come up with an elegant design for doing so.
Having said that, I've used hibernate (once, to get it set up and configured, it works well enough we didn't have to go back and change it), struts/struts2, and tiles. Most of these are XML configuration rather than coding. If you can do make files, and handle any markup language, these won't be a problem.
It sounds like your main concern is learning java itself. Since you know C/C++ the syntax and conceptualizations won't jump out and bite you. I'd recommend grabbing a project that interests you (or that needs to be done), and just doing it. Use Eclipse, its tools will make your life MUCH easier (unless you like coding c/c++ in a vi-like environment, in which case by all means use emacs/vi/editor of choice). I'll probably get slammed for saying this, but learning java isn't any harder than learning VB, (easier than C/C++ which is what I'm currently picking up), it uses a different namespace, and slightly different approach, that's all. If you're a competent programmer (and from your post, it sounds like you are) then it's just going to take some time/hard work to get used to the new language's quirks.
Once you get the basic Java syntax (which will not take long looking at the langages you already know), read this book: Effective Java , by Joshua Bloch.
There is also a video on YouTube: Effective Java Programming with Joshua Bloch.
And you can read it on Google Books.
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!
creation science book
so what, you can do something smart, new, cool and on the rise in Java, if the indian guys scare you, change career to plumbing.
If you are a serious programmer and want to solve real business problems, concentrate on what Java does well - glue things together and use well thought out class structures to map onto the things you want to do.
In my admittedly limited experience over only 25 years or so, if you leverage the strengths of Java you can do things you can do in other languages about as fast, with good reliability, good debugging, good code re-usage and rare platform incompatibilities.
Oh, and get used to Derby (formerly Cloudscape), because you can then have your SQL database all bound up in your 100% Java application and still talk to spreadsheets etc. as easily as if you were using Access.
From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
It's a difficult industry to get into as you're probably aware. Recruiting for Java posts is a minefield - it's full of people who should be stacking shelves in a supermarket.
I don't think you can go far wrong if you get as much experience in core Java as possible. The same goes for J2EE; if you understand what it is and know the trials and tribulations of building a web-app from scratch, you're on the right track. Then, and only then, should you move onto working with frameworks; so build applications both stand-alone and web, and do the boring stuff yourself (i.e., write your own web.xml.)
Spring and Hibernate are funny ones. Spring's just an IoC framework. Until you're proficient in OO design, you probably shouldn't worry about it. Oh, and learn what IoC is first. Don't just think 'spring' and say you know it. Very few people know why they chose spring as a framework (there are plenty of IoC containers out there).
Hibernate (an ORM solution) is a dark art. Get the basics done first. Write JDBC DAOs yourself and learn why you'd need ORM before you dive into it.
Basically, learn the core concepts.
ilovegeorgebush
What?! Well, why is Open Office so slow then?
And you are brillant!
http://thedailywtf.com/Articles/The_Brillant_Paula_Bean.aspx
O'Reillys "Head First Java" is IMHO the best technical resource / learning tool I've ever used; it's honestly fun to read. You can read it online for 30 days free using the Safari service.
A favorite excerpt of mine (on how to remember the single-inheritance, multiple-interface concept):
Roses are red,
Violets are blue,
Extend only one,
But implement two!"
Ensure your concurrency skills are up to snuff. Read about the newer (1.5+ so not that new admittedly) ways of handling concurrency in Java - a lot of older books will miss the java.util.concurrent frameworks.
Persistance frameworks are all well and good, but understand the fundamentals of how things work at the database level inside Java.
Although this changed a little with the latest rev of EJB, many sites simply dumped it and went with Spring. Worth knowing.
Pick one and know one, use that to extrapolate to the rest. My own advice is to look at Tomcat, but just knowing the basic concepts behind them is a start.
There's probably a lot I've missed, but right now I'd consider looking at those.
Cheers,
Ian
Best core java books i have read:
- Effective Java from Joshua Bloch (second edition is available)
- Java concurrency in practice
- Head first series.
After that, you can chose books depending on what you want to do. And trust me you cannot find any platform/language having more resources and tools available than java.
I know Java; I can use it for almost everything except web development. My small amount of experience with using it in web development is that you make an object and the get/set methods, and the frameworks handle the rest. Something like Hibernate which can create get/set methods and your POJOs based on your database schema is very useful to know. Spring, Stripes, and the rest are very good as well. Knowing Java itself is the easiest part. If you actually got a job as a Java web developer and didn't know any of the frameworks, you wont be able to do anything. For those who suggested a different language than Java seem a bit biased. There is good money for knowledgeable Java programmers.
Eclipse RCP is growing in popularity and is built on the OSGi service framework, which is also gaining popularity on the server side. I'd highly recommend looking into Eclipse RCP. It has a vibrant open-source community that is eager for new helpers.
Honestly, all of these acronyms you can list, and yet you don't have the initiative to learn another language without posting silly questions like this?
It's not about "learning a new language". Learning Java is trivial. The problem is the hundreds of bloated, redundant, incompatible "frameworks" and "libraries" that exist for Java. Which one to learn is a valid question (albeit, it doesn't have a good answer).
You need to encapsulate that in a class. And your main method signature is wrong -- needs to take a String array as an argument, or else the program will say "No such method found (main)" and die.
Honestly, its almost like no one on Slashdot programs in Java some days... ;)
Help poke pirates in the eyepatch, arr.
Richard Baldwin. He's fairly well-known online. He was a professor of mine that introduced me to Java. Check out his tutorials that he has posted online for free. These are what he pulls up in his class when he teaches. They're basically his lecture examples w/out the voice to go along with them. I went in with zero Java knowledge and came out a Java superstar (well, not quite, but I definitely came out with a very solid understanding of the language after the first semester). Check out his tutorials. He introduces Java concepts in a very easy to follow manner.
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.
-Alex. http://bit.ly/1iVPtfA
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
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.
We do Enterprise web development for a major University and leverage Java as our core language. We use a combination of software including Java, Hibernate, and Stripes to manage student information for tens of thousands of students. We have found this to be an excellent combination.
Recently, I have been experimenting with upgrading our platform by using Groovy for unit testing and batch jobs. Groovy is basically dynamic Java. It is 99% compatible with Java so essentially you can drop in you Java code and it will run except on a few edge cases. This is because Groovy compiles down to the same bytecode that a similar Java class does. You can't tell the difference except the smile on your face as your coding is reduces by approximately a 6:1 ratio.
Groovy incorporates some of the cool features that other 'dynamic' languages such as Ruby and Python have been rubbing in us Java guys noses for quite awhile such as closures, operator overloading, and autoboxing. A good book on Groovy is by Scott Davis' called "Groovy Recipes" (ISBN 10 0-9787392-9-9). Groovy is the ticket to moving Java into the 21st century.
If you are feeling adventurous and are starting a project from scratch, I suggest another web framework called Grails. This convention based framework and development environment uses the Groovy language and leverages popular and solid frameworks available such as Hibernate and Spring. A good book on Grails is "Beginning Groovy and Grails: From Novice to Professional" (ISBN: 978-1-4302-1045-0).
Dynamic Java is here folks and it runs on the JVM which is where things seem to be heading (JRuby, Jython,..). Why use a language that must be transformed to use the JVM? Instead use a language that the JVM was designed for!
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.
BOOKS
-----
Learning Java (O'Reilly) - one of their better books in recent years, and actually kept up to date with new editions
Effective Java (Addison Wesley) - preferably the second edition, which covers generics
J2EE Design And Development (Wrox) - heavy going, but it's simply the best book on J2EE development
ANT In Action (Manning) - describes the de-facto build tool in the Java world, which can also automate things like deployment
TOOLS
-----
Checkstyle http://checkstyle.sf.net/ - a basic static analysis tool
PMD pmd.sf.net - a more advanced static analysis tool
THINGS TO AVOID
---------------
EJB - it's gotten better in version 3.0, but a lightweight framework like Spring is still a better choice for almost every project
Maven - it might be great for some Apache hosted projects, but it's caused more problems than it solves on every system I've worked on with it
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.
That is precisely the point of the question. You could quite easily spend 6 months solidly reading the stuff out there, so what OP is looking for is a recommendation or two to save him spending months finding the stuff that's worth reading in the piles of dross. I'm hoping there are some good answers, because I to would quite like to get a handle on the more enterprisey side of Java.
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
Is Visual Studio actually written in .NET? Eclipse is... Is IIS written in .NET? Tomcat is.
.NET must have lots going for it if even Sun are writing all their tools in it.
Did you just call Java fast and clean?
Really?
I'm sure he means 'compared to the .NET framework'.
There's no place like
Rather than conentrating on java, the most important things to look at are:
.net shop) employs Java developers over .NET candidates where they are strong in these.
.net world for certain tasks.
.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.
1) Good OO-Design Programming (along with design patterns, the latest in thing , "Head First Design Patterns" is a good book). My workplace (a
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
I'd personally go with
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
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.
Django looks great, however, this year I decided to learn two new languages as a developer: French and Italian.
What does this do for marketability as opposed to learning another development language?
Languages I know + another language = Language++;
Languages I know + another written|vocal language = Languages I know * (written|vocal) languages
-Alex. http://bit.ly/1iVPtfA
http://python.org/
So, while I get that the asker of the question is very serious, and some people answering him also, I don't get what the motivation about questions like this are. I mean: the guy tells us he basically knows everything (languages, tools, concepts) that is important about "programming".
So I would ask the asker: why do you want to learn/use Java?
So, the simple answer to his question is: ;D and a very short introduction into the syntax of Java)
just start coding. Besides an IDE you don't need anything for starting to work with Java (probably knowing how to browse Java Doc
The more complex answer: ... you don't really specialize your skills and neither you really broaden your skills (Java, C# etc. don't really add anything you don't already know from C++). You only add some TLAs to your skill set and you fit "at a first glance" better to job descriptions.
If you add Java to your language zoo
UML ... not MDA, that is to complex) will broaden your spectrum. Hint: Eclipse + OAW might be interesting to you. OAW is a MDSD tool chain, based on Java (if you use that, you will program a little bit in Java). With OAW you basically write your own generators, to transform specifications from UML into your language of choice (via templates and "Scripting" in Java)
If you did not use UML so far, you don't need it for Java either. However: learning UML and something about Model Driven Software Development (MDSD
Databases, Hibernate, MySQL ... but it goes to far to discuss this here) and also don't dig into JDO (Java Data Objects, a Java API) while the base idea is not to bad, most implementations just suck.
If you want to work with DBs you need a very basic knowledge about JDBC (a standard Java API) because all DB Frameworks use JDBC under the hood somehow / somewhere and the configuration of your DB access (URLs, Users, Passwords, Connection Pooling) will be always very similar regardless what framework you use. Besides Hibernate I would suggest to look at iBATIS, also (you will need the iBATIS book). EJB 3.0 is overkill IMHO (yeah it is not only persistence but also services etc.
Swing
First, a lot of people out there find Swing over complex and prefer SWT. I strongly suggest that you stick to Swing for several reasons. The complexity of Swing might increase your learning curve a bit. However, sooner or later you will need the features Swing gives you. And when you are a bit experienced in Swing, you will be very fluent with it. Note: Swing will be greatly improved in Java 7, when the "Swing Application Framework" is integrated (beta of that is available for Java 6 right now).
Similar to Swing and probably interesting for you is googles GWT (Google Web Toolkit). The programming model is very close to Swing. GWT is used to program (preferred in Eclipse, using the GWT Plugin) in Java, having Server side Code in Java, running on a Web Container (e.g. Tomcat) and having client side code programmed in Java, but cross compiled into Java Script running in a Web Browser (AJAX style).
Beyond Java ;D).
Just learn enough Java to be able to compile simple programs (well, 2 days or something
Then learn Groovy. Groovy is a "dynamic" language, that compiles to Java Byte Code and integrates into the Java Platform. Groovy is mainly used for scripting, but it is a serious platform for development as well. Groovy is also used to develop Domain Specific Languages(DSLs), one thing that will become a future market.
Dig into Ant, a "XML based scripting language", mainly used for build files. But don't be tempted to use it for to much. If you find Ant useful, and if you got a grip on Groovy, then use gant.
Groovy uses a concept of builders which is used e.g. to program Swing UIs, to "build up" Ant-Scripts (gant), to "invent" DSLs (for configuration of your Java/Groovy programs) which can be adapte
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
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).
I never really liked NetBeans, I tried it with ver 5 and decided to stick with IntelliJ and Eclipse.
This is one of the examples that us Java foreigners want to learn. Here are some Java buzzwords that you see in jobs asking for devs:
Netbeans
J2EE
Eclipse
Jakarta
Struts
MVC (which isn't a java-only concept, but then again, newbies don't know)
Websphere
I really wish there would be an "intro to java technologies" book that explained newbies like me, with diagrams and colored figures what the heck is each buzzword and what it means, but I don't just mean a dictionary paragraph.
See, anyone could spend a couple of days googling each buzzword, but then there's the problem that one could learn TOO MUCH and get TOO DEEP trying to undersand ONE OF MANY things in java. And then you can find out that what you learned won't get you anywhere because suddenly the technology you learned became obsolete.
Around 8 years ago, I tried to learn java and JSP, and then found out that everyone switched to J2EE. Then I tried to learn J2EE and completely got lost. Then I tried to look at some J2EE courses sponsored by IBM but they costed at least $600. Then I said "fuck it, I'll stick to PHP. I can install an Apache webserver in one click on my Windows compy and I'll learn PHP on my own - for free". Try that with Java. See, the problem isn't the language itself, but the bunch of stuff built on Java, the frameworks built on java, AND the popular apps built upon some of the java frameworks, which is actually what the companies expect you to know.
What we need is a broadth-first approach of learning, starting with the language (one chapter for the java basics and examples should be enough). I mean explaining only the basics of each, comparing different technologies, telling you where they fit in a web app, and which ones are recommended or not, and why.
try to learn hibernate, which will be the last time you think about databases.
LOL there is no other API where you think more about databases than Hibernate. The simplicity is deceptive.
As a Java developer for nigh on ten years now, and someone who painfully learned how to program database connections by hand, then use orms like Hibernate, I might caution against Struts (though the rest of your order-of-learning is excellent). Struts was definitely in my path of learning, but I am not sure what it offers these days that isn't done more comprehensively - and to my mind, more cleanly - with Spring.
Of course, there are a lot of legacy systems these days built on Struts - for good reason. So if you're looking to work on older code, it's not a bad thing. But if you're planning a career with stuff that is from scratch, I think that Spring forces one to code in a better manner than nearly any other framework out there.
It may be, of course, that I'm just in love with inversion of control - which I think is one of those things that, if you understand it, gives you a much better command of abstracted design.
One other thing I think is pretty cool is JavaBLACKbelt, which has a pretty good, community developed set of quizzes that are useful for gauging your own command of the language.
[Ego]out
I completely agree. As many bad client side java and tomcat projects as I have inherited I would looks for something else. Bad or no error messages (does it really take 50 lines to say which class failed). Can be slow if run interpreted so it can almost be multi-platform. I just don't see the appeal of java. Find something else that one of best in the business uses (like Google uses Python)
Considering that Java has been (probably) the most used language for a while, you get a lot of crap. So, here's my "crap filter" list of what you should learn to really hop into the JVM ecosystem.
Books:
1. Effective Java, 2nd edition, by Josh Bloch
This covers most of the twists and turns of the basics that an experienced programmer would need. I wouldn't worry about getting a simpler book.
2. Java Concurrency in Practice
Understanding the JVM model of concurrency is important, and this is the only guide that had a pretty in-depth look into the subject. The Sun documentation absolutely sucks at covering concurrency.
APIs
1. Guice http://code.google.com/p/google-guice/
Dependency injection is the most recent thing that makes Java a very powerful language for building large appications. And Guice is by far the best implementation of DI. (Yeah, you could learn Spring, but I just don't care for it.)
2. Hibernate http://hibernate.org/
I hate Hibernate. But it basically set the standard for EJB3. If you know Hibernate, it's not a very hard road to learn all the other "enterprise" crap.
On the other hand, any substantial server-based solution probably uses a ORM solution like Hibernate.
3. Apache's Commons http://commons.apache.org/ and Jakarta http://jakarta.apache.org/
There is a ton of projects under the Jakarta umbrella these days. The first one to try out is the commons-lang libraries, which provide very easy to use toString. equals, and hashCode implementations that are 'good enough' 99% of the time. Why do you need those? Read Effective Java. :)
Interesting stuff:
1. Hadoop http://hadoop.apache.org/
Hadoop is an open-source implementation of Google's MapReduce idea.
2. Scala http://scala-lang.org/
Scala is my favorite "non-Java" JVM language by far. For me, the scala interpreter is how I learn APIs. In fact, most of my new code is in Scala, not Java.
3. Groovy, JRuby
Just some more used non-Java JVM languages. I've used JRuby a bit, but have moved on to Scala. It's still a significant project, however.
4. Web application frameworks: Wicket http://wicket.apache.org/ + Databinder http://databinder.net/
Wicket is the simplest page-based Web framework I've ever used. I just find it easier to navigate than Rails. If you really want an ORM-based solution, go for the Databinder extensions. Databinder will get you coding in a couple of minutes.
5. Restlet http://restlet.org/
We have several different clusters, and a bunch of machines that need to transfer data around. I learned how to set up a restlet server that was integrated with Guice in a couple of hours, and now, have a very easy means to script together many different servers.
Try Wikipedia, it has articles on each of the things you list and lots more. Unlike projects' individual sites, it tends to start by telling you what each actually does. Most of them are hardly earth-shattering, it's just that Java developers seem to like assigning a silly acronym or coffee related name to every equivalent to a CPAN module.
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.
There is a difference between computer science and writing business logic.
Yes you are wrong.
.Net and nothing else, you know. It's not that it can't be done in e.g. Perl, but its so much *easier* in Java.
When we talk about Java we mean JavaEE, not standard application programming. Sure Java is no better than most other languages when it comes to building small to medium desktop apps/clients. But once you go past a certain point in size/complexity Java is your friend. Perl and php are not. JavaEE is meant to be used for large (really large), complex, distributed, high-availability business systems. And it's damn good at it.
There is a reason most systems of this type are built in either Java or
jeez... Who modded you insightful? The Java platform today is an enormous pile of layers, frameworks, and standards. It's not just Java/EJB. Learning the entire JavaEE ecosystem is more than most people are capable of. And yes, I have worked with both C++ and the JavaEE stack.
Compared to some other languages, Java is pretty limited in what abstractions can be practically implemented,
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.
That's a big advantage it has going for it, so many people have used it now there are a lot of resources and options for wherever you might want to go with it. Even if you decide to use other languages learning Java just to understand how to use it as a base is really worthwhile, and because of the platform neutral architecture and excellent community standards body (JCP) as a platform it will continue to thrive.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
> but it is important to not let it be the only tool in your belt
Well, that's the real problem. The world of Java is so complex that by the time you've invested the 3-4 years learning how to be a corporate java developer, your other skills will have atrophied to the point where you can barely get a job using them...
I work at a fortune 500 and we have java developers who don't understand the difference between an apache mod and cgi, who can't understand that python is interpreted and that the amazing functionality of mediawiki is programmed in php.
In order for you to become a specialist in Enterprise Java, you are going to have to forego any other specialization. If that's what you want to do, fine. But that makes you much more vulnerable to economic instability. Better to make less money per hour but be guaranteed work for the foreseeable future.
What do you think would happen to java if Sun Microsystems went bankrupt? Who can tell what the future holds? Don't put all your eggs in one basket.
"Piter, too, is dead."
1) Slect you favorite type of beans.
2) Grind beans to the desired coarseness.
3) For a common electric coffee maker, wash coffee pot thoroughly, insert clean filter into brewing area, and replace pot under the drip.
4) Add the desired quantity of ground beans to filter.
5) Add water to reservoir.
6) Turn coffe maker to "ON".
Knowing Google's lust for data collection, the Soviet Union is still alive and well inside the psyche of Sergey Brin....
Portable? Clean? Try mobile development some time. Maintaining a large handful of project files because of different screen sizes is a joy, not to mention interacting with different phone providers' frameworks, plus a buttload of special-case code strewn about to deal with the inconsistencies and quirks (including missing and misbehaving features) of each device's particular implementation of the VM. Languages like C have a preprocessor that allows such variables to be put in #ifdef blocks... no such luck with Java. All that, and the program will look like absolute crap on anything but a phone.
Portability is a nice word that Java people like to throw around, but in my experience, the program has to be set up separately for just about every target. You can do that just as well with C (Brew, as far as phones are concerned), and without a handful of different project files to include or not include target-specific files.
Not to mention that, on comparable phones, Java performace is abysmal compared to Brew. Not fast.
Java has its place, where its benefits can be well exploited. That place is, as far as I've seen, largely restricted to situations where the systems it'll be running on are not terribly diverse, e.g. Linux servers, where portability really isn't that much of a concern.
-- I prefer the term "karma escort."
Wow, what a load of advice to launch into frameworks, buy books, get certification etc.
Start with what's authoritative, basic, and free. That's the Sun Java Standard Edition tutorials
http://java.sun.com/docs/books/tutorial/
Or download from:
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=tutorial-2008_03_14-oth-JPR@CDS-CDS_Developer
The web and persistence frameworks are important. They're over-engineered and I hate them but if you don't know them you won't get work. (Without them it'd be very much like trying to become a game developer knowing only ANSI standard C and no frameworks). They're what you need to learn second. Possibly on a smaller project where you're not the lead. However learn to crawl before walking or flying.
These posts express my own personal views, not those of my employer