Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Benefits and drawbacks of struts

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was recently asked the question, what are the benefits and drawbacks of using an MVC2 model, specifically Struts, and what are the other options and their benefits. I was able to tell the person what Struts and MVC model give you as benefits but I was unable to tell the person what the drawbacks were, or what other options for web frameworks there are out there. Everybody seems to use this model if they have a complex application. Does anybody know of good alternative frameworks and what their benefits are over Struts? Drawbacks of using Struts?
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your own MVC framework can be a really good alternative, as you'll design it to fit exactly your needs.
But of course, it will be a little bit long to develop..... That's where Struts appears.
So the main drawback of Struts is that it is a very generic framework, with a lot of functionnalities you'll never use. Is that really a drawback ?
Another drawback is the lack of support.
You can't claim for a fix if you are confrontating by a bug. But you can fix it by yourself.

my $0.02
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was really looking to read this topic...
I have been reading one of the IBM RedBooks
on WebSphere and in there the author
mentions that .. "One of the biggest downside is
that with Struts you have only one servlet (the
ActionServlet) serving up all of the dynamic pages
of your web application."
I don't quite understand this bottleneck (and
maybe this is because I don't understand Struts
too well). Can't you have multiple Action
Servlets doing page rendering for different
modules in an application?
Thx,
PJ
 
Sheriff
Posts: 15815
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kyle,
Some benefits of Struts:
1. It's open source - it's free, it's been built collaboratively and tested by many people.
2. Connection pooling
3. Good tag libraries
4. Good MVC framework - you can concentrate more on business logic and less on the plumbing
5. Flexible and maintainable - XML configuration files make it easy to customize actions. To add functionality, you simply need to create an Action, a Form, and the JSP -- the framework takes care of the rest
6. Facilitates I18N and L10N.
Drawbacks:
1. It's open source - I have personally encountered organizations that have an aversion to anything they don't have to pay for. Make sure that you set the proper expections for support and upgrades.
2. Single controller servlet - You normally have just one ActionServlet. This may be an issue when it comes to scalability.
Junilu
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the pros I would say this.
-It's a lightweight framework. It doesn't force you to use everything it provides. You can pick and choose the parts that work well.
-The community support is great. Check out the extensions and add-ons that have been developed. http://husted.com/struts/resources.htm
Cons.
-I wish that releases were made more often. There are a number of features in the nightly build that make a developers life a lot easier. Selling a beta/nightly version to the management is a tough job.
-It takes a while to get around with the documentation. But then again the documentation is far better than some commercial products I have worked with. Also searching the mailing list archives with a bit of patience yields good results.
-It fails 'silently' in a few places.(I think there was a bug for this).
What I mean is that if there are errors in your config files it does not throw an exception or log the error.

Regarding the multi controller issue here's a resource listed.Multi controllers
There was some discussion on this on the struts-dev mailing list although I have no idea where it's going.
[ March 12, 2002: Message edited by: Ravi Veeraghanta ]
 
Ravi Veera
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternative frameworks.
Actually I have seen a lot of references to frameworks. Every company seems to have one. Here are some which I have come across. Some are opensource some are not.
Here are a few frameworks I have seen reference to.
I belive JavaFaces(JSR 127) and the standard JSP Tag Library(JSR ??) seek to achieve the same results as struts.
Expresso uses Struts and bundles a lot more (It's open source).
-http://www.jcorporate.com
http://barracuda.enhydra.org
-Tapestry
-XMLC
-http://www.w4toolkit.com/
If you are looking for a simple Database access mechanism like in MS-Access or like the Powerbulder data window this is good.
http://www.dbforms.org
HTH
Ravi
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prashant,
We can have multiple front controllers( actions servlets) in the application, possibly one for each module. I don't see it as any performance bottleneck( as they are servlets). So, like you I don't see any reason.
Ashok
BEA WebLogic Developer
IBM -140,483,486
SUN-JCP
 
Ashok Talluri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see Structs framework, a very good MVC framework which saves lot of our effort to create a one like that. We saved about 2 months effort in our project.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The biggest benefit, IMO, is that you can concentrate on business logic and not worry as much about the underlying framework. I have found this to be useful in the learning process especially.
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pros,
JSP-centric framework.
Cons,
Maybe my boss doesnt believe in open source.
Guys from Barracuda project provides framework comparisons between Barracuda and Struts. A really good read.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to admit that I get annoyed when I see "struts doesn't enforce separation of presentation from business logic because you can still put scriplets in your JSP." Well, yes, but isn't that why we have project managers and code walk-throughs? The XML/XSLT crowd ignore the fact that you can't build content pages with products like Interwoven using their method while the Struts method is perfect for products like Interwoven.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our project, we have been using struts for one year.
it is so easy to use ,but it not work very well when we add some complex function to it.
When you release one version, you can't do anything with it. for upgrade ,you should do
shut down, do fix bugs, do restart, not support hot fix.
i think we can do better if we design a own framework(just for own use), it can be live under our own control.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by yiming wang:
it is so easy to use ,but it not work very well when we add some complex function to it.
When you release one version, you can't do anything with it. for upgrade ,you should do
shut down, do fix bugs, do restart, not support hot fix.
i think we can do better if we design a own framework(just for own use), it can be live under our own control.

The reason it doesn't support "hot fix" is the same reason that no framework can support "hot fix". There is no way for the servlet engine to recognize when a non-servlet class has been updated. As far as "adding complex functions", Struts is supporting some extremely large and complex web sites without any problems.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic