Click to See Complete Forum and Search --> : Adrift In Java


nko
01-26-2006, 03:55 PM
Is it just me, or is Java *really* confusing? I've written a couple little web applets in Java, used desktop / applet / server Java programs before, and read all about JavaBeans, applets, servlets, SDKs, JREs, J2EE, Java 5, Java 1.4 (?), dozens of IDEs and VMs, and a slew of other things. I'm currently taking a class that uses BlueJ to teach Java, and while I'm learning OOP in this class readily (having learned it years ago in other languages), I honestly have no idea what it's using to... do... what it does.

I've google'd, but my search results bear no fruit. Can someone please point me in the direction of an explanation of all this Java stuff?

bwkaz
01-26-2006, 08:12 PM
It's not just you, but it might be just you and me. ;)

I find the enormous number of "protocols" for doing things to be needlessly long and complicated. (For instance: Event handling via an interface. Sure, you can define an anonymous inner class that implements the interface, or you can use one of the adapters, but what's the point? Why not just give it a single callback function the way Python, Lisp, ECMAscript/W3 DOM, and probably Perl let you do?)

However, a lot of people seem to like it. I really don't understand why, although it may have something to do with Paul Graham's "Blub Paradox". (When all you know is a hypothetical Blub language, anything less powerful than Blub is obviously less powerful, but anything more powerful than Blub doesn't look any more powerful to you. It looks like just "Blub plus all this other hairy stuff thrown in for who-knows-what reason", because you think in Blub.) But some of these people claim to know languages that I do think are more powerful than Java, and yet they prefer Java.

But hey, whatever.

As far as JavaBeans, J2EE, and some of the other things you said, I have no idea. I only ever had to do Java for college, and even then only for a year or so, so I never really got into any of the more complicated stuff.

But I do know that Sun started playing with the version numbering recently (kinda like Microsoft did with the DirectX version numbers several years ago). Sun used to distribute Java 1.0, 1.1, 1.2, 1.3, and 1.4, but after 1.4 they jumped to 5.0. (Microsoft and DX: They had 1.0, 2.0, 3.0, then something they called "DX 5", but whose actual version was 4.5. "DX 6" was 4.6, "DX 7" was 4.7, "DX 8" was 4.8, and "DX9" is 4.9. DirectX's actual version number still hasn't gotten to 5.)

truls
01-27-2006, 05:24 AM
The confusing thing is that people are using the word Java about both the language and the libraries.

Java the language is pretty simple to use, and it's probably what you have learned. It's all about OOP, inner classes, interfaces, and other language syntax rules.

Java the library is the hundreds, if not thousands, of libraries that contain already created classes that you can use in your programs. If you visit the Java Developer Pages (http://java.sun.com/) you can find loads of information about java. There are some online books here. (http://java.sun.com/docs/books/tutorial/index.html)

J2EE is a framework. You can find loads of information about this by clicking the J2EE link at the Developer pages.

Hope this is enough to get you started, and if there is anything you are wondering about don't hesitate to ask.

voidinit
01-31-2006, 02:59 AM
Java itself isn't confusing. Its all the frameworks/libraries and such that are confusing.
The AWT/Event handling model is simple on paper. It works just like throwing exceptions. An event is generated and then falls up until a registered listener picks it up. However, the confusing part is that there are tons of ways to implement the EventListeners and even more EventListener types to choose from, each with their own methods, fields.......etc. Javadoc style API documentation makes this sort of stuff much easier to handle once you have basics and know where to look and what to look for.

Another really, really confusing thing is "frameworks". Like J2EE for example is actually a metric ton of smaller fraimworks (JAX-RPC, SAX, jsp, ServletAPIs, JNDI, JAAS, EJB, etc. etc. etc.)

The most confusing part about all this is the documentation and tutorials available. Say you want to learn EJB3. The EJB3 tutorial automatically assumes you know everything there is to know about JNDI and Servlets. The servlet tutorial will automatically assume you know everything about EJB and JNDI. It goes on and on.

The beauty is: Once you know J2EE and what it can do, it's well worth it. Certaintly not for every job, but complex webapps accessing multiple datasources and such. Its a good platform to know.

dr_te_z
01-31-2006, 03:11 AM
Compared to a mainframe (MVS, VTAM, CICS, IMS/DB, IMS/DC) it is simple....
Consider java as a system, not just a language, and specialize. You can't know it all.

JohnT
01-31-2006, 04:08 AM
I've google'd, but my search results bear no fruit. Can someone please point me in the direction of an explanation of all this Java stuff?
Lets eliminate what you do know first....try this link to see if it offers you any insight ..... HERE (http://java.sun.com/docs/books/tutorial/index.html)

bwkaz
01-31-2006, 07:35 PM
The beauty is: Once you know J2EE and what it can do, it's well worth it. Certaintly not for every job, but complex webapps accessing multiple datasources and such. See, that's exactly the kind of thing I'd use Python (or Lisp, depending on the datasources themselves) for. ;)