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.
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...
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...
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
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.
posted 14 years ago
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?