• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rule of thumb with Struts (for Neal Ford)

 
James Drinkard
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just started using Struts at work. I've completed two simple tutorials using struts and wondered if there is a rule(s) of thumb on when to use them? I wanted to use them in my next web project, but I was told if you don't have many jsp's it's not a good idea to use a framework. I disagree but was thinking maybe the overhead with struts on an app with only 5 or 6 pages makes it a bad choice?
Thoughts?
James
 
Junilu Lacar
Bartender
Posts: 7598
53
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not necessarily a bad idea, especially if you're already comfortable with using the framework. Even with just a few pages, you can still save some time by using a framework if you've already used it before. Besides, many IDEs now have wizards that will take care of most of the setup for you. Some other things you might want to consider in deciding whether or not to use a framework:
1. How comfortable are you with using the framework? If it takes you longer to get up and running because you are still learning the ins and outs of setting up and using the framework, then it might not be worth the trouble. Besides, it probably won't be all that hard to switch to using the framework later when you have had more time to delve into it.
2. Is this web app going to grow? If so, at what rate? If you don't think it's going to get any bigger than 5 or 6 pages then a framework will probably be overkill.
3. How complicated are the pages going to be? How much/how often are they going to change? If you think they will change often or if they are complex, you'll probably want to get a good separation of concerns: separate model, view, controller and database access layers. Frameworks help you structure your application that way from the onset. Of course, you don't need a framework to do it but it helps.
 
Neal Ford
Author
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Junilu's second point is key: small apps that do useful work tend to grow out of control.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic