SlideShare uma empresa Scribd logo
1 de 23
Slide 1 of 23
MVC
Slide 2 of 23
Overview
 MVC Pattern
 Relationship between components
 Logical Layer in Web Application
– Model
– View
– Controller
 Evolution of MVC Architecture
 NO MVC
 MVC Model – I
– Advantages and Limitations of MVC Model - I
 MVC Model – II
– Advantages and Limitations of MVC Model - II
Slide 3 of 23
MVC Pattern
 Design Pattern
– Designing a reusable software is a difficult task
– A Design pattern helps in reusable software
 MVC [Model-View-Controller]
– Main concern of MVC is to separate the data
(model) and the user interface (view)
– Separation is achieved by introducing an
controller component
– Controller defines as how the user interface
should react to a user input
Slide 4 of 23
What is MVC?
User
Controller
Model
View
Slide 5 of 23
Relationship between Components
 View and Controller
– Controller is responsible for creating or selecting view
 Model and View
– View depends on Model
– If a change is made to the model then there might be
required to make parallel changes in the view
 Model and Controller
– Controller depends on model
– If a change is made to the model then there might be
required to make parallel changes in the Controller
Slide 6 of 23
Logical Layers in Web Application
 Model [Business Process Layer]
 View [Presentation Layer]
 Controller [Control Layer]
Slide 6 of 20
Slide 7 of 23
Model
 Models data and behavior behind business
process
 Manages Information - If Changes
 Contains data and Related Functionality
 Maps Real-World Entities
 Performing DB Queries
 Calculating Business Process
 Encapsulates Domain Logic which are
independent of Presentation
Slide 8 of 23
View
 Obtains data from model & presents to the
user
 Represents Output/Input of the application
 Display results of Business Logic
 Free Access to Model
 Reads Data from Model – Using Query
Methods
Slide 9 of 23
Controller
 Serves logical connection between user’s interaction
and the business process
 It receives and Translates input to request on model
or view
 Input from user and instructs the model and view to
perform action
 Responsible for making decision among multiple
presentation
 Maps the end-user action to the application
response
Slide 10 of 23
Evolution of MVC Architecture
 NO MVC
 MVC Model 1 [Page-centric] – JSP Model 1
 MVC Model 2 [Servlet-centric] – JSP Model 2
Slide 11 of 23
NO MVC
NO MVC Model 1 Architecture
Slide 12 of 23
MVC Model-I
Slide 13 of 23
MVC Model - I
 Composed of a series of interrelated JSP pages
 JSP pages handle all aspects of the application like
presentation, control, and business process
 Business process logic and control decisions are hard
coded inside JSP pages
 Next page selection is determined by hyperlink or
action of submitting a form
– <a href=“find.jsp”> Search </a>
– <form action=“find.jsp”> … </form>
Slide 14 of 23
MVC Model - I
Slide 14 of 20
Page-centric catalog application
Slide 15 of 23
MVC Model - I
Slide 15 of 20
Page-centric Scenario
Slide 16 of 23
MVC Model - I
 Advantages
– Lightweight design – for small, static application
– Suitable for small application having very simple page
flow, little need for centralized security control/logging
– Separation of presentation from content
 Limitations
– Navigation Problem – to change name of JSP file have to
change in many location
– Difficult to maintain an application – large java code being
embedded in JSP page
– Not Suitable for large and complex application
Slide 17 of 23
MVC Model - II
Slide 18 of 23
MVC Model - II
 Use Servlet and JSP together (Model 2)
 JSP pages are used only for presentation
 Servlet handles initial request, partially process the
data, set up beans, then forward the results to one
of a number of different JSP pages
 Servlet serves as a gatekeeper
– Provides common services, such as authentication
authorization, login, error handling, and etc
 Servlet serves as a central controller
– Act as a state machine or an event dispatcher to decide
upon the appropriate logic to handle the request
Slide 19 of 23
MVC Model - II
Servlet-centric Scenario
Slide 20 of 23
MVC Model - II
 Advantages
– Easier to build, maintain and Extend
– Single point of control (Servlet) for security &
logging
 Limitations
– Increase Design Complexity
Slide 21 of 23
Model1 and Model2 Comparison
Slide 22 of 23
Example
Slide 23 of 23
Summary
 MVC Pattern
 Relationship between components
 Logical Layer in Web Application
– Model
– View
– Controller
 Evolution of MVC Architecture
 NO MVC
 MVC Model – I
– Advantages and Limitations of MVC Model - I
 MVC Model – II
– Advantages and Limitations of MVC Model - II

Mais conteúdo relacionado

Mais procurados

MVC for Desktop Application - Part 2
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2晟 沈
 
MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3晟 沈
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1晟 沈
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architectureravindraquicsolv
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
Java Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component TutorialJava Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component TutorialSagun Dhakhwa
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 

Mais procurados (20)

MVC for Desktop Application - Part 2
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
MVC
MVCMVC
MVC
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Java server faces
Java server facesJava server faces
Java server faces
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 
MVC
MVCMVC
MVC
 
Java Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component TutorialJava Swing Custom GUI MVC Component Tutorial
Java Swing Custom GUI MVC Component Tutorial
 
Jsp with mvc
Jsp with mvcJsp with mvc
Jsp with mvc
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
Intro ASP MVC
Intro ASP MVCIntro ASP MVC
Intro ASP MVC
 
ASp.net Mvc 5
ASp.net Mvc 5ASp.net Mvc 5
ASp.net Mvc 5
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
MVVM - KnockoutJS
MVVM - KnockoutJSMVVM - KnockoutJS
MVVM - KnockoutJS
 

Destaque

Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webBài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webMasterCode.vn
 
Mô hình MVC trong lập trình web với Java
Mô hình MVC trong lập trình web với JavaMô hình MVC trong lập trình web với Java
Mô hình MVC trong lập trình web với JavaHuy Vũ
 
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webBài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webMasterCode.vn
 
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theo
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theoBài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theo
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theoMasterCode.vn
 
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp  - Giáo trình Bách Khoa AptechSession 5 : intro to jsp  - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp - Giáo trình Bách Khoa AptechMasterCode.vn
 
Session 2 servlet context and session tracking - Giáo trình Bách Khoa Aptech
Session 2   servlet context and session tracking - Giáo trình Bách Khoa AptechSession 2   servlet context and session tracking - Giáo trình Bách Khoa Aptech
Session 2 servlet context and session tracking - Giáo trình Bách Khoa AptechMasterCode.vn
 
Session 7 : jstl - Giáo trình Bách Khoa Aptech
Session 7 : jstl  - Giáo trình Bách Khoa AptechSession 7 : jstl  - Giáo trình Bách Khoa Aptech
Session 7 : jstl - Giáo trình Bách Khoa AptechMasterCode.vn
 
Gioi thieu website 123 mua
Gioi thieu website 123 muaGioi thieu website 123 mua
Gioi thieu website 123 muanghiatm2806
 
Bài thuyết trình Thương mại điện tử
Bài thuyết trình Thương mại điện tửBài thuyết trình Thương mại điện tử
Bài thuyết trình Thương mại điện tửlilyrosier
 
Dự án bán hàng điện tử online
Dự án bán hàng điện tử onlineDự án bán hàng điện tử online
Dự án bán hàng điện tử onlineHai Hoang
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PMNguyễn Anh
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar PresantationAbhishek Yadav
 
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...MasterCode.vn
 
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theo
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theoBài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theo
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theoMasterCode.vn
 

Destaque (20)

Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng webBài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
Bài 1 Lập trình website theo mô hình MVC - Xây dựng ứng dụng web
 
Mô hình MVC trong lập trình web với Java
Mô hình MVC trong lập trình web với JavaMô hình MVC trong lập trình web với Java
Mô hình MVC trong lập trình web với Java
 
Mô Hình MVC 3.0
Mô Hình MVC 3.0Mô Hình MVC 3.0
Mô Hình MVC 3.0
 
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng webBài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
Bài 2 Các kỹ thuật lập trình MySQL với PHP nâng cao - Xây dựng ứng dụng web
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theo
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theoBài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theo
Bài 1: Làm quen với ASP.NET - Giáo trình FPT - Có ví dụ kèm theo
 
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp  - Giáo trình Bách Khoa AptechSession 5 : intro to jsp  - Giáo trình Bách Khoa Aptech
Session 5 : intro to jsp - Giáo trình Bách Khoa Aptech
 
Session 2 servlet context and session tracking - Giáo trình Bách Khoa Aptech
Session 2   servlet context and session tracking - Giáo trình Bách Khoa AptechSession 2   servlet context and session tracking - Giáo trình Bách Khoa Aptech
Session 2 servlet context and session tracking - Giáo trình Bách Khoa Aptech
 
Session 7 : jstl - Giáo trình Bách Khoa Aptech
Session 7 : jstl  - Giáo trình Bách Khoa AptechSession 7 : jstl  - Giáo trình Bách Khoa Aptech
Session 7 : jstl - Giáo trình Bách Khoa Aptech
 
Jsp java bean
Jsp   java beanJsp   java bean
Jsp java bean
 
Gioi thieu website 123 mua
Gioi thieu website 123 muaGioi thieu website 123 mua
Gioi thieu website 123 mua
 
Bài thuyết trình Thương mại điện tử
Bài thuyết trình Thương mại điện tửBài thuyết trình Thương mại điện tử
Bài thuyết trình Thương mại điện tử
 
Mvc Model
Mvc ModelMvc Model
Mvc Model
 
Dự án bán hàng điện tử online
Dự án bán hàng điện tử onlineDự án bán hàng điện tử online
Dự án bán hàng điện tử online
 
Lập trình PHP và MySQL
Lập trình PHP và MySQLLập trình PHP và MySQL
Lập trình PHP và MySQL
 
Slide đồ án kiểm thử PM
Slide đồ án kiểm thử PMSlide đồ án kiểm thử PM
Slide đồ án kiểm thử PM
 
Web301 slide 1
Web301   slide 1Web301   slide 1
Web301 slide 1
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...
Bài 7: Đối tượng Data Source -Đóng gói ứng dụng - Giới thiệu các kĩ thuật lập...
 
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theo
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theoBài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theo
Bài 4: Template & điều hướng trang Web - Giáo trình FPT - Có ví dụ kèm theo
 

Semelhante a Session 5 : mvc - Giáo trình Bách Khoa Aptech

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 WorkingIRJET Journal
 
#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQueryiloveigloo
 
Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP DevelopersEdureka!
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC StructureDipika Wadhvani
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring FrameworkEdureka!
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: AndroidJitendra Kumar
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patternsalkuzaee
 
IRJET- A Study Focused on Web Application Development using MVC Design Pa...
IRJET-  	  A Study Focused on Web Application Development using MVC Design Pa...IRJET-  	  A Study Focused on Web Application Development using MVC Design Pa...
IRJET- A Study Focused on Web Application Development using MVC Design Pa...IRJET Journal
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMMudasir Qazi
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4Pankaj Avhad
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxGodwin Monserate
 
A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentIAEME Publication
 
Smart Client Software Factory 2010
Smart Client Software Factory  2010Smart Client Software Factory  2010
Smart Client Software Factory 2010Tomy Ismail
 

Semelhante a Session 5 : mvc - Giáo trình Bách Khoa Aptech (20)

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
 
#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery
 
Ios models
Ios modelsIos models
Ios models
 
Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
Mvc
MvcMvc
Mvc
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring Framework
 
Ria Mvc
Ria MvcRia Mvc
Ria Mvc
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
IRJET- A Study Focused on Web Application Development using MVC Design Pa...
IRJET-  	  A Study Focused on Web Application Development using MVC Design Pa...IRJET-  	  A Study Focused on Web Application Development using MVC Design Pa...
IRJET- A Study Focused on Web Application Development using MVC Design Pa...
 
Lec 4.ppt
Lec 4.pptLec 4.ppt
Lec 4.ppt
 
L17 Presentation Layer Design
L17 Presentation Layer DesignL17 Presentation Layer Design
L17 Presentation Layer Design
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
MVC in PHP
MVC in PHPMVC in PHP
MVC in PHP
 
Model View Controller ext4
Model View Controller  ext4Model View Controller  ext4
Model View Controller ext4
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptx
 
A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application development
 
Smart Client Software Factory 2010
Smart Client Software Factory  2010Smart Client Software Factory  2010
Smart Client Software Factory 2010
 

Mais de MasterCode.vn

Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnPd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnMasterCode.vn
 
Why apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnWhy apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnMasterCode.vn
 
Dzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnDzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnMasterCode.vn
 
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnGoogle công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnMasterCode.vn
 
Nghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnNghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnMasterCode.vn
 
Lập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnLập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnMasterCode.vn
 
Pd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnPd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnMasterCode.vn
 
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnPd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnMasterCode.vn
 
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnPdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnMasterCode.vn
 
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnPd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnMasterCode.vn
 
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnPd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnMasterCode.vn
 
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnPd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnMasterCode.vn
 
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnPdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnMasterCode.vn
 
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vnPdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vnPdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vnPdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vnPdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vnPdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vnPdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vnPdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vnMasterCode.vn
 

Mais de MasterCode.vn (20)

Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vnPd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
Pd ftai lieu-tieng-anh-cho-nguoi-moi-bat-dau-mastercode.vn
 
Why apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vnWhy apps-succeed-wpr-mastercode.vn
Why apps-succeed-wpr-mastercode.vn
 
Dzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vnDzone performancemonitoring2016-mastercode.vn
Dzone performancemonitoring2016-mastercode.vn
 
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vnGoogle công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
Google công bố thông tin lịch xu hướng ngành 2017 mastercode.vn
 
Nghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vnNghiên cứu về khách hàng mastercode.vn
Nghiên cứu về khách hàng mastercode.vn
 
Lập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vnLập trình sáng tạo creative computing textbook mastercode.vn
Lập trình sáng tạo creative computing textbook mastercode.vn
 
Pd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vnPd fbuoi7 8--tongquanseo-mastercode.vn
Pd fbuoi7 8--tongquanseo-mastercode.vn
 
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vnPd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
Pd fbuoi5 6-ảnh hưởng của social media tới kết quả seo-mastercode.vn
 
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vnPdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
Pdf buoi3 4-link-building-tran-ngoc-chinh-mastercode.vn
 
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vnPd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
Pd fbuoi3 4-kỹ thuật xây dựng back link-mastercode.vn
 
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vnPd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
Pd fbuoi2 onpage – tối ưu hóa trang web-mastercode.vn
 
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vnPd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
Pd fbuoi1 giới thiệu seo tools cơ bản-seo manager + seo guy-mastercode.vn
 
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vnPdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
Pdf buoi1 2-on-page-tran-ngoc-chinh-mastercode.vn
 
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vnPdfbài 7 máy tính xác tay và máy in   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 7 máy tính xác tay và máy in bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vnPdfbài 6 bảo trì máy tính   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 6 bảo trì máy tính bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vnPdfbài 5 bảo trì và tối ưu windows   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 5 bảo trì và tối ưu windows bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vnPdfbài 4 ổ cứng hard drive   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 4 ổ cứng hard drive bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vnPdfbài 3 cpu và ram   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 3 cpu và ram bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vnPdfbài 1 giới thiệu chung về phần cứng   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 1 giới thiệu chung về phần cứng bảo trì sự cố máy tính-mastercode.vn
 
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vnPdfbài 2 bo mạch chủ (main)   bảo trì sự cố máy tính-mastercode.vn
Pdfbài 2 bo mạch chủ (main) bảo trì sự cố máy tính-mastercode.vn
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Session 5 : mvc - Giáo trình Bách Khoa Aptech

  • 1. Slide 1 of 23 MVC
  • 2. Slide 2 of 23 Overview  MVC Pattern  Relationship between components  Logical Layer in Web Application – Model – View – Controller  Evolution of MVC Architecture  NO MVC  MVC Model – I – Advantages and Limitations of MVC Model - I  MVC Model – II – Advantages and Limitations of MVC Model - II
  • 3. Slide 3 of 23 MVC Pattern  Design Pattern – Designing a reusable software is a difficult task – A Design pattern helps in reusable software  MVC [Model-View-Controller] – Main concern of MVC is to separate the data (model) and the user interface (view) – Separation is achieved by introducing an controller component – Controller defines as how the user interface should react to a user input
  • 4. Slide 4 of 23 What is MVC? User Controller Model View
  • 5. Slide 5 of 23 Relationship between Components  View and Controller – Controller is responsible for creating or selecting view  Model and View – View depends on Model – If a change is made to the model then there might be required to make parallel changes in the view  Model and Controller – Controller depends on model – If a change is made to the model then there might be required to make parallel changes in the Controller
  • 6. Slide 6 of 23 Logical Layers in Web Application  Model [Business Process Layer]  View [Presentation Layer]  Controller [Control Layer] Slide 6 of 20
  • 7. Slide 7 of 23 Model  Models data and behavior behind business process  Manages Information - If Changes  Contains data and Related Functionality  Maps Real-World Entities  Performing DB Queries  Calculating Business Process  Encapsulates Domain Logic which are independent of Presentation
  • 8. Slide 8 of 23 View  Obtains data from model & presents to the user  Represents Output/Input of the application  Display results of Business Logic  Free Access to Model  Reads Data from Model – Using Query Methods
  • 9. Slide 9 of 23 Controller  Serves logical connection between user’s interaction and the business process  It receives and Translates input to request on model or view  Input from user and instructs the model and view to perform action  Responsible for making decision among multiple presentation  Maps the end-user action to the application response
  • 10. Slide 10 of 23 Evolution of MVC Architecture  NO MVC  MVC Model 1 [Page-centric] – JSP Model 1  MVC Model 2 [Servlet-centric] – JSP Model 2
  • 11. Slide 11 of 23 NO MVC NO MVC Model 1 Architecture
  • 12. Slide 12 of 23 MVC Model-I
  • 13. Slide 13 of 23 MVC Model - I  Composed of a series of interrelated JSP pages  JSP pages handle all aspects of the application like presentation, control, and business process  Business process logic and control decisions are hard coded inside JSP pages  Next page selection is determined by hyperlink or action of submitting a form – <a href=“find.jsp”> Search </a> – <form action=“find.jsp”> … </form>
  • 14. Slide 14 of 23 MVC Model - I Slide 14 of 20 Page-centric catalog application
  • 15. Slide 15 of 23 MVC Model - I Slide 15 of 20 Page-centric Scenario
  • 16. Slide 16 of 23 MVC Model - I  Advantages – Lightweight design – for small, static application – Suitable for small application having very simple page flow, little need for centralized security control/logging – Separation of presentation from content  Limitations – Navigation Problem – to change name of JSP file have to change in many location – Difficult to maintain an application – large java code being embedded in JSP page – Not Suitable for large and complex application
  • 17. Slide 17 of 23 MVC Model - II
  • 18. Slide 18 of 23 MVC Model - II  Use Servlet and JSP together (Model 2)  JSP pages are used only for presentation  Servlet handles initial request, partially process the data, set up beans, then forward the results to one of a number of different JSP pages  Servlet serves as a gatekeeper – Provides common services, such as authentication authorization, login, error handling, and etc  Servlet serves as a central controller – Act as a state machine or an event dispatcher to decide upon the appropriate logic to handle the request
  • 19. Slide 19 of 23 MVC Model - II Servlet-centric Scenario
  • 20. Slide 20 of 23 MVC Model - II  Advantages – Easier to build, maintain and Extend – Single point of control (Servlet) for security & logging  Limitations – Increase Design Complexity
  • 21. Slide 21 of 23 Model1 and Model2 Comparison
  • 22. Slide 22 of 23 Example
  • 23. Slide 23 of 23 Summary  MVC Pattern  Relationship between components  Logical Layer in Web Application – Model – View – Controller  Evolution of MVC Architecture  NO MVC  MVC Model – I – Advantages and Limitations of MVC Model - I  MVC Model – II – Advantages and Limitations of MVC Model - II