Open-source framework for creating Java web applicationsOctober 23rd2008Nawaf AlghamdiKyle AllaireAvinash Mysore Alexander Woods Open-source server-side Java framework Used to develop web applications Based on MVC architecture2Apache Struts Initially developed by Craig McClanaha Taken over by Apache Software Foundation in 2002. Made open-source Struts 2 is the latest version available Uses donated WebWorks code was brought in as part of it Stable and designed to be easier Struts 1 is not obsolete and will be supported for many years3Apache Struts Implemented as a server-side Model-View-Controller Combination of JSP’s, JSP tags, and Java servlets Does not provide an specialized model components 4Apache Struts Backbone of all Struts applications Implemented as a servlet named “ActionServlet” Receives all requests from the client Delegates each request to appropriate Action class The Action class handles the request, then passes a key back to the ActionServlet ActionServlet determines what View to display as result5Apache Struts Implemented by JSPs, custom tag libraries, and ActionForm objects JSPs have two purposes: Act as a presentation layer to previously executed Controller Action Gather data required to perform some specific Controller Action6Apache Struts Ability to accomplish one of the main aspects in OO programming: reusability Provides a group of cooperating classes, servlets, and JSP tags that are used as an infrastructure for user input validation, error handling, and flow control Gives people of different backgrounds the benefit of working in parallel7Apache Struts Reliability High reuse and adoptability Low cost Rapid deployment and maintainability8Apache Struts Form bean Bean Tags Form Field Validation9Apache Struts10Apache Struts Pros: Tag library Open source Sample MVC implementation Good space management11Apache Struts Cons Correct level of Abstraction Limited scope Complexity12Apache
View Full Document