Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers

Similar presentations


Presentation on theme: "PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers"— Presentation transcript:

1 PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers
Software University © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

2 Questions sli.do #PHPMVC

3 Course Objectives & Program
PHP MVC Frameworks Course Objectives & Program © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

4 Pipeline HTTP Request GET /users/register HTTP/1.1 Host: www.site.com
Prepares Request Objects Mod Rewrite Web Server Transfers control to script index.php

5 Knows everything about the HTTP Request via $_SERVER and $_REQUEST
Pipeline (2) index.php Knows everything about the HTTP Request via $_SERVER and $_REQUEST Decides which class->method by using the Request URI Instantiates dependencies Passes GET as arguments Fills data from FORMs into Object arguments

6 Pipeline (3) GET /users/register HTTP/1.1 Host: www.site.com
Dependency public function register (ViewInterface $view) { return $view->render(); }

7 Pipeline (4) POST /users/register HTTP/1.1 Host: www.site.com
public function registerProcess ( UserServiceInterface $service, ResponseInterface $response, RegisterBindingModel $model) { $service->add($model->name, $model->pass); return $response->redirect("login"); } Dependencies Dependencies Form Data

8 Pipeline (5) POST /articles/edit/4 HTTP/1.1 Host: www.site.com
GET Params public function editArticleProcess (int $id, ArticleServiceInterface $service, ResponseInterface $response, EditArticleBindingModel $model) { $service->editById($id, $model->…); return $response->redirect("viewAll"); } Dependencies Dependencies Form Data

9 PHP MVC Frameworks – MVC Fundamentals
© Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

10 License This course (slides, examples, demos, videos, homework, etc.) is licensed under the "Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International" license Attribution: this work may contain portions from “PHP/MySQL" course by SoftUni under CC-BY-NC-SA license © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.

11 Free Trainings @ Software University
Software University Foundation – softuni.org Software University – High-Quality Education, Profession and Job for Software Developers softuni.bg Software Facebook facebook.com/SoftwareUniversity Software YouTube youtube.com/SoftwareUniversity Software University Forums – forum.softuni.bg © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license.


Download ppt "PHP MVC Frameworks MVC Fundamentals SoftUni Team Technical Trainers"

Similar presentations


Ads by Google