Struts Flow
Whenever a request comes from web browser then application's controller handles this request.When request is received then Controller invokes an Action class.This Action class object then communicates with Model class(which actually is a set of JavaBeans representation) to examine or update the application's state..The Struts ActionForm class helps in data exchange between Model and View layers.
A web application uses 'web.xml', a deployment descriptor to initialize resources like servlets and taglibs. Similarly, Struts uses a configuration file( struts-config.xml) to initialize its own resources. These resources include ActionForms to collect input from users, ActionMappings to direct input to server-side Actions, and ActionForwards to select output pages.Moreover,one can specify validations for the ActionForms in an XML descriptor, using the Struts Validator. A standard extension, Tiles, helps you build pages from smaller fragments.
Struts may not be a useful option for each type of web development application.If the application is huge and complex then Struts fits the bill in best way but if you are developing a web application which requires very little of web pages and business logic then MVC-1 based approach will be best rather MVC-2 based like Struts.
0 comments :
Post a Comment