views:

407

answers:

6

I have chosen to go the JEE route for a career path but I have been having a hard time determining which core technologies that I need to be most familiar with. I'm at the point I can write web apps without a problem with JSP's and regular servlets using JDBC or some basic Hibernate stuff (I know, HTML, CSS and have used MVC extensively on a number of different platforms). What I'm trying to find out is if there is some standard as far as J2EE technologies go.

When I look at most of the Job listings, occasionally you will see someone mention Struts or Spring but rarely do I see any mention of EJB's. So my question is really, are EJB's basically required by most JEE employers? Or are most of them working with POJO's? Is it a mix?

I have a hard time figuring out if I should put the majority of my time into Struts, Spring/Hibernate, EJB's, etc. And if I do need to master EJB's what version should I learn? 2.1 or 3.0. 3.0 has some obviously better features but I figure a lot of companies probably chose to write their apps in 2.1 just because it was the standard of the time and now migrating would be a big deal.

Any advice on this is greatly appreciated.

+7  A: 

These days it would be more useful to learn Spring/Hibernate than EJB 2/3. I rarely hear of companies using EJB 3 and the only ones using EJB 2 use it because they have existing systems built upon it rather than building new systems. Spring/Hibernate is the way to go as a Java web developer in the near future.

Taylor Leese
I agree wholeheartedly. Spring/Hibernate/Guice for the win.
a paid nerd
Would you say Struts are worth learning?
John Baker
Actually, at my workplace, we just turned in the opposite direction, replacing Spring/Hibernate with EJB3 and SEAM. But I agree that most employers seem prefer Spring.
Nils-Petter Nilsen
No, I'd consider Sruts a legacy framework as well meaning you will only come across it when dealing with existing systems that have been around for a while. Spring MVC and Spring Web Flow would be more useful.
Taylor Leese
Just to be clear, I think EJB3, SEAM, and JSF are worth knowing but Spring/Hibernate is a more popular choice these days.
Taylor Leese
+4  A: 

I'd say it depends. Most business software companies (which work on applicable field, web-based applications that is) do assume that you know how to make Servlets and you don't die of horror when you see JSP:s but the actual bean part seems to be somewhat dead mostly because it's reinventing the wheel.

There's some really good parts in the whole JEE stack, for instance JPA but then again that's actually just Hibernate Annotations which were added through JCP. That's part of the issue with EJB:s in general for me at least, they seem to be made in some ivory tower by people who never have to actually use them.

I do believe that you are better off learning Spring, Hibernate and basics of various popular view frameworks such as Wicket, GWT, Tapestry and even JSF to make yourself more desirable as a job applicant, knowing EJB:s is a niche sort of thing, you may be valuable if there's EJB legacy code but you most likely won't end up doing entirely new things with it in the current Java EE working environment.

Esko
Nice answer — especially the last paragraph is spot-on, in my view.
Jonik
+1  A: 

I would say the one and only "must learn" framework in the Java space is Spring.

No matter if you use Seam, Struts, JSF, EJB, Hibernate or whatever, Spring will more than likely still be part of the equation.

For Web frameworks I would suggest at least one of:

  • Spring MVC;
  • Struts 2;
  • Seam (not my cup of tea but it has its fans);
  • Tapestry or Wicket.

JSF has its fans too but honestly it's been promising to be the next big thing (typically "next version") for 7-8 years now. At some point you just have to accept it's a failed experiment.

JPA is fairly popular and you should learn at least one. My suggest would be Hibernate or Eclipselink. JPA is the persistence layer for the EJB3 specification.

Try to get familiar with at least one application server. My choice would be Glassfish v2 or v3. Tomcat is fine too but it's only a Web container (rather than a full-blown application server).

cletus
What makes you choose Glassfish if I may ask? I could be completely wrong but I get the impression it's looked down upon as not good enough. Most job postings I see are WebSphere, Weblogic or JBoss related
John Baker
You'll find jobs for Struts 1 too. Most of the reasons are legacy. I have a lot of experience with JBoss and I really don't like it (lots of reasons). Websphere/Weblogic are commercial and I would say their use was far more common 5+ years ago (although still popular). I have a lot of respect for Glassfish v2 (certainly more than JBoss).
cletus
Glassfish is relatively new by standards of Java technology adoption in enterprise, so there may be not many big projects that use it - WebSphere, JBoss are well known, proven platforms. After all Glassfish is a fast, memory efficient, full-blown JEE app server. Now adoption may be slowing because it's not clear what Oracle is going to do with it.
macbirdie
Glassfish use a lot of the newest technologies, so you get a chance to work with them in production environments.
Thorbjørn Ravn Andersen
if you learn Seam you will also learn JSF. JBoss is best app server since its free and most popular. its just app server, it doesnt have to do much except run wars/ears.
01
A: 

You do not need EJB all the time, but yes EJB is important in J2EE, and often misused. EJBs are good for the resume though :-), usually more money compared to the J2SE developer.

You need to understand that J2EE is bigger than EJBs and the J2EE developer might not spend most of his time writing EJBs.

JMX, Persistence(not necessarily JPA/Hibernate, JDBC, Servlets, Scheduling, Reporting, Templating, Web Frameworks, AJAX, JCA, HTML, XML, etc. are more than often in the mix.

There are still many companies using EJB 2.1, but many of them are migrating it to 3.0, less configuration, less descriptors, less legacy settings to apply, etc.

As a conclusion, it's important to know EJBs and when to use it, but do not limit yourself to EJBs.

It's good to know Spring, but you might be working with JBoss microcontainer only, Guice, PicoContainer or something else.

Hibernate is more than often used as ORM framework, but you might be hired at a company who only uses Ibatis, Eclipselink or something else.

+1  A: 

I personally think that we will see a lot more call for the enterprise stack (what people refer to when talking about EJBs) after the release of JEE6.

It has made the whole stack a lot simpler to use and has a lot more providers than the Spring Framework. Frankly, it has become simpler to use than Spring too!

I would start with the basics of servlets/JSPs/EJBs/JPA and then work up from there adding Struts/Spring etc..

Brian Silberbauer
A: 

no, spend your time learning ruby and ruby on rails then invent a spin off of the rails framework that everyone uses.

Johhny
lol that is the most bizarre advice ever. I am a Java programmer now with Spring/Hibernate and I am familiar with Ruby on Rails but Java imo is a safe bet where as Rails so far is not. Java jobs outnumber rails like 50:1
John Baker
glad it worked out for you. i am a ruby developer, unemployed and pumping gas. guess you were right and i was wrong. oh well, live and learn.
Johhny