1.What is MVC?
Model-View-Controller
(MVC) is a design pattern put together to help control change. MVC decouples
interface from business logic and data.
- Model : The model contains the core of the application's functionality. The model encapsulates the state of the application. Sometimes the only functionality it contains is state. It knows nothing about the view or controller.
- View: The view provides the presentation of the model. It is the look of the application. The view can access the model getters, but it has no knowledge of the setters. In addition, it knows nothing about the controller. The view should be notified when changes to the model occur.
- Controller:The
controller reacts to the user input. It creates and sets the model.
2.What is a framework?
A framework is made up of
the set of classes which allow us to use a library in a best possible way for a
specific requirement.
3.What is Struts framework?
Struts framework is an
open-source framework for developing the web applications in Java EE, based on
MVC-2 architecture. It uses and extends the Java Servlet API. Struts is robust
architecture and can be used for the development of application of any size.
Struts framework makes it much easier to design scalable, reliable Web
applications with Java.
4.What are the components of Struts?
Struts components can be
categorize into Model, View and Controller:
- Model: Components
like business logic /business processes and data are the part of model.
- View: HTML,
JSP are the view components.
- Controller: Action
Servlet of Struts is part of Controller components which works as front
controller to handle all the requests.
5.What are the core classes of the Struts Framework?
Struts is a set of
cooperating classes, servlets, and JSP tags that make up a reusable MVC 2
design.
- JavaBeans
components for managing application state and behavior.
- Event-driven
development (via listeners as in traditional GUI development).
- Pages
that represent MVC-style views; pages reference view roots via the JSF
component tree.
No comments:
Post a Comment