Presentation is loading. Please wait.

Presentation is loading. Please wait.

MVC – Model View Controller

Similar presentations


Presentation on theme: "MVC – Model View Controller"— Presentation transcript:

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

3

4

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?

12

13 What about functions?

14 function function_name([parameter_list]) {
// statements that are executed by the function return $some_result; }

15

16

17

18

19

20

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


Download ppt "MVC – Model View Controller"

Similar presentations


Ads by Google