• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Lovers, explain this.

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Working on a project where we are taking over the code base from another company. They used Struts. The struts-config.xml is 6114 lines long. How do you struts lovers justify a configuration file that large and claim that Struts simplifies anything?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me answer your question with a question:

Have you ever seen an application written entirely with JSPs where all the logic, including Database access was written in scriptlets?

I have. It's not pretty.

How, then can you say that J2EE Web technology is any good, since it can be abused so badly?

The same is true of Struts. The fact that you can abuse it doesn't make it a bad technology.

Having such a large config file is not ideal. If it were my application, I'd look at breaking it up into modules, each with it's own config file.

On the other hand, what's the big deal about it being so big? The real question is "How easily can I find the information I need about this application?"

If I as a Struts developer encounter a URL of /doThis.do, all Ineed to do is open the config file, hit <ctrl>F, search for path="/doThis" and I immediately have a wealth of information about what is going on with that URL.

I can only imagine how unwieldy such an applicaiton would be without some sort of overriding framework to keep it organized. How big would the web.xml file be if every action defined in the Struts config file were a Servlet?

You can argue that other frameworks might be better/faster/cooler/sexier. Fine. Maybe they are. If I find a better one, I'll use it. The point I'm making is that most Struts applications, with all their faults, are better and more organized for having used Struts than they would be without it.
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sir,

I think in those situations where struts-config file is bocoming very large, we can break config in different modules and then each module will have its own configuration file like struts-config-A.xml, struts-config-B.xml etc.

Thanks & Regards

Naseem
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Merrill, that's pretty much the response I expected. And I even thought about deleting my post before anyone responded but I thought, what the heck. Let's see what happens.

I see every point you made. I just don't like Struts and sometimes just feel the need to voice that opinion. [ducks away quietly...]
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A 6000+ line configuration file? I wonder how long ago my project passed that mark...it is now close to the 18,000 range. Maybe that is not ideal, but it has not cause any real problems.

Several years ago I worked on several major eCommerce web sites built with Broadvision. We used presentation technology similar to JSP (I believe that Brodvision licensed LiveScript from Netscape which was the precursor to JSP). We had JSP pages that were several thousand lines long. Talk about hard to maintain!

- Brent
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic