This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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.
Joined: Jan 24, 2010
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.
Joined: Mar 22, 2005
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.
Joined: Jan 24, 2010
this helped me get a better idea than your previous post. i shall read its user guide.
thank you .