Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is struts a good starting point for java web

I've been developing in java then I stopped, so now since I have my google app engine account I wanted to start with this again. Also, I love web and I know struts is a good MVC framework.

I've been reading this. Do you think struts can help me to start or should I start with "plain" servlets, and then go to some framework?

like image 812
Gabriel Sosa Avatar asked Dec 08 '22 07:12

Gabriel Sosa


2 Answers

I would at least learn the basic servlet lifecycle and API.

As Joel puts it abstractions are leaky and this applies to frameworks--all frameworks not just Web ones--equally well. You will be much better equipped to use a framework, to know why it's good and how it can help you if you understand the underlying technology, the thing it is trying to abstract.

As for Struts, I would steer clear of STruts 1. It's rather ancient now. There's still a lot of code around for it but I wouldn't consider it best practice now, particularly for its (over)use of inheritance. Struts 2 is really a completely different framework based on Webwork.

There are plenty of other MVC frameworks out there. Personally I like Spring MVC as being quite "pure" and lightweight.

like image 61
cletus Avatar answered Dec 09 '22 21:12

cletus


I'd definitely start with an MVC framework as opposed to "plain" servlets as you suggest.

While I've used Struts 1.x a lot, I think for a new application you should look at Struts 2, Spring MVC or some other newer framework that leverage new Java features such as annotations.

like image 30
pgb Avatar answered Dec 09 '22 20:12

pgb