I've been working in java web development for 8-9 months. I think it's time to begin to use a framework and i would like Struts.
I consider which one is better to begin with. Struts 1 seems to be easier, but it gets older through time. How do you think? Which one is better for begining?
Which literature is better for that reason? I've started a few time ago to read some books on Struts2, but i don't like their style. It's given an exempla of struts.xml and they
say to write such and such content. But, they do not explain why do i have to write exactly this and not anything else.....
If you think you've done too much, usually it means you've done too few.
I agree with Ulf (except that Struts 1 is still under active development, though few new features are likely to be introduced)--it's worth exploring various frameworks to see which ones work for you.
There is still a surprising amount of new development using Struts 1, although I don't really understand why--even the latest versions would be considered "behind the times" in terms of flexibility, testability, and so on. Unless you have a compelling business reason to learn it (your company uses it, you *want* to work with it, etc.) I'd focus on Struts 2.
Personally I'm still not a huge fan of JSF, although some of the surrounding technology makes it pretty attractive (Seam, for example). I also think JSF and its associated technologies are more complex than things like S2, Wicket, Stripes, Tapestry, and so on, but that's likely to be because of my particular background.
I haven't had the same experience with the S2 books--most of them *do* explain why to write what's being written, provide alternatives, and so on. A book about a specific technology should never be considered a standalone resource--it should be read alongside the official framework documentation. S2, for example, has a reasonably extensive (although somewhat disorganized at times) documentation wiki.
Any book, besides its own information, should be considered a "window" into the API and other documentation. It's almost always up to the reader to explore topics that aren't covered in the book--and the reader will come out a stronger developer in many regards as a result.
Most framework-oriented books also assume a fairly high comfort level with Java and Java web app development in general: most frameworks rely heavily on other libraries and/or frameworks to accomplish what they do. It's usually assumed that book readers have the initiative to go beyond what's written in the book: there's simply no replacement for experimentation and experience.
Struts 1.3 is a solid API and very easy to learn. I suggest learning how to use and extend the framework. Don't pay attention to the age of the API and the fact that there is another version. Many new projects are still using Struts 1.3 and the reason why is that it is still stronger and easier to learn and develop with.
I am currently learning S2 and doing a project for S2 as Mr. Newton probabily knows that I have posted several questions about S2 (Thanks for all your input) Based from the earlier post of this thread, S2 is still not widely used but that's not my concern. I would like to know from your opinion, do you think S2 would gain market share in the next 5 to 10 years? What I am asking is do you believe S2 will have potential growth giving all these nice features that I have yet to learn.
10 years? I suspect that's looking quite a bit too far ahead in the web application space.
Struts 1 achieved its longevity due to its "perfect storm" timing and functionality. The web app framework space is saturated now, unlike then--IMO it's unlikely there will be another Java web app framework as ubiquitous as S1.
S2 *is* gaining traction, but it's a little late to the game--there are several other attractive alternatives. For me S2 happens to work well with my brain, others might prefer Spring MVC or Stripes, or a more component-oriented framework like Tapestry, Wicket, or JSF.
I'm sure S2 will gain market share, but I wouldn't want to make any predictions regarding how much or for how long--things move pretty quickly these days, and with so many other good alternatives, and the big uptick in other JVM languages and frameworks, nothing will match S1's adoption rates.
@Vitor: When so many other, better alternatives are available, any of which provide a superior development experience, sticking to the past doesn't make technical or business sense to me. Inertia may well be a reason, but that doesn't make it a *good* one. Better to train people for a month and reap the benefits long-term, it'd pay for itself easily and quickly.
There is a very simple reason why Struts1 is still used: many people knows how to use it, so it doesn't require much trainning, and all design issues are already well known.
Right. But once if for beginner if starts to learn Struts 1.3 and Struts 2.0 and compare which one easy to learn.
Struts 2 is too easy to learn and it provide so advance functionality than 1.3 so code required to develop some thing is too reduce using 2.0.
The development with Struts 2is so fast. And it provide advanced plug-in to integrate it.
Joined: Mar 11, 2009
@Vitor: When so many other, better alternatives are available, any of which provide a superior development experience, sticking to the past doesn't make technical or business sense to me. Inertia may well be a reason, but that doesn't make it a *good* one. Better to train people for a month and reap the benefits long-term, it'd pay for itself easily and quickly
I agree with you (I am learning Struts 2 and I plan to study other View frameworks as well (Tapestry 5, Shale, Mentawai...)), I just pointed why struts 1 is still a popular choice.
Many times managers and executives really don't care about those things, and it's funny that they make such decisions sometimes (even when they know nothing about Java or web development), so they usually stick to something that's "foolproof". That's why COBOL still has such a large codebase... sometimes the manager/executive sees no value in training if something already has a "good' solution. Sad but true....