This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

genuine question about Struts(Scalability)

 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can see that you have a config file in which you define the different jsps and their handlers in Struts.
I have a feeling as the system becomes more and more complex, it can be maintenance hazard to refer or maintain a XML for the list of jsps involved in the system.
Is it possible to extend the basic Action... class to look into a database table with a combination of jsp, handler details compared to getting info from XML.
I am saying this in case of a system where there are about > 1000 jsps.
Thanks,
Kishore.
 
author
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore,
I dont know if there is any tool currently available to store the struts-config metadata in database. Even database will not solve the problem since with struts-config, you'd always want to visualize the flow from one ActionMapping to other as per the business requirements.
If the struts-config.xml is getting bigger and unmanageable, then its time to break it into multiple application modules - each with its own struts-config.xml. Consider having a application module per usecase. Since you tend to organize jsps related to one usecase in a directory (or subdirectories), it goes well with the approach of multiple Struts application modules. The best part is that you can do it incrementally.
BTW, I like to use the Struts Console by James Holmes to manage the struts-config.xml. Its easy & intutive and has no IDE dependency.
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a link to the Struts Console
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My two cents:
So many pages denotes probably an "old school" Model 1 application.
Consider that when you port an application from JSP (Model 1), application ) to an MVC framework like struts, a lot of JSPs become useless.
This is due to the shift of the business logic from JSPs into the "Actions". Actions are more pratical than JSP to handle and maintain application logic, to access databases, to do some exception handling and recovering.
Yes, you will have a proliferation of Actions, but an higher reduction of JSP pages number.
Later, use Struts with a template engine like Tiles and that number will decrease again, too.
 
Srikanth Shenoy
author
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Fabrizio Gianneschi:
My two cents:
So many pages denotes probably an "old school" Model 1 application.
Consider that when you port an application from JSP (Model 1), application ) to an MVC framework like struts, a lot of JSPs become useless.


I once worked on a massive application that had about 700 JSPs (and corresponding references in struts-config.xml) that was perfectly Model2, but were using Struts 1.0. It was fun migrating to Struts 1.1
But what you say is generally true.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More JSPs does not always point to old school or model 1. The system I am talking about for sure uses MVC and is designed before Struts even is used commercially.
What if each JSP has its own differentiating factor(with respect to functionality) and the scale of the project is beyond the imagination of you guys
Kishore.
[ March 18, 2004: Message edited by: Kishore Dandu ]
 
Fabrizio Gianneschi
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Kishore Dandu:
More JSPs does not always point to old school or model 1.


Of course it doesn't, you're right. Mine was only a generalisation.


What if each JSP has its own differentiating factor(with respect to functionality) and the scale of the project is beyond the imagination of you guys


Wow, so this is a monster-app! Then I agree with the suggestion to use application modules and the separations of struts-config.xml files. It works very well.
Bye
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!