SlideShare a Scribd company logo
MVC pattern and
implementation in java
Agenda
•   Context
•   Problem
•   Solution
•   What is MVC?
•   MVC Architecture
•   Common MVC Implementation
•   MVC Interaction Order
•   MVC Pattern
•   MVC Responsibilities
•   Advantages of MVC
•   Implementation of MVC
CONTEXT


• Interactive applications with a flexible
  human-computer interface
PROBLEM DEFINITION
• User interfaces are especially prone to change
  requests.
• Different user place conflicting requirements on the
  user interface.
• Building a system with the required flexibility is
  expensive and error-prone if the user interface is
  tightly interwoven with the functional core.
PROBLEM DEFINITION
• The following forces influence the solution
   – The same information is presented differently in different
     windows, for example, in a bar or pie chart.
   – The display and behavior of the application must reflect
     data manipulations immediately.
   – Changes to the user interface should be easy, and even
     possible at run-time.
   – Support different ‘look and feel’ standards or porting the
     user interface should not affect code in the core of the
     application.
SOLUTION

MVC – Model View Controller
What is MVC?

• MVC - Model-View-Controller - is a design pattern
  for the architecture of web applications.
• It is a widely adopted pattern, across many languages
  and implementation frameworks, whose purpose is to
  achieve a clean separation between three components
  of most any web application.
MVC Architecture
• The Model represents the structure of the data in the
  application, as well as application-specific operations on
  those data.
• The View renders the contents of a model. It specifies
  exactly how the model data should be presented.
• The Controller translates user actions (mouse
  motions, keystrokes, words spoken, etc.) and user input
  into application function calls on the model, and selects
  the appropriate View based on user preferences and
  Model state.
Cond…
  The MVC architecture divides an application (code)
  required to manage a user interface into three parts:

• Data components maintain the raw application data
  and application logic for the interface –model.
• Presentation components provide the visual
  representation(s) of the data --view (usually to the
  screen).
• Input-processing components handle input from the
  user by modifying the model--controller.
Common MVC Implementation
MVC Actions
• Model
          -- Notify view about data updates
• View
         --Change rendering as needed
• Controller
         --Select view to be rendered based on
  event notifications and method invocations
MVC Interaction Order

1.    User performs action, controller is notified.
2.    Controller may request changes to model.
3.    Controller may tell view to update.
4.    Model may notify view if it has been modified.
5.    View may need to query model for current data.
6.    View updates display for user.
                                       6
              4              View
                      5
     Model                      3

                                       1
                  2
                          Controller
MVC Pattern – Model
• Contains application & its data

• Provide methods to access & update data

• Interface defines allowed interactions

• Fixed interface enable both model & GUIs to be easily pulled out and
  replaced

• Examples:-

   – Text documents

   – Spreadsheets

   – Web browser

   – Video games
MVC Pattern – View
 Provides visual representation of model.

 Multiple views can display model at same time.




 When model is updated, all its views are informed & given
  chance to update themselves.
MVC Pattern – Controller

• Users interact with the controller

• Interprets mouse movement, keystrokes, etc.

• Communicates those activities to the model

• Interaction with model indirectly causes view(s) to
  update
model responsibilities

• store data in properties

• implement application methods
  (e.g., ClockModel.setTime() or ClockModel.stop())

• provide methods to register/unregister views

• notify views of state changes
• view responsibilities

     • create interface

     • update interface when model changes

     • forward input to controller

• controller responsibilities

     • translate user input into changes in the model

     • if change is purely cosmetic, update view
Advantages of MVC

 Separating Model from View (that is, separating data
  representation from presentation).
    More robust
    Easier to maintain
    permits run-time selection of appropriate Views
     based on workflow, user preferences, or Model state.

 Separating Controller from Model (application behavior
  from data representation)
    allows configurable mapping of user actions on the
     Controller to application functions on the Model.
 Easy to add multiple data presentations for the same
  data.
     • Multi-view applications
        (overview+detail, brushing,…)
     • Different users
     • Different UI platforms (mobile, client-
        side, server-side,…)
     • Alternate designs
                                     GUI

               Model
                                     GUI

                Model
                                     GUI
Cond…
 Facilitates adding new types of data presentation as
  technology develops.
 Model and View components can vary independently
  enhancing maintainability ,extensibility, and
  testability.
 allows user interfaces (views) to be easily
  added, removed, or changed
 allows response to user input (controller) to be easily
  changed
COND…

 changes can happen dynamically at runtime
 promotes code reuse (e.g., one view might be used
  with different models)
 allows multiple developers to simultaneously
  update the interface, logic, or input of an
  application without affecting other source code.
Implementation of MVC
Mvc   pattern   and implementation   in   java fair

More Related Content

What's hot (20)

Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
Ali Usman
 
DBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational SchemaDBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational Schema
Mohammad Imam Hossain
 
Express JS
Express JSExpress JS
Express JS
Designveloper
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101
Will Button
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
Sajith Ekanayaka
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 
Efficient Database Design for Banking System
Efficient Database Design for Banking SystemEfficient Database Design for Banking System
Efficient Database Design for Banking System
S.M. Murad Hasan Tanvir
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
Rajiv Srivastava
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
Gong Haibing
 
project proposal final
project proposal finalproject proposal final
project proposal final
Arslan Mehmood
 
Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207
Burhan Chaudhry
 
Adbms 3 main characteristics of the database approach
Adbms 3 main characteristics of the database approachAdbms 3 main characteristics of the database approach
Adbms 3 main characteristics of the database approach
Vaibhav Khanna
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
Cory Forsyth
 
U7 postgre sql
U7 postgre sqlU7 postgre sql
U7 postgre sql
Jr. Serrano
 
Database Chapter 2
Database Chapter 2Database Chapter 2
Database Chapter 2
shahadat hossain
 
Java servlets and CGI
Java servlets and CGIJava servlets and CGI
Java servlets and CGI
lavanya marichamy
 
Types of databases
Types of databases   Types of databases
Types of databases
Md Showrov Ahmed
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
KHALID C
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
Ali Usman
 
DBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational SchemaDBMS 3 | ER Diagram to Relational Schema
DBMS 3 | ER Diagram to Relational Schema
Mohammad Imam Hossain
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101
Will Button
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 
Efficient Database Design for Banking System
Efficient Database Design for Banking SystemEfficient Database Design for Banking System
Efficient Database Design for Banking System
S.M. Murad Hasan Tanvir
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
Gong Haibing
 
project proposal final
project proposal finalproject proposal final
project proposal final
Arslan Mehmood
 
Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207Ch01 database-conceptsppt4207
Ch01 database-conceptsppt4207
Burhan Chaudhry
 
Adbms 3 main characteristics of the database approach
Adbms 3 main characteristics of the database approachAdbms 3 main characteristics of the database approach
Adbms 3 main characteristics of the database approach
Vaibhav Khanna
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
Cory Forsyth
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
KHALID C
 

Viewers also liked (20)

Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
Javier Antonio Humarán Peñuñuri
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvc
ifnu bima
 
Produtividade na criação de websites com ASP.NET MVC
Produtividade na criação de websites com ASP.NET MVCProdutividade na criação de websites com ASP.NET MVC
Produtividade na criação de websites com ASP.NET MVC
Waldyr Felix
 
Physical examination of cattle lecture 2
Physical examination of cattle lecture 2Physical examination of cattle lecture 2
Physical examination of cattle lecture 2
Dauda Iliyasu
 
MVC
MVCMVC
MVC
akshin
 
Ado.net
Ado.netAdo.net
Ado.net
Iblesoft
 
Parturition
ParturitionParturition
Parturition
Dauda Iliyasu
 
Spring Mvc,Java, Spring
Spring Mvc,Java, SpringSpring Mvc,Java, Spring
Spring Mvc,Java, Spring
ifnu bima
 
ADO.NET
ADO.NETADO.NET
ADO.NET
Farzad Wadia
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
Snehal Harawande
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
ADO.NET -database connection
ADO.NET -database connectionADO.NET -database connection
ADO.NET -database connection
Anekwong Yoddumnern
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Seminar on java
Seminar on javaSeminar on java
Seminar on java
shathika
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Khaled Musaied
 
Spring MVC Basics
Spring MVC BasicsSpring MVC Basics
Spring MVC Basics
Bozhidar Bozhanov
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
 
Core java slides
Core java slidesCore java slides
Core java slides
Abhilash Nair
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber Security
Stephen Lahanas
 
Produtividade na criação de websites com ASP.NET MVC
Produtividade na criação de websites com ASP.NET MVCProdutividade na criação de websites com ASP.NET MVC
Produtividade na criação de websites com ASP.NET MVC
Waldyr Felix
 
Physical examination of cattle lecture 2
Physical examination of cattle lecture 2Physical examination of cattle lecture 2
Physical examination of cattle lecture 2
Dauda Iliyasu
 
Spring Mvc,Java, Spring
Spring Mvc,Java, SpringSpring Mvc,Java, Spring
Spring Mvc,Java, Spring
ifnu bima
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Seminar on java
Seminar on javaSeminar on java
Seminar on java
shathika
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Khaled Musaied
 
Introduction to Cyber Security
Introduction to Cyber SecurityIntroduction to Cyber Security
Introduction to Cyber Security
Stephen Lahanas
 
Ad

Similar to Mvc pattern and implementation in java fair (20)

MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
HassanAliKhan36
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
Dipika Wadhvani
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
Abhishek Yadav
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
Madhukar Kumar
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4
Pankaj Avhad
 
MVC
MVCMVC
MVC
Ravi Bansal
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
Jennie Gajjar
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
Shubham Goenka
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
Nosheen Qamar
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
MVC in PHP
MVC in PHPMVC in PHP
MVC in PHP
Vineet Kumar Saini
 
Verbal+Visual: MVC Structure. Model, View, Controller.
Verbal+Visual: MVC Structure.  Model, View, Controller.Verbal+Visual: MVC Structure.  Model, View, Controller.
Verbal+Visual: MVC Structure. Model, View, Controller.
Anshey Bhatia
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
Mike Wilcox
 
Mvc
MvcMvc
Mvc
abhigad
 
Mvc Architecture in a web based application
Mvc Architecture in a web based applicationMvc Architecture in a web based application
Mvc Architecture in a web based application
OnGraph Technologies Pvt. Ltd.
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
Ravi Bhadauria
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
Emily Bauman
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017
Innovation Studio
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
Dipika Wadhvani
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
Abhishek Yadav
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4
Pankaj Avhad
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
Jennie Gajjar
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)Task 2 - Educational Article – Model View Controller (MVC)
Task 2 - Educational Article – Model View Controller (MVC)
Shubham Goenka
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
Nosheen Qamar
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
Verbal+Visual: MVC Structure. Model, View, Controller.
Verbal+Visual: MVC Structure.  Model, View, Controller.Verbal+Visual: MVC Structure.  Model, View, Controller.
Verbal+Visual: MVC Structure. Model, View, Controller.
Anshey Bhatia
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
Mike Wilcox
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
Ravi Bhadauria
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017MVC architecture by Mohd.Awais on 18th Aug, 2017
MVC architecture by Mohd.Awais on 18th Aug, 2017
Innovation Studio
 
Ad

More from Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
Tech_MX
 
Uid
UidUid
Uid
Tech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
Tech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
Tech_MX
 
String & its application
String & its applicationString & its application
String & its application
Tech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structure
Tech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
Tech_MX
 
Spss
SpssSpss
Spss
Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
Tech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
Tech_MX
 
Set data structure
Set data structure Set data structure
Set data structure
Tech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
Tech_MX
 
Parsing
ParsingParsing
Parsing
Tech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
Tech_MX
 
More on Lex
More on LexMore on Lex
More on Lex
Tech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
Tech_MX
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
Tech_MX
 
Virtual base class
Virtual base classVirtual base class
Virtual base class
Tech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
Tech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
Tech_MX
 
String & its application
String & its applicationString & its application
String & its application
Tech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structure
Tech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
Tech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
Tech_MX
 
Set data structure
Set data structure Set data structure
Set data structure
Tech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
Tech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
Tech_MX
 
More on Lex
More on LexMore on Lex
More on Lex
Tech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
Tech_MX
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
Tech_MX
 

Recently uploaded (20)

Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
FME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy AppFME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy App
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | BluebashMCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
Bluebash
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
FME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy AppFME Beyond Data Processing Creating A Dartboard Accuracy App
FME Beyond Data Processing Creating A Dartboard Accuracy App
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025Azure vs AWS  Which Cloud Platform Is Best for Your Business in 2025
Azure vs AWS Which Cloud Platform Is Best for Your Business in 2025
Infrassist Technologies Pvt. Ltd.
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
If You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FMEIf You Use Databricks, You Definitely Need FME
If You Use Databricks, You Definitely Need FME
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | BluebashMCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
MCP vs A2A vs ACP: Choosing the Right Protocol | Bluebash
Bluebash
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdfBoosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Alkin Tezuysal
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 

Mvc pattern and implementation in java fair

  • 2. Agenda • Context • Problem • Solution • What is MVC? • MVC Architecture • Common MVC Implementation • MVC Interaction Order • MVC Pattern • MVC Responsibilities • Advantages of MVC • Implementation of MVC
  • 3. CONTEXT • Interactive applications with a flexible human-computer interface
  • 4. PROBLEM DEFINITION • User interfaces are especially prone to change requests. • Different user place conflicting requirements on the user interface. • Building a system with the required flexibility is expensive and error-prone if the user interface is tightly interwoven with the functional core.
  • 5. PROBLEM DEFINITION • The following forces influence the solution – The same information is presented differently in different windows, for example, in a bar or pie chart. – The display and behavior of the application must reflect data manipulations immediately. – Changes to the user interface should be easy, and even possible at run-time. – Support different ‘look and feel’ standards or porting the user interface should not affect code in the core of the application.
  • 6. SOLUTION MVC – Model View Controller
  • 7. What is MVC? • MVC - Model-View-Controller - is a design pattern for the architecture of web applications. • It is a widely adopted pattern, across many languages and implementation frameworks, whose purpose is to achieve a clean separation between three components of most any web application.
  • 8. MVC Architecture • The Model represents the structure of the data in the application, as well as application-specific operations on those data. • The View renders the contents of a model. It specifies exactly how the model data should be presented. • The Controller translates user actions (mouse motions, keystrokes, words spoken, etc.) and user input into application function calls on the model, and selects the appropriate View based on user preferences and Model state.
  • 9. Cond… The MVC architecture divides an application (code) required to manage a user interface into three parts: • Data components maintain the raw application data and application logic for the interface –model. • Presentation components provide the visual representation(s) of the data --view (usually to the screen). • Input-processing components handle input from the user by modifying the model--controller.
  • 11. MVC Actions • Model -- Notify view about data updates • View --Change rendering as needed • Controller --Select view to be rendered based on event notifications and method invocations
  • 12. MVC Interaction Order 1. User performs action, controller is notified. 2. Controller may request changes to model. 3. Controller may tell view to update. 4. Model may notify view if it has been modified. 5. View may need to query model for current data. 6. View updates display for user. 6 4 View 5 Model 3 1 2 Controller
  • 13. MVC Pattern – Model • Contains application & its data • Provide methods to access & update data • Interface defines allowed interactions • Fixed interface enable both model & GUIs to be easily pulled out and replaced • Examples:- – Text documents – Spreadsheets – Web browser – Video games
  • 14. MVC Pattern – View  Provides visual representation of model.  Multiple views can display model at same time.  When model is updated, all its views are informed & given chance to update themselves.
  • 15. MVC Pattern – Controller • Users interact with the controller • Interprets mouse movement, keystrokes, etc. • Communicates those activities to the model • Interaction with model indirectly causes view(s) to update
  • 16. model responsibilities • store data in properties • implement application methods (e.g., ClockModel.setTime() or ClockModel.stop()) • provide methods to register/unregister views • notify views of state changes
  • 17. • view responsibilities • create interface • update interface when model changes • forward input to controller • controller responsibilities • translate user input into changes in the model • if change is purely cosmetic, update view
  • 18. Advantages of MVC  Separating Model from View (that is, separating data representation from presentation).  More robust  Easier to maintain  permits run-time selection of appropriate Views based on workflow, user preferences, or Model state.  Separating Controller from Model (application behavior from data representation)  allows configurable mapping of user actions on the Controller to application functions on the Model.
  • 19.  Easy to add multiple data presentations for the same data. • Multi-view applications (overview+detail, brushing,…) • Different users • Different UI platforms (mobile, client- side, server-side,…) • Alternate designs GUI Model GUI Model GUI
  • 20. Cond…  Facilitates adding new types of data presentation as technology develops.  Model and View components can vary independently enhancing maintainability ,extensibility, and testability.  allows user interfaces (views) to be easily added, removed, or changed  allows response to user input (controller) to be easily changed
  • 21. COND…  changes can happen dynamically at runtime  promotes code reuse (e.g., one view might be used with different models)  allows multiple developers to simultaneously update the interface, logic, or input of an application without affecting other source code.