Java Forum / General / December 2007
Complete noob needs guidance on path to learning.
Google Man - 05 Dec 2007 07:27 GMT Hi,
I am a C++ programmer trying to make the jump to java world. I am not even able to make a head start on where to begin. I mean, there is Java, J2EE, JavaSDK, JavaBeans, etc etc. Then there seem to be libraries like AWT and SWING. Is AWT obsolete? Or can I skip it? Do I need to learn both AWT or just SWING? Can I learn J2EE without first learning Java? As you can see I am totally confused.
I could start picking up any of the thousands of books out there but I am afraid I will end up wasting valuable time learnings things that I probably don't need to. I don't want to go through reading a whole book only to find out that everything I just spent the last 2 months on has been superceded waaay back already by some other version.
Can anyone help me in this regards. Would Bruce Eckel's Thinking in Java be a good start?
regards. GM.
mnml - 05 Dec 2007 08:10 GMT > Hi, > [quoted text clipped - 16 lines] > regards. > GM. O'Reilly, "Learning Java" is quite good to start in my opinion http://www.oreilly.com/catalog/learnjava/ I don't know if you need to bother about all this things at the begining, I would advise you to install sun-java6-jre & sun-java6-jdk and try to play with it. javac to compile, java classname to run it.
GArlington - 05 Dec 2007 12:18 GMT > Hi, > [quoted text clipped - 16 lines] > regards. > GM. Try this too, I just stumbled on it while searching for something else - seems short and good intro. http://www.learn-programming.za.net/programming_java_learn01.html
rossum - 05 Dec 2007 13:15 GMT >Hi, > [quoted text clipped - 16 lines] >regards. >GM. Sun's own Java tutorials are a useful start: http://java.sun.com/docs/books/tutorial/index.html
rossum
Juha Laiho - 06 Dec 2007 11:22 GMT rossum <rossum48@coldmail.com> said:
>>I am a C++ programmer trying to make the jump to java world. I am not >>even able to make a head start on where to begin. I mean, there is >>Java, J2EE, JavaSDK, JavaBeans, etc etc. Then there seem to be >>libraries like AWT and SWING. Is AWT obsolete? Or can I skip it? Do >>I need to learn both AWT or just SWING? Can I learn J2EE without >>first learning Java? As you can see I am totally confused.
>Sun's own Java tutorials are a useful start: >http://java.sun.com/docs/books/tutorial/index.html Another vote for this.
As to what to do; start with the language itself (Java); it's anyway the basis for anything else. The Java Tutorial referenced above is a good help in this. The Tutorial also has a chapter on getting your environment set up so that you won't be trapped with the various path issues.
The Tutorial also gives a starter on Swing (as I recall, with some AWT on the side - as Swing is partly wrapping the underlying AWT).
SDK is what you need to get anything compiled (Java distributions come in two varieties; the runtime distribution for those who just want to run Java applications, and the SDK distribution for those who also want to compile Java source code).
JavaBeans is "just" a programming pattern, useful in some situations.
J2EE is what you use to build server-based applications (nowadays mostly to be used through a browser, however there are possibilities for non-browser client technologies as well). J2EE also provides a component model for building software.
What you need to learn depends on what you want to do; f.ex. if you're planning to build stand-alone desktop applications, you won't need J2EE, but will need Swing. On the other hand, if you're planning to build a web application, you'll need at least the web part of J2EE (Servlets, JSP, and the associated things), but will not need Swing.
 Signature Wolf a.k.a. Juha Laiho Espoo, Finland (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++ "...cancel my subscription to the resurrection!" (Jim Morrison)
Stefan Ram - 05 Dec 2007 13:41 GMT >Can anyone help me in this regards. Java is the most popular language of this decade and so there are very many books and tutorials on learning it.
Don't assuma that you can learn it all in a week or so, take some time to do the exercises as well.
Some resources can be found in
http://www.purl.org/stefan_ram/pub/java_resources_en
My review of a single sentence, reportedly from »Thinking in Java«, follows.
~~
Recently someone claimed that "Thinking in Java 3", 8 contained this sentence:
|If you're defining an anonymous inner class and want to use an |object that's defined outside the anonymous inner class, the |compiler requires that the argument reference be final, like |the argument to dest(). Here, Eckel writes:
»object that's defined«.
Objects, however, are not "defined", they are /created/ at run-time. Names of reference variables are being /declared/ in the source text, not "defined". http://java.sun.com/docs/books/jls/third_edition/html/statements.html#5920
Then, he continues to write
»argument reference be final«.
This might intend to say that a reference parameter was declared with "final". "final" is not an attribute of a, /reference/, but of a variable.
However, this is not about /arguments/ (the reference arguments do not have to be declared "final" here), but about /parameters/. The distinction between these to Java terms seems to be unknown to Eckel.
parameter:
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.8.7
arguments:
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12
He also writes:
»the compiler requires«.
It might be the case that the compiler of Mr Eckel indeed requires this, but he should teach a language instead of an implementation, so it might be preferable to write "the language specification requires«.
Also, anonymous inner classes are not being /defined/ in Java, as Eckel writes at the beginning of the quotation, but they are being /declared/.
Moreover, "anonymous" is an unnecessary restriction, because the assertion is valid for /all/ inner classes. Someone learning by this sentence thus needs to learn anew at another time that this is also valid for non-anonymous inner classes, or he might believe erroneously for an indetermined amount of time, that it is only valid for anonymous inner classes.
Is there a way to improve the sentence? One attempt by me:
A parameter to be used within an inner class of its method needs to be declared »final«.
Even the Java Language Specification itself is easier to read than Eckel (and of course, much more correct):
Any local variable, formal method parameter or exception handler parameter used but not declared in an inner class must be declared final.
http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
All the reported faults have been found by me within a single sentence chosen at random (I did not read the book, but discovered the sentence in another posting, claiming to quote this sentence from "Thinking in Java".) If one extrapolates the error quotient to the whole TIJ, it gives a horrid impression.
Some books might sell chiefly because the buyer wants to express agreement with their title. When one is learning a foreign language one does not want to think everything in English first and then painfully translate it word-by-word. So one might choose "Thinking in Java" instead of a garden-variety "Introduction to Java", because one longs for the promise given by its title, not suspecting that the author Eckel himself might be far from "thinking in Java".
Mark Space - 05 Dec 2007 16:18 GMT > I am a C++ programmer trying to make the jump to java world. I am not > even able to make a head start on where to begin. I mean, there is > Java, J2EE, JavaSDK, JavaBeans, etc etc. Then there seem to be Start with Java SE (Standard Edition). For compiling though, you'll need the JavaSDK (Software Development Kit) version of SE. J2EE also comes in two flavors, stay away from it for now.
> libraries like AWT and SWING. Is AWT obsolete? Or can I skip it? Do AWT is not exactly obsolete. Swing uses it internally, but you shouldn't have to worry about AWT to begin. Use NetBeans IDE (Sun's own tutorials tell you to) so you can use the GUI layout tool and avoid hand coding. You should read the bits in the tutorial about hand coding but again to get started you don't want to get into it.
After you get more familiar with the over all API, hand coding things will get easier and be more realistic for learning and actual projects.
> I need to learn both AWT or just SWING? Can I learn J2EE without > first learning Java? As you can see I am totally confused. Nope, gotta start with Java first. J2EE is a bunch of libraries. Java is the core language. By analogy: learn C++ first, then you can understand the STL.
> I could start picking up any of the thousands of books out there but I > am afraid I will end up wasting valuable time learnings things that I > probably don't need to. I don't want to go through reading a whole I'll second O'Reilly's Learning Java. The tutorials on the web from sun are also good, but I found them hard to actually get started on. Sun's tutorials worked better as a kind of live reference in between Learn Java and the JavaDocs.
http://java.sun.com/docs/books/tutorial/ http://java.sun.com/javase/6/docs/api/
> book only to find out that everything I just spent the last 2 months > on has been superceded waaay back already by some other version. > > Can anyone help me in this regards. Would Bruce Eckel's Thinking in > Java be a good start? I don't care for Mr. Eckel's books personally.
> regards. > GM. Lew - 05 Dec 2007 19:06 GMT Google Man wrote:
>> Would Bruce Eckel's Thinking in Java be a good start?
> I don't care for Mr. Eckel's books personally. I thought TIJ was great when I was first trying to master Java, back in 1.2 days, but his way of thinking isn't really consonant with how most of the Java gurus are thinking these days. As I learned more from other sources I learned better ways of thinking in Java. OTOH, there are darned few books that even try to get an newcomer thinking in Java in any manner.
 Signature Lew
Mark Space - 05 Dec 2007 19:58 GMT > Google Man wrote: >>> Would Bruce Eckel's Thinking in Java be a good start? [quoted text clipped - 7 lines] > darned few books that even try to get an newcomer thinking in Java in > any manner. Ten years ago that TIJ have been reasonable, but as you say the state of the art has advanced quite a bit.
What made OOD/P click for me in Java was just reading and studying a lot of existing code that was correctly designed. API source code and JavaDoc, output from the Matisse GUI builder (note: Sun's Swing tutorials are pretty terrible code examples), Apress's Expert Spring MVC and Web Flow (which contains a pretty good explanation of Inversion of Control), books on Design Patterns, etc.
It's better to jump in and start learn the real stuff. The epiphany will come faster that way.
Ramon F Herrera - 05 Dec 2007 21:52 GMT > Hi, > > I am a C++ programmer trying to make the jump to java world. I am not > even able to make a head start on where to begin. I mean, there is > Java, J2EE, JavaSDK, JavaBeans, etc etc. Don't let that alphabet soup to confuse you. All you need is Java Standard Edition, you can worry about things like Enterprise Edition later (if at all!). You may spend years being a competent and productive Java developer (I have) without knowing the first thing about JavaBeans or even J2EE. Some of the confusing numnbers (Java 2, or the recent Java 6) are marketing gizmos.
> Then there seem to be > libraries like AWT and SWING. Is AWT obsolete? Or can I skip it? Do > I need to learn both AWT or just SWING? Swing is built on top of AWT. It supersedes and improves on it.
The real contenders are Swing (from Java's biological father, Sun) and SWT from its adoptive father, IBM (which is to say, from Eclipse).
> Can I learn J2EE without > first learning Java? As you can see I am totally confused. Absolutely not. You have to walk first. Everything that can be done with the EE can be done without it (with more manual work). EE is good for sites that have a LOT of traffic and/or developers.
> I could start picking up any of the thousands of books out there but I > am afraid I will end up wasting valuable time learnings things that I > probably don't need to. I don't want to go through reading a whole > book only to find out that everything I just spent the last 2 months > on has been superceded waaay back already by some other version. You must be used to Microsoft's way of destroying the past and forcing users and developers to endless upgrades. Java builds upon the past. Old Java programs compile and run in new versions, and vice versa.
> Can anyone help me in this regards. Would Bruce Eckel's Thinking in > Java be a good start? It is a perfect start, if you are considering free stuff.
Oh, you know about the official Java Tutorial, don't you?
If you come from the M$ camp, other than telling you: "poor guy, what did you do in a previous life to deserve that!?" :-) I can assure you that the developers in this sode of the street are more intelligent, insightful and helpful not to mention fun and good looking. Oh, I forgot modest.
-Ramon
Mark Space - 06 Dec 2007 06:30 GMT > Don't let that alphabet soup to confuse you. All you need is Java > Standard Edition, you can worry about things like Enterprise Edition > later (if at all!). You may spend years being a competent and The rest of the advice here is quite good, but just to be clear, the Java SE (Standard Edition) is just the runtime. For development, you need the JDK. I'm pretty sure the JDK comes with a standard runtime plus other goodies, so you're getting everything. There aren't two versions of the runtime, one for users and one for developers, it's all the same.
Well, I think there's 32 bit and 64 bit versions....
Google Man - 06 Dec 2007 17:50 GMT > The rest of the advice here is quite good, but just to be clear, the > Java SE (Standard Edition) is just the runtime. For development, you > need the JDK. Thanks for all the responses. I have downloaded jdk-6u2-windows-i586- p.exe. I assume that is the correct version for windows XP platform. I have also downloaded the Netbeans IDE. Now time to start the installation and get with the tutorials at sun.com and others. Considerng that TIJ seems to be controversial, I am ditching it (yeah .. I was going with it because it was in a free ebook form). Thanks again to all the queries.
Lew - 07 Dec 2007 03:13 GMT > Thanks for all the responses. I have downloaded jdk-6u2-windows-i586- > p.exe. I assume that is the correct version for windows XP platform. [quoted text clipped - 3 lines] > (yeah .. I was going with it because it was in a free ebook form). > Thanks again to all the queries. You want Java 6u3, for the security fix.
 Signature Lew
Arne Vajhøj - 10 Dec 2007 01:38 GMT >> Can I learn J2EE without >> first learning Java? As you can see I am totally confused. > > Absolutely not. You have to walk first. Everything that can be done > with the EE can be done without it (with more manual work). EE is good > for sites that have a LOT of traffic and/or developers. If site==website then I would say that a site requires EE and SE no matter the traffic while other types of apps can do with just SE.
Arne
Roedy Green - 06 Dec 2007 09:16 GMT On Tue, 4 Dec 2007 23:27:08 -0800 (PST), Google Man <googleman04@yahoo.com> wrote, quoted or indirectly quoted someone who said :
>I am a C++ programmer trying to make the jump to java world. I am not >even able to make a head start on where to begin. I mean, there is >Java, J2EE, JavaSDK, JavaBeans, etc etc. Then there seem to be >libraries like AWT and SWING. Is AWT obsolete? Or can I skip it? Do >I need to learn both AWT or just SWING? Can I learn J2EE without >first learning Java? As you can see I am totally confused. see http://mindprod.com/jgloss/gettingstarted.html learn AWT, then Swing.
 Signature Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Mark Space - 06 Dec 2007 17:15 GMT > learn AWT, then Swing. Unfortunately, I do disagree with this. Learn Swing first. It's more useful generally and will get 90% of what you need done. AWT is now more just for low level graphics.
If you're writing graphic primitives directly to an image buffer or manipulating images whole, you'll need to know some AWT. If you never need graphic primitives, you might skip AWT entirely.
Roedy Green - 12 Dec 2007 16:53 GMT On Thu, 06 Dec 2007 17:15:38 GMT, Mark Space <markspace@sbc.global.net> wrote, quoted or indirectly quoted someone who said :
>Unfortunately, I do disagree with this. Learn Swing first. It's more >useful generally and will get 90% of what you need done. AWT is now >more just for low level graphics. The problem with learning Swing first is it has so many methods, it is hard to sort out what you MUST use to get the job done. Most of the methods are for fine tuning the appearance or UI.
I have attempted to impose some order with a set of example Swing apps, one for each component. I use only the methods I consider key. That way you can get started without being overwhelmed. It is usually easier to understand commented example code than the Javadoc.
Swing also has newbie-baffling complexities like invokeLater and getContext.
I think AWT is great training wheels. Further, that experience will be useful in dealing with older apps or converting them to Swing, a typical entry level task.
see http://mindprod.com/jgloss/swing.html http://mindprod.com/jgloss/awt.html
To settle the question we need some volunteers. One team learns AWT first. The other Swing first, and see who progresses fastest and listen to their subjective reports about how painful the process was.
 Signature Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Mark Space - 12 Dec 2007 21:46 GMT > To settle the question we need some volunteers. One team learns AWT > first. The other Swing first, and see who progresses fastest and > listen to their subjective reports about how painful the process was. I'd like to see someone take a path like the following for Swing:
Read the Swing Tutorial on Sun's site. Read and do the examples for Swing on javapassion.com Download NetBeans and read and do the tutorials on Matisse.
Now, can they make a reasonable Swing app? And how painful is it?
Note: requires a decent knowledge of Java first. For me, sorting out "just Java" from the Swing API was the biggest hurdle when I was learning.
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|