SlideShare a Scribd company logo
1 of 27
Seminar
On
MVC
Created By
Dipika Wadhvani
What is MVC
Introduction
 Model View Controller or MVC as it is
popularly called, is a software design pattern
for developing web applications.
 MVC is one of three ASP.NET programming
models.
 Model–view–controller (MVC) is a software
architecture pattern which separates the
representation of information from the user's
interaction with it .
History of MVC
 Presented by Trygve Reenskaug in 1979
 First used in the Smalltalk-80 framework
 Used in making Apple interfaces (Lisa and Macintosh
MVC uses
Smalltalk’s MVC implementation inspired
many other GUI frameworks such as:
 The NEXTSTEP and OPENSTEP
development environments encourage the
use of MVC.
 Cocoa and GNUstep, based on these
technologies, also use MVC.
 Microsoft Foundation Classes (MFC) (also
called Document/View architecture)
 Java Swing
 The Qt Toolkit (since Qt4 Release).
Parts of MVC
 A Model View Controller pattern is made
up of the following three parts:
 Model
 View 
 Controller
The MVC model defines web
applications with 3 logic
layers:
The business layer (Model
logic)
The display layer (View logic)
The input control (Controller
logic)
Model
 The model is responsible for managing the
data of the application.
 It responds to the request from the view
and it also responds to instructions from
the controller to update itself
 It is the lowest level of the pattern which
is responsible for maintaining data.
 The Model represents the application core
(for instance a list of database records).
 It is also called the domain layer
View
 The View displays the data (the database records).
 A view requests information from the model, that it needs to generate an
output representation.
 It presents data in a particular format like JSP, ASP, PHP.
 MVC is often seen in web applications, where the view is the HTML page.
Controller
 The Controller is the part of the application that
handles user interaction.
 Typically controllers read data from a view, control user
input, and send input data to the model.
 It handles the input, typically user actions and may
invoke changes on the model and view.
Workflow in MVC
Though MVC comes in di erent flavours, theff
control flow generally works as follows:
1. The user interacts with the user interface in
some way (e.g., user presses a button)
2. A controller handles the input event from the
user interface, often via a registered handler or
callback.
3. The controller accesses the model, possibly
updating it in a way appropriate to the user’s
action (e.g., controller updates user’s shopping
cart).
4. A view uses the model to generate an appropriate user interface (e.g., view
produces a screen listing the shopping cart contents).
The view gets its own data from the model. The model has no direct
knowledge of the view.
5. The user interface waits for further user interactions, which begins the
cycle anew.
Dependence hierarchy
 There is usually a kind of hierarchy in the MVC pattern.
 The Model knows only about itself.
 That is, the source code of the Model has no references
to either the View or Controller.
 The View however, knows about the Model. It will poll the Model about
the state, to know what to display.
 That way, the View can display something that is based on what the Model
has done.
 But the View knows nothing about the Controller.
 The Controller knows about both the Model and
the View.
  Take an example from a game: If you click on
the "fire" button on the mouse, the Controller
knows what fire function in the Model to call.
 If you press the button for switching between
first and third person, the Controller knows
what function in the View to call to request the
display change.
Why dependence hierarchy is used?
 The reason to keep it this way is to minimize dependencies.
 No matter how the View class is modified, the Model will still work.
 Even if the system is moved from a desktop operating system to a smart
phone, the Model can be moved with no changes.
 But the View probably needs to be updated, as will the Controller.
Use in web applications
 Although originally developed for personal
computing, Model View Controller has been
widely adapted as an architecture for World
Wide Web applications in all major programming
languages.
 Several commercial and
noncommercial application frameworks have
been created that enforce the pattern.
 These frameworks vary in their interpretations,
mainly in the way that the MVC responsibilities
are divided between the client and server
 Early web MVC frameworks took a thin
client approach that placed almost the entire
model, view and controller logic on the
server.
 In this approach, the client sends either
hyperlink requests or form input to the
controller and then receives a complete and
updated web page from the view; the model
exists entirely on the server.
 As client technologies have matured,
frameworks such as JavaScript
MVC and Backbone have been created that
allow the MVC components to execute partly
on the client
Working of MVC in web
application
Web forms vs. MVC
 The MVC programming model is a lighter alternative to
traditional ASP.NET (Web Forms).
 It is a lightweight, highly testable framework,
integrated with all existing ASP.NET features, such as
Master Pages, Security, and Authentication.
Advantages
 Clear separation between presentation logic and
business logic.
 Each object in mvc have distinct responsibilities.
 parallel development
 easy to maintain and future enhancements
 All objects and classes are independent of each other.
Disadvantages
 Increased complexity
 Inefficiency of data access in view
 Difficulty of using MVC with modern user interface too.
 For parallel development there is a needed multiple
programmers.
 Knowledge on multiple technologies is required. 
Example
 The Observer pattern allows the BankAccount class to
notify multiple views without minimal information.
 Observers can register themselves with their Subjects.
No strings attached!
Observer Class Diagram
Observable
+addObserver(Observer)
+deleteObserver(Observer)
+notifyObservers(Object)
#hasChanged() : boolean
#setChanged()
Observer
+update(Observable,
Object)
AccountView
+update(Observable,
Object)
BankAccount
+widthdraw(double) : long
+deposit(double) : long
+getBalance() : double
SummaryView
+update(Observable,
Object)
Transactions Happen!
Controller BankAccount AccountView SummaryView
deposit()
setChanged()
notifyObservers()
update()
update()
getBalance()
getBalance()
Thank You..!!!

More Related Content

What's hot

Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCKhaled Musaied
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netSHADAB ALI
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patternsConcetto Labs
 
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...Majid Hajibaba
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC ArchitecturePrem Sanil
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.Ni
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introductionBhagath Gopinath
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETRajkumarsoy
 
Unit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxUnit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxDARKKNIGHT116809
 
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirementsHCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirementsAlan Dix
 

What's hot (20)

MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
Client & server side scripting
Client & server side scriptingClient & server side scripting
Client & server side scripting
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
 
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...
Cloud Computing Principles and Paradigms: 4 the enterprise cloud computing pa...
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Unit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptxUnit-I_part-II_Virtualization.pptx
Unit-I_part-II_Virtualization.pptx
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirementsHCI 3e - Ch 13:  Socio-organizational issues and stakeholder requirements
HCI 3e - Ch 13: Socio-organizational issues and stakeholder requirements
 

Viewers also liked (20)

ITFT- Applet in java
ITFT- Applet in javaITFT- Applet in java
ITFT- Applet in java
 
Java applet
Java appletJava applet
Java applet
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet Programs
 
Java Applet
Java AppletJava Applet
Java Applet
 
6.applet programming in java
6.applet programming in java6.applet programming in java
6.applet programming in java
 
Java swing
Java swingJava swing
Java swing
 
Applet java
Applet javaApplet java
Applet java
 
Java Swing
Java SwingJava Swing
Java Swing
 
java swing tutorial for beginners(java programming tutorials)
java swing tutorial for beginners(java programming tutorials)java swing tutorial for beginners(java programming tutorials)
java swing tutorial for beginners(java programming tutorials)
 
Java applets
Java appletsJava applets
Java applets
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
java swing
java swingjava swing
java swing
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
Java applets
Java appletsJava applets
Java applets
 
Applet progming
Applet progmingApplet progming
Applet progming
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Java Swing
Java SwingJava Swing
Java Swing
 
Swing components & MVC Architecture
Swing components & MVC ArchitectureSwing components & MVC Architecture
Swing components & MVC Architecture
 

Similar to Ppt of Basic MVC Structure

Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Jennie 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,Mobilenaral
 
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 - MVCNosheen Qamar
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxQuickwayInfoSystems3
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxQuickwayInfoSystems3
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4Pankaj Avhad
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC eldorina
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...CrimsonpublishersPRSP
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecturebitburner93
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesAaron Jacobson
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9AHM Pervej Kabir
 

Similar to Ppt of Basic MVC Structure (20)

Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
 
Mvc
MvcMvc
Mvc
 
IntroductionToMVC
IntroductionToMVCIntroductionToMVC
IntroductionToMVC
 
MVC in PHP
MVC in PHPMVC in PHP
MVC in PHP
 
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
 
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)
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
MVC
MVCMVC
MVC
 
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
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
MVC
MVCMVC
MVC
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
 
Code Camp 06 Model View Presenter Architecture
Code Camp 06   Model View Presenter ArchitectureCode Camp 06   Model View Presenter Architecture
Code Camp 06 Model View Presenter Architecture
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Ppt of Basic MVC Structure

  • 3. Introduction  Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications.  MVC is one of three ASP.NET programming models.  Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user's interaction with it .
  • 4. History of MVC  Presented by Trygve Reenskaug in 1979  First used in the Smalltalk-80 framework  Used in making Apple interfaces (Lisa and Macintosh
  • 5. MVC uses Smalltalk’s MVC implementation inspired many other GUI frameworks such as:  The NEXTSTEP and OPENSTEP development environments encourage the use of MVC.  Cocoa and GNUstep, based on these technologies, also use MVC.  Microsoft Foundation Classes (MFC) (also called Document/View architecture)  Java Swing  The Qt Toolkit (since Qt4 Release).
  • 6. Parts of MVC  A Model View Controller pattern is made up of the following three parts:  Model  View   Controller
  • 7. The MVC model defines web applications with 3 logic layers: The business layer (Model logic) The display layer (View logic) The input control (Controller logic)
  • 8.
  • 9. Model  The model is responsible for managing the data of the application.  It responds to the request from the view and it also responds to instructions from the controller to update itself  It is the lowest level of the pattern which is responsible for maintaining data.  The Model represents the application core (for instance a list of database records).  It is also called the domain layer
  • 10. View  The View displays the data (the database records).  A view requests information from the model, that it needs to generate an output representation.  It presents data in a particular format like JSP, ASP, PHP.  MVC is often seen in web applications, where the view is the HTML page.
  • 11. Controller  The Controller is the part of the application that handles user interaction.  Typically controllers read data from a view, control user input, and send input data to the model.  It handles the input, typically user actions and may invoke changes on the model and view.
  • 12. Workflow in MVC Though MVC comes in di erent flavours, theff control flow generally works as follows: 1. The user interacts with the user interface in some way (e.g., user presses a button) 2. A controller handles the input event from the user interface, often via a registered handler or callback. 3. The controller accesses the model, possibly updating it in a way appropriate to the user’s action (e.g., controller updates user’s shopping cart).
  • 13. 4. A view uses the model to generate an appropriate user interface (e.g., view produces a screen listing the shopping cart contents). The view gets its own data from the model. The model has no direct knowledge of the view. 5. The user interface waits for further user interactions, which begins the cycle anew.
  • 14. Dependence hierarchy  There is usually a kind of hierarchy in the MVC pattern.  The Model knows only about itself.  That is, the source code of the Model has no references to either the View or Controller.
  • 15.  The View however, knows about the Model. It will poll the Model about the state, to know what to display.  That way, the View can display something that is based on what the Model has done.  But the View knows nothing about the Controller.
  • 16.  The Controller knows about both the Model and the View.   Take an example from a game: If you click on the "fire" button on the mouse, the Controller knows what fire function in the Model to call.  If you press the button for switching between first and third person, the Controller knows what function in the View to call to request the display change.
  • 17. Why dependence hierarchy is used?  The reason to keep it this way is to minimize dependencies.  No matter how the View class is modified, the Model will still work.  Even if the system is moved from a desktop operating system to a smart phone, the Model can be moved with no changes.  But the View probably needs to be updated, as will the Controller.
  • 18. Use in web applications  Although originally developed for personal computing, Model View Controller has been widely adapted as an architecture for World Wide Web applications in all major programming languages.  Several commercial and noncommercial application frameworks have been created that enforce the pattern.  These frameworks vary in their interpretations, mainly in the way that the MVC responsibilities are divided between the client and server
  • 19.  Early web MVC frameworks took a thin client approach that placed almost the entire model, view and controller logic on the server.  In this approach, the client sends either hyperlink requests or form input to the controller and then receives a complete and updated web page from the view; the model exists entirely on the server.  As client technologies have matured, frameworks such as JavaScript MVC and Backbone have been created that allow the MVC components to execute partly on the client
  • 20. Working of MVC in web application
  • 21. Web forms vs. MVC  The MVC programming model is a lighter alternative to traditional ASP.NET (Web Forms).  It is a lightweight, highly testable framework, integrated with all existing ASP.NET features, such as Master Pages, Security, and Authentication.
  • 22. Advantages  Clear separation between presentation logic and business logic.  Each object in mvc have distinct responsibilities.  parallel development  easy to maintain and future enhancements  All objects and classes are independent of each other.
  • 23. Disadvantages  Increased complexity  Inefficiency of data access in view  Difficulty of using MVC with modern user interface too.  For parallel development there is a needed multiple programmers.  Knowledge on multiple technologies is required. 
  • 24. Example  The Observer pattern allows the BankAccount class to notify multiple views without minimal information.  Observers can register themselves with their Subjects. No strings attached!
  • 25. Observer Class Diagram Observable +addObserver(Observer) +deleteObserver(Observer) +notifyObservers(Object) #hasChanged() : boolean #setChanged() Observer +update(Observable, Object) AccountView +update(Observable, Object) BankAccount +widthdraw(double) : long +deposit(double) : long +getBalance() : double SummaryView +update(Observable, Object)
  • 26. Transactions Happen! Controller BankAccount AccountView SummaryView deposit() setChanged() notifyObservers() update() update() getBalance() getBalance()