This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hi, I'm newbie J2EE Developer (about 1 year experience). I haven't learn any framework yet, I was using JSP/Servlets and JDBC to create pretty much simple apps. At first I wanted to learn Struts but now I'm not so sure...
What you recommend for me? Which is easier to understand and better in terms of future job searching?
Originally posted by Wojtek Ciechanowski: What you recommend for me? Which is easier to understand and better in terms of future job searching?
You asked some conflicting questions. First, read what follows as being my opinion...your mileage will vary.
If you are future-thinking, I would recommend getting to know JSF. I'm not a huge JSF fan, but I have a gut feeling that it's the "next big thing". I am a big fan of Tapestry and I think it might be worth learning as well.
Does that mean that you shouldn't learn Spring? Let me clear something up that a lot of people don't understand. The largest portion of Spring has nothing to do with the web or web frameworks. It's an IoC/AOP container. Sure, it has it's own MVC sub-framework, but the real benefit of learning Spring is to reap the benefits of IoC and AOP (especially through declarative transactions).
Once you've started using Spring in your business layer, you have many choices for web frameworks. You can use Spring MVC which is very similar to Struts, but a bit more versatile (and with that versatility comes a bit of complexity, but it's really not as complex as most people make it out to be). You can also easily use Struts, WebWork/XWork, JSF, or Tapestry to front your applications. My personal favorite (right now) is Tapestry, but I've also thrown Spring MVC and Struts at the front of several of my applications.
So to sum up...I would strongly recommend that you learn Spring, but keeping in mind that it's more than a web framework. It will benefit you regardless of which web framework you choose. Then, for future-thinking, I'd check into JSF or Tapestry. Then again, for right-now-thinking, there are still a lot of Struts jobs out there, so it might behoove you to get to know Struts (and use Spring in your business layer).
Struts is much more widely used, has been around for longer & there's more books & forums supporting it. Spring is better designed (I gather - I haven't used the web tier of it really) & the official Spring forum is well supported, but theres only really the one (rather than lots for Struts).
If the idea is to improve your job prospects, I'd recommend learning Struts. I've seen many a job ad in the last couple of years asking for Struts, but none asking for Spring. This is in the UK - the situation might have progressed in the States (See other post). For almost any other reason, I'd recommend Spring - its a fantastic framework and very well designed. When you've got competent in Struts (& maybe read up a little on EJB & patterns - try the Head First books), it would be well worth taking a look at Spring to see a different way to do things. My personal feeling is that Spring is a better framework than struts (& EJBs), but wouldn't be impressed by someone in a job interview who couldn't back this up with some experience of the standard alternative. [ February 25, 2005: Message edited by: louise rochford ]
Just keep in mind that the web MVC part of Spring is just a small part of what it has to offer. The much bigger part is for the middleware part of your apps where it offers IOC, AOP, and makes many J2EE API's a lot easier to use.
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg