{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

WDD_lec_40 - MVC Model 2 Architecture AddressBook case...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
MVC Model 2 Architecture & AddressBook case study Lec - 40
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Last Lecture Review
Image of page 2
Page-Centric Approach database Web-app = collection of JSPs request response JSP JSP + easy to get started (and carried away) - code is a mixture of presentation, business & data access logic: a maintenance nightmare - won’t scale - lots of duplication Credit: Java E-commerce – Martin Cooke
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Page-with-Bean Approach (MVC Model 1) database Web-app = collection of JSPs + beans request response JSP JSP + factors some of the business logic into beans - insufficient separation of logics bean Credit: Java E-commerce – Martin Cooke
Image of page 4
MVC Model 2 Architecture
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
MVC Model 2 Architecture Introduces a Controller Centralizes logic for Dispatching Requests to the next view based on: The Request URL Input Parameters Application state Single Point of Control For security & logging Encapsulates Incoming Data Into a form usable by the back-end MVC model.
Image of page 6
MVC Model 2 Credit: www.javapassion.com
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Program Flow (Page with-Bean approach) addperson .jsp saveperson .jsp showperson .jsp PersonInfo PersonDAO JavaBeans uses uses addbookerror .jsp exception searchperson .jsp
Image of page 8
addperson .jsp saveperson .jsp showperson .jsp PersonInfo PersonDAO
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}