• Advertisement
Sign in to follow this  

[java] Is Struts worth using?

This topic is 4583 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Asking for opinions of course...but is Struts worth using, or are you better off using a simpler approach for developing a web application? Does the complexity of the web application effect whether or not Struts is appropriate? (If you have a very simple web application, is it overkill?) Are any of these stupid questions?

Share this post


Link to post
Share on other sites
Advertisement
The Struts webpage says it's not appropriate for simple projects, and refers to something called a "Model 1" solution that uses only server pages. ...Anyone know what they mean by that?

Share this post


Link to post
Share on other sites
While I haven't used Struts myself, I'll give you my opinion on it, for what it's worth. I currently work in a corporate environment where large web frameworks are frequently discussed and used. Struts seems to be the controller part of the MVC architecture. Unless you are creating rather complex websites using J2EE, I don't really see a need for it.

Struts is rather popular for what it does, but it's limited in that it's only 1 tier in a 3 tier system. For the other tiers, you'd need Hibernate/iBatis/<insert favorite database access tool here> for your Model and JSP/JSF/<insert favorite templating system here> as your View. For a more complete system, you could look at Spring, but from what I hear, it's no silver bullet.

Hope this helps!

Share this post


Link to post
Share on other sites
I don't recommend Struts. It's way overrated. There are much better and much easier to use web frameworks out there for J2EE. Give Tapestry a try.

Share this post


Link to post
Share on other sites
The JavaServer Faces is not quite mature yet, but it's way better - in my experience so far I had no major problems with it, but then again, I'm using it in small size projects - and it is the default from Sun, who is testing it in order to make it a standard.

Also, as the MVC was mentioned by Whackjack, the JSF provides all the three tiers a base implementation, as well as an extensible framework for the development of custom components in all three tiers.

Son Of Cain

Share this post


Link to post
Share on other sites
Large scale projects (max of up to 30,000 or so users, but typically much less) is what I'm aiming at in the future, although in the present that's not a concern. Also presently I'm looking at a very small project, at a level of complexity equal to a school project IMO. It's not using (or going to use) Struts, but it IS using an in-house written framework that seems like overkill in it's level of complexity. (The reason was that it was sort of a test of the framework--and it was created from nothing in about two days or so.) But IOW by looking at the project in Eclipse, you'd never know it only had about 4-5 functional pages.

Has anyone here actually had to use Struts and formed a strong opinion on it?

It's possible I may be able to push for an alternative framework, BUT it would have to be pretty well known. Something that has lots of documentation and such out there, including even books preferably, is probably the only kind of thing I'd have a chance at pushing. Are there any well-supported, popular alternatives to Struts? (I haven't looked at others suggested yet since I don't know how widespread they are.) Something that covers more than just the C of MVC does sound good, but I'll never convince anyone it's worth using if it's too hard to learn and there isn't stuff out there to learn it from.

Whackjack--since you seem to be in the most similar situation--what do you use typically? It sounds like you haven't actually used Spring.

Share this post


Link to post
Share on other sites
Quote:
Original post by Son of Cain
The JavaServer Faces is not quite mature yet, but it's way better - in my experience so far I had no major problems with it, but then again, I'm using it in small size projects - and it is the default from Sun, who is testing it in order to make it a standard.


Oh, I just noticed that I skimmed over part of this. "JavaServer Faces" is what Sun is pushing as a standard? Maybe that's one I should look into. It's scary that it's not mature yet though...hmm.

Share this post


Link to post
Share on other sites
One of the projects I'm working on uses Struts. It's a large scale contract management system for a very large company here in Iowa. I'm not the lead on it, and in fact I've only contributed a small portion to it (some Hibernate search changes and a Jasper report), so I couldn't tell you all of the details.

Spring, from what I've been told, has a lot of the MVC infrastructure complete, and all you really need to do is set up your XML config files (J2EE is littered with the bastards) and do your controller/view logic.

I went to a Java conference called No Fluff, Just Stuff a couple weekends ago, and there seemed to be quite a bit of discontent with JSF (actually, there was general discontent with Sun/Java in general.) Dave Thomas was a presenter there, showing off his new found love, Ruby.

Anyway, if you're still having trouble deciding what to use, I'd suggest hanging around the respective forums for each technology and see what the cheer/jeers are for each one.

Share this post


Link to post
Share on other sites
Well, I have noticed at least one "Spring" book, so apparently that's also somewhat known. I've been looking into JSF a little, it's not so bad but I'm definitely interested in checking out other stuff too.

Share this post


Link to post
Share on other sites
I've used Struts and Tiles with great success in a few large projects like corporate portals. For small projects or projects that won't get heavy modification over time it is probably overkill. I've used a couple other MVC frameworks and they all stack up about the same.

Share this post


Link to post
Share on other sites
Sounds like it... would it be worth using with a small project for the learning experience? Maybe I'll learn Struts and Spring, I'm thinking one might be better than the other in specific circumstances but the other way around in other circumstances.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tebriel
would it be worth using with a small project for the learning experience?


Absolutely, you don't have to have a big project to learn how it works. :)

Share this post


Link to post
Share on other sites
I'll probably be using either Struts or Spring for a pretty small project in this way. Although, this "small project" has the potential to be "converted" into a very big one way down the road. So maybe learning isn't the only reasoning... now I just need to figure out which framework and tools would work out best for me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement