tags:

views:

433

answers:

7

I'm almost finished with the book "Head First Java". The reason I'm studying this is I'm hoping to get a job developing with JavaEE someday. Now I'm thinking, should I go ahead and study EE (moving on to Head First Servlets and JSP) or should I spend more time with SE? Would it help? I'll go on and say directly that I want to learn EE in the quickest yet the most optimum time needed (a balanced ind of way). Any advice?

Thanks in advance!

+2  A: 

Knowledge is never a bad thing, so more SE is recommended.

But there's nothing wrong with getting your feet wet with EE now. Start with servlets, JSPs, and JDBC. You can do lots of useful things with just these, and it's fair to call it EE.

If you do write JSPs, just make sure that you do it the right way - using JSTL, the JSP Standard Tag Library. No scriptlet code.

duffymo
Thanks! That's where I want to start. Ok, I'll take note of that.
ajushi
I've liked JSTL. : -S For me scriplets are just fine as long as they are used in a healthy way, that's what I do. I remember there was something in between since JSP2.0.. it has something like JSP-EL or something like that. I never got too deep in to that though.
OscarRyz
A: 

When we started J2EE none of us had ever coded anything but SE before either; I'd go for it.

Charlie Martin
Thanks Charlie! If you don't mind me asking, what SE programs have you done before moving to J2EE?
ajushi
If you don't mind me jumping in, I used JavaCC to write a COM/CORBA IDL generator. Java EE hadn't even been invented then. Pure SE, with a command line UI and file I/O.
duffymo
Quite a lot of them actually. I was one of the early Java architects at IBM and Sun, before J2EE came out.
Charlie Martin
+9  A: 

To me its fine to go with JavaEE, as you already did adequate of SE. And certainly hanging out in programming forums will teach you now and then things which are still hidden from you. Believe me there would be many. Anyhow, I am having few advices for you, which will help you down the road.

  • Its better to have a very good command on Java Collection API
  • Another important is to know Java Threading Mechanism and related classes
  • Effective Java is a must read for any Java developer. So go and read it
  • Don't jump into any framework prior practicing plain Servlet and JSP, adequately
  • To know major design patterns is a must
Adeel Ansari
Wow thanks! What forums would you suggest? Also in what order should I follow the advice you gave me?
ajushi
I agree with all except for the threading advice. It's an advanced topic, as Brian Goetz's "Concurrency in Java" will attest. A servlet/JSP engine handles one thread per request for you, so all you really have to know is how to make sure your classes are thread-safe.
duffymo
Thats what I mean, duffymo. Thats why I said that its important to know the mechanism and related classes. Precisely, for the reason you mentioned.
Adeel Ansari
Stackoverflow is good. JavaRanch Forum, is another good in this case, because that forum is specific to Java. You must try it, http://saloon.javaranch.com
Adeel Ansari
Moreover, Java Thread is a separate section in SCJP certification. Which is purely SE, and used to be the first certification in the track, prior to SCJA. So, I think knowing it on the surface, if not deeper, is important.
Adeel Ansari
@Adeel - thanks for the clarification. We agree.
duffymo
Couldn't agree more. Just, in thread matter, you have to know the "mechanism" but don't put too much effort in master it ( there are more important things at your level ) JavaRanch excellent ( at least some years ago ) . Also, until you master simple JSP you shouldn't try anything else. Nice answer
OscarRyz
Oscar, FYI, they are shifting the forum on Java, in a few days. So, now the forum itself will speak in Java, instead of old CGI. Thanks for the complement.
Adeel Ansari
Effective Java is an excellent suggestions!
david
+1  A: 

I would agree with the advice given that it's OK to jump into J2EE from learning core Java. That said, I would continuously hone your core Java skills.

When I'm looking for J2EE developers that I want on my team, I look for folks that know how to write simple maintainable code by exploiting the JDK to its fullest extent. You should know the collections API like the back of your hand. You should definitely practice the advice given in Effective Java. Eventually you will have to know some of the subtleties of threading (step 1: keep your objects immutable; step 2: see step 1).

BTW, if you're in the New York area, leave a comment and maybe we can contact each other offline.

Clarification: every interesting Java application will require business logic and the use of plain old Java objects (POJOs). Trivially, that includes J2EE applications, whether it is a web app, a framework for use by web apps, or even a J2EE app server itself. It's usually an eye opening experience for a Java developer once they've developed a "toy" app server. J2EE becomes a lot easier after that.

By my lights, a true J2EE "Jedi master" knows how to take apart an app server to its basic core Java components. E.g. EJBs are proxies that wrap business POJOs by adding the capability for remote procedure calls with the RMI networking protocol as well as a transactional manager. If you understand RPCs, RMI and transactions, your chances of understanding EJBs rapidly goes up.

Or to put it in Joel Spolsky talk, J2EE is a leaky abstraction built on top of the J2SE networking API.

Alan
Alan, do you mean JDK as in J2SE or also the J2EE? I like the fact that you're looking for good core Java people rather than people who are J2EE experts with possibly bad SE foundations. J2EE is, after all, just a bunch of loosely tied APIs.
Uri
By JDK I mean the plain old J2SE when you download Java from Sun before you even attempt to add an application server. Yeah, I'm amazed that people attempt to be J2EE experts with shaky SE foundations.
Alan
Hey, I don't live in NY area but I would like to :P
OscarRyz
Thanks Alan. What do you mean specifically by continously honing my core Java skills while I do webapps with J2EE? How do I master the collections API? Also should I read Effective Java immediately? Your answer is very informative as it gives me an idea what the employers are looking for. Thanks!
ajushi
What kind of work do you guys do? (feel free to PM me). Like I said, I like your approach.
Uri
+1  A: 

A good developer can always easily master APIs. A bad developer can easily misuse APIs. Hence, become a good developer first.

I always dislike the term "moving to J2EE" since J2EE is just a collection of loosely related technologies.

Someone can build build servlets and JSPs but not know anything abougt EJBs, or vice versa. Someone can use Hibernate for persistence or JMS for sending messages without ever considering it J2EE (that is my case, for example).

APIs come and go, but it's most important to become a solid developer in core Java. If you want, read enough tutorials to understand the main concepts, maybe even play around a little in your spare time. Understand important concepts like threading, databases, etc.

For example, understand JDBC before you approach hibernate.

Uri
Uri, it's also revealing to start reading the source code of a J2EE implementation, a respected framework like Hibernate or even the J2SE JDK itself. That's graduation to Java guru-dom.
Alan
Reading source code is always a good idea ! :)
Uri
Hi Uri, do you have any tips or resources on mastering the API and avoiding it's misuse?
ajushi
My research is focused on API usability and I've developed tools related to that (see my profile). The best tip I can give you is to learn to reads JavaDocs by developing the skills to identify "directives", things you really need to react to, among all the detailed specs. And always watch for them.
Uri
+1  A: 

You're ready to go for JavaEE.

When you use it you'll be using JavaSE for JavaEE is JavaSE + new libs.

To me the best ( almost only ) way to learn a new technology is actually working on it. I tried to read and learn about JSP ( back in 2000 ) or any new framework, but I just get bored.

I never get Hibernate or EJB's until I actually got some project in which I could apply it.

I've read a lot of spring and probably I could pass an interview but since I've never used it in a project I don't consider my self that I know it ( Although I know how it works, the config files and even the new changes ).

So my recommendation is, if you can afford it, get a job no matter if the pay is bad, put your hands on any JSP project as soon as you can. The learning will be much better than any Book, Boot camp, Course or anything you can get.

Probably this only works for me. :)

OscarRyz
Actually it's true for me as well. I'd like to learn by doing.
ajushi
A: 

I started working on JavaEE without not enough knowledge of basic Java and I totally regret it!

JavaEE is not just an additional set of APIs, it encompasses so many concepts from EAI, SOA and DBs. Trying to master those concepts, learn the APIs and still getting to know the foundation - Java, was a real challenge.

JavaEE sounds exciting and it is, but if you are someone who wants to produce clean, easy to test and correct code, my advice: start with Java SE.

david