What is Struts ?
Struts is not a web technology unlike servlets, JSP it is neither J2EE nor J2SE but it uses both technology, Struts is an open source web application framework from Apache Software Foundation (ASF). Struts is used for Java based interactive websites. Struts is used for developing presentation layer for a web enabled enterprise application. Struts application means a Java based web application that follows MVC design pattern & developed using struts framework. In any Java based web application, application logic is implemented in Java language & servlets JSP are used as web technology.
What is a web application framework?
A reusable & semi finished Web application that can be customized to produce a specific web application is known as application framework. Servlets, JSP, Java Bean are the Java technologies used in struts application.
How many logics a Java based web application contains?
Web application contains three logics
- Application logic
- Presentation logic
- Business logic
1. Application logic: It is a piece of code that is responsible for the following things is known as application logic.
- Receiving the client request
- Capturing the user input
- Performing server side validation for the user input.
- Invoking the business methods
- Making processed Data available to presentation logic.
- Identifying appropriate presentation logic & switching control to the logic.
2. Presentation logic: It is the piece of code that is responsible to generate the response for the client request is known as presentation logic, it is responsible for following things.
- Accessing memory data.
- Producing dynamic web page based on the data.
Note: Most of the times user input page is development is done by presentation logic.
3. Business logic: A piece of code that process Data according to business rules of organization is known as Business Logic.
Note: Struts developer is not responsible to develops Business Logic. Struts developer basically develop application logic and presentation logic. Struts framework provide support only in areas of application and presentation logic.