jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Struts and mvc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and mvc" Watch "Struts and mvc" New topic
Author

Struts and mvc

Arathi Raj
Ranch Hand

Joined: Nov 22, 2002
Posts: 90
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
Rajesh Vijaya
Ranch Hand

Joined: Oct 18, 2005
Posts: 48
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


Rajesh <br /> <br />SCJP1.4 SCWCD1.4 SCBCD 1.3 ,SCDJWS(Preparing..)<br /> <br />There is no free will.It is the phenomenon bound by cause and effect.But there is something behind will which is free---Swami Vivekananda...
Ravinder S Edhan
Ranch Hand

Joined: Dec 15, 2003
Posts: 57
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
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
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

Joined: Nov 22, 2002
Posts: 90
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
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Moving to the Struts forum. Please try to keep questions in this forum to Servlets only.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
should've been moved to struts.apache.org


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
Consider Paul's rocket mass heater.
 
subject: Struts and mvc