• 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Struts and mvc

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody tell me what are the uses of using struts over MVC? I know struts is also example of MVC architecture. But I went through HF servlets and JSP. In the 2d chapter it explains that in order to avoid duplicate code in every serlvet , it better to go with Struts. So I didn't understand what kind of duplicate code will be there in every servlet. and using struts what we can avoid.

but as for as i know we can use struts when the application involve too many forms. please correct my knowledge. As am new to mvc and struts.

Thanks
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raj ,

I 'm also following HF servlets and JSP i do not see anywhere mentioning about struts in 2nd Chapter .....BTW did u look at my previous post ...i'm having problem executing ...if u find any answer let me know...


thanks

Rajesh
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Regarding duplicate of code... In HF second chapter, it is mentioned that 'you have to move until the end of the book'. And in the end of book a chapter named 'Design Patterns' is there, which help in reducing the code duplication. Some of the design patterns mentioned there are Business Delegate pattern, Service Locator pattern, Transfer Object, Front Controller pattern.

Please go through those patterns to reduce the duplicacy of code

-------------
SCJP 1.4
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually its not about Struts really. Please read about Front Controller Design Pattern. Then you will definitely know that how can we avoid code duplication. Struts is just a web application framework based on MVC architecture. It employs Front Controller design pattern. Some of the other frameworks also employs Front Controller and we can use them as well. We can design our own framework and use Front Controller for a small web application or for practice.
 
Arathi Raj
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for clearing my doubts. could u please tell me what is the use of struts. How will it reduce the coding for a developer?

Thanks
 
ranger
Posts: 17344
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Struts forum. Please try to keep questions in this forum to Servlets only.

Thanks

Mark
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
should've been moved to struts.apache.org
 
That feels good. Thanks. Here's a 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!