• 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

why use struts?

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello everyone,

why do we use struts framework?
i mean we can apply MVC architecture to our application without using struts also, where jsp is the view and servlet act as a controller and model.

thank you.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Who is "we"?

You make it sound like everyone uses Struts. We don't.

People use Struts if they find it is useful for them, or if they have been told to do so. Others, don't use it if they don't find it useful, or have been told to use something else. Simple as that.

There are lots of choices, including not using a framework at all.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I basically agree with Bear. This is not much of an argument, though:

i mean we can apply MVC architecture to our application without using struts also


Along those lines you could ask "Why use Java? What's it do that can't be done using Assembler?" If you ponder that question, you'll get closer to answering the question of why one might use any framework.
 
Preet Dholabhai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay. thank you.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By using some framework it becomes easy to implement things. for example for writing html code if you do via struts , there are library predefined for that purpose.
so it becomes easy to write the code. Its much more maintainable too.
 
Preet Dholabhai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we can write html code faster in any IDE. it is just drag and drop...
if you could pl. elaborate when you say " pre-defined libraries for writing html code makes it easy to implement it".

and maintainability would automatically come if i am using MVC which i can do by using jsp and servlets also(as i mentioned in my first post) so it again comes to the same point why struts?

i went through many sites searching for the answer but i think its only because of the MVC implementation and the answers i got from Ulf and Bear also signifies the same(pl. correct me if i interpreted it wrong ) .
So i think it depends upon an individual what to use and what not to. personally, i think struts make it easier to implement MVC.

Thank you.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

pre-defined libraries for writing html code makes it easy to implement it


Struts uses JSP for the templating mechanism, so one would rarely write HTML, but JSP. Struts has JSP tags that are used to implement forms (and a few other things), but that's true of most Java web frameworks, so it's not a distinguishing characteristic of Struts.

maintainability would automatically come if i am using MVC


Maintainable code is about much more than using MVC, and no framework can help you if the code you write doesn't follow good practices.

i went through many sites searching for the answer but i think its only because of the MVC implementation


Struts does much more than MVC, as do almost all other Java web frameworks, and its user guide will tell you what all those things are. Be aware that Struts 1 is dead for all practical purposes; new projects should not use it. And Struts 2 is different in an incompatible way, and thus very unlikely to be used as widely as Struts 1, since today there are many more frameworks available than there were when Struts 1 became popular.
 
Preet Dholabhai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay.
this helped me get a better idea than your previous post. i shall read its user guide.
thank you .
 
I didn't say it. I'm just telling you what this tiny ad said.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic