Download presentation
Presentation is loading. Please wait.
1
MVC – Model View Controller
MIS 3502 Jeremy Shafer Department of MIS Fox School of Business Temple University
2
Roadmap We are here. Part 2 JavaScript jQuery Part 1 MVC PDO Bootstrap
Ajax, JSON APIs
5
Things that make me think of MVC
6
The MVC pattern The Controller: Act like a traffic cop… receive user input and decide what to do.
7
The MVC pattern The Model: talk to the database.
8
The MVC pattern The View: specifies what the user can see.
9
The MVC pattern SANITY CHECK! – In which of the above would you expect to see code that uses PDO syntax?
10
The MVC pattern SANITY CHECK! – In which of the above would you expect to see a lot of HTML?
11
The MVC pattern SANITY CHECK! – In which of the above would you expect to see a lot of if / else statements?
13
What about functions?
14
function function_name([parameter_list]) {
// statements that are executed by the function return $some_result; }
21
Build a request response (with include)
Here’s a good rule of thumb. Use include and exit within an application folder. Use header and exit to bounce the user from one application folder to another. Build a request response (with include) Redirect a request (with header) So… how do I know when to do one, or the other???
22
Let’s look at an example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.