Presentation is loading. Please wait.

Presentation is loading. Please wait.

MODEL VIEW CONTROLLER A Technical Seminar Report submitted to

Similar presentations


Presentation on theme: "MODEL VIEW CONTROLLER A Technical Seminar Report submitted to"— Presentation transcript:

1 MODEL VIEW CONTROLLER A Technical Seminar Report submitted to
Jawaharlal Nehru Technological University, Hyderabad In partial fulfillment for the requirement for the award of B.Tech Degree in Information Technology By S.Kishore Kumar A12A3 Under the Guidance of Mr.Shiva Kumar Lecturer DEPARTMENT OF INFORMATION TECHNOLOGY RAMAPPA ENGINEERING COLLEGE (Accredited by NBA and Affiliated to JNTU,Hyderabad) Hunter road, warangal

2 INTRODUCTION Model/view/controller (MVC) is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from the user interface(input and presentation), permitting independent development, testing and maintenance of each (separation of concerns).

3 What does MVC do… Breaks an application or even a piece of application’s interface into three parts.. 1. Model 2. View 3. Controller

4 Why MVC is used… Can change individual elements without affecting each other Data can be added/removed/changed without affecting the logic of what is presented (controller) or how it is presented (view).

5 About MVC.. MVC was originally developed to map the traditional input, processing, output roles into the GUI realm: Input --> Processing --> Output Controller --> Model --> View

6 Architectural Diagram..
Model business logic Get State Set State Update Event Change View Controller user interaction View model representation User Actions

7 Model A model represents an application’s data and contains the logic for accessing and manipulating that data Model services are accessed by the controller for either querying or effecting a change in the model state. The model notifies the view when a state change occurs in the model.

8 View The view is responsible for rendering the state of the model.
The presentation semantics are encapsulated within the view, therefore model data can be adapted for several different kinds of clients. The view modifies itself when a change in the model is communicated to the view. A view forwards user input to the controller.

9 Controller The controller is responsible for intercepting and translating user input into actions to be performed by the model. The controller is responsible for selecting the next view based on user input and the outcome of model operations.

10 Application.. An MVC application may be a collection of model/view/controller triads, each responsible for a different UI element. The Swing GUI system, for example, models almost all interface components as individual MVC systems. MVC is often seen in web applications where the view is the HTML or XHTML generated by the app. The controller receives GET or POST input and decides what to do with it, handing over to domain objects (i.e. the model) that contain the business rules and know how to carry out specific tasks such as processing a new subscription, and which hand control to (X)HTML-generating components such as templating engines, XML pipelines, Ajax callbacks, etc.

11 Advantage.. They are reusable : When the problems recurs, there is no need to invent a new solution, we just have to follow the pattern and adapt it as necessary. They are expressive: By using the MVC design pattern our application becomes more expressive.


Download ppt "MODEL VIEW CONTROLLER A Technical Seminar Report submitted to"

Similar presentations


Ads by Google