Monday, 18 April 2011

Struts Class 1

                 STRUTS
-> It is an OpenSource Web MVC Framework, given by Apache Software Foundation, and it is built on Servlet and JSP specification and used to build Java Web Application.


What is a Web Application?
An Application that provides data and services to web client.


What is Web Client?
Which makes a request using web protocals.


What is a Framework?
It is a well-defined set of classes and Interfaces.


The next responsibility is to understand how do we use STRUTS with respect to Application Development?
--> First we need to understand the STRUTS workflow.


where we commence with different architectures, i.e one of the best implemented Architecture pattern i.e web MVC architecture. 


-> In this Architecture Data presentation is separated from Data representation and a third component is used to integrate the two.






Role of MODEL: this takes in Data Representation i.e stores and retrives data.

Role of VIEW:  Takes part in Data Presentation i.e prepares the Presentation that is presented to the client, in short we say it holds Presentation Logic.

Role of Controller: Controller plays main role in MVC Architecture.

where Controller takes a request from the client and locates the appropriate model component and then dispatches the request, takes the response from the model, locates appropriate view component and forwards.
-> so the controller only integrates the model and View Components.

In the above architecture imagine the number of clients making the request increases, results to Burden on the controller.



Possible solution is: Designing Multiple Controllers, solves the above issue but we get a new issue, we loose Centralized accessability i.e access becomes Decentralized.


So what is the best solution where we meet the above requirement and also achieve Centralized accessability, so solution is given by a design pattern or a Presentation tier Design Pattern Named as FRONT CONTROLLER...





wait till tommorrow...
Catch u soon....
ur
Struts Developer..