10
Pemrograman Web MVC Programming and Design Pattern in PHP 5

Pemrograman Web

  • Upload
    ernst

  • View
    24

  • Download
    1

Embed Size (px)

DESCRIPTION

Pemrograman Web. MVC Programming and Design Pattern in PHP 5. Pre-MVC Exercise. Implements the class diagram in PHP If possible, store all properties on MySQL database Create a Unit Test script to test all implemented methods and attibutes (properties) . MVC Design Patterns. - PowerPoint PPT Presentation

Citation preview

Page 1: Pemrograman Web

Pemrograman Web

MVC Programming and Design Pattern in PHP 5

Page 2: Pemrograman Web

Pre-MVC Exercise Implements the class

diagram in PHP If possible, store all

properties on MySQL database

Create a Unit Test script to test all implemented methods and attibutes (properties).

Page 3: Pemrograman Web

MVC Design PatternsModel–View–Controller (MVC) is an architecture that separates the representation of information from the user's interaction logic and data processing with it.

Controller Model

View

HTTP Request

HTTP Response

DB

Page 4: Pemrograman Web

PHP & MVC The model view controller pattern is the most

used pattern for today’s world web applications

It has been used for the first time in Smalltalk and then adopted and popularized by Java

At present there are more than a dozen PHP web frameworks based on MVC pattern CodeIgniter, Yii, Kohana, etc. Also you may create your own PHP MVC

framework!

Page 5: Pemrograman Web

PHP & MVC The model is responsible to manage the data The view (presentation) is responsible to

display the data provided by the model in a specific format

The controller handles the model and view layers to work together

Page 6: Pemrograman Web

PHP MVC Sequence Diagram

Page 7: Pemrograman Web

Exercise

Implements CRUD-MVC for Bebek Class in PHP

Page 8: Pemrograman Web
Page 9: Pemrograman Web

Home Work Implements previous class diagram in PHP

and MySQL Create a Unit Test script to test all

implemented methods and attibutes (properties).

If the attributes of all kind of vehicle are stored in a single table in a database, implements the Unit Test in an MVC design pattern.

Page 10: Pemrograman Web

Questions?