php course 9

25
Date : 3/04/2014 Web Technology Solutions Class: PHP Web Application Frameworks

Upload: t

Post on 16-Feb-2016

219 views

Category:

Documents


0 download

DESCRIPTION

php course

TRANSCRIPT

Page 1: Php Course 9

Date : 3/04/2014

Web Technology SolutionsClass: PHP Web Application Frameworks

Page 2: Php Course 9

Tonight✤ Final Review

✤ Intro to PHP Frameworks

✤ Sample CakePHP App

✤ Lab

Page 3: Php Course 9

Lab Preview

✤ Application Development

✤ Registration Feature

✤ Login\Logout

✤ Maintain State

✤ CRUD

✤ Publish XML and RSS

Page 4: Php Course 9

The Final Project

Page 5: Php Course 9

Final Project Details

✤ What is it? A Web App

✤ Use custom HTML, CSS, JS and PHP

✤ MySQL DB provided for you.

Page 6: Php Course 9

Final Project Details

✤ What are the deliverables due at the end of the course?

✤ The Final Project Report

✤ Final Project Code Documentation

✤ Functional Web Application

Page 7: Php Course 9

Final Project Report

✤ An intro paragraph describing your app.

✤ one page summary describing lessons learned during design\development phases

✤ one-two page commentary on effectiveness of agile development and the prototype process.

Page 8: Php Course 9

Final Project Documentation

✤ Requirements Document

✤ Interaction Design Document

✤ Application Architecture Drawing

Page 9: Php Course 9

Final Project Documentation

✤ Requirements Document

✤ document that details the functionality of your app.

✤ Features Described. Cause and Effect plus expected outcomes from user interaction.

Page 10: Php Course 9

Final Project Documentation

✤ Interaction Design Doc

✤ Wireframes

✤ Interaction Flow Model

Page 11: Php Course 9

Final Project Documentation

✤ Application Architecture Drawing

✤ Show your application stack \ tiers

Page 12: Php Course 9

Final Project Review

✤ Final Project - Web App (link)

✤ registration feature

✤ login logout

✤ admin ability to create\read\update\delete (CRUD)

✤ Maintain State throughout app (cookies\sessions)

✤ XML and RSS feeds

✤ Valid XHTML and CSS design

Page 13: Php Course 9

Final Project Review

✤ Final Project - Web App (link)

✤ registration feature (week 6)

✤ login logout (week 7)

✤ admin ability to create\read\update\delete (CRUD) (week 4-5)

✤ Maintain State throughout app (cookies\sessions) (week 7)

✤ XML and RSS feeds (week 8)

✤ Valid XHTML and CSS design

Page 14: Php Course 9

Presentation

✤ This mirrors real world client reviews, especially in agile.

✤ Make sure your application is working ahead of time.

✤ Stand in front of class and walk us thru what your app does.

✤ Demo each requirement.

✤ If there is a bug, try to skip over it.

Page 15: Php Course 9

PHP FRAMEWORKS

Page 16: Php Course 9

PHP Frameworks

✤ What is a framework?✤ code that helps you write apps faster.✤ defines a rigid development workflow✤ implies that you code to a standard✤ supplies helpers to aid in rapid development

Page 17: Php Course 9

PHP Frameworks✤ What makes a good framework?

✤ well over 20 style of PHP frameworks (much to choose from)✤ must be easy to learn✤ simple to use✤ intuitive to work with✤ easy to extend and modify (must be stable)✤ aid in rapid development and maintenance.✤ must have a dev community

Page 18: Php Course 9

PHP Frameworks✤ 10. WACT (component toolkit)✤ 9. Seagull✤ 8. Prado ✤ 7. PHPDevShell✤ 6. Zend Framework ✤ 5. CodeIgniter✤ 4. Symfony✤ 3. Yii✤ 2. Kohana ✤ 1. CakePHP

Page 19: Php Course 9

PHP Frameworks✤ 10. WACT (component toolkit)✤ 9. Seagull✤ 8. Prado ✤ 7. Laravel (really recommend)✤ 6. Zend Framework (recommend)✤ 5. CodeIgniter (recommend)✤ 4. Symfony (recommend)✤ 3. Yii (recommend)✤ 2. Kohana (recommend)✤ 1. CakePHP (recommend)

Page 20: Php Course 9

Why Use One?✤ Active, friendly community

✤ Flexible licensing

✤ Compatible with versions PHP 5.2.6 and greater.

✤ Integrated CRUD for database interaction.

✤ Application scaffolding.

✤ Code generation.

✤ MVC architecture.

✤ Request dispatcher with clean, custom URLs and routes.

✤ Built-in validation.

✤ Fast and flexible templating (PHP syntax, with helpers).

✤ View Helpers for AJAX, JavaScript, HTML Forms and more.

✤ Email, Cookie, Security, Session, and Request Handling Components.

✤ Flexible ACL.

✤ Data Sanitization.

✤ Flexible Caching.

✤ Localization.

✤ Works from any web site directory, with little to no Apache configuration involved.

✤ Fast and flexible templating (PHP syntax, with helpers).View Helpers for AJAX, JavaScript, HTML Forms and more.Email, Cookie, Security, Session, and Request Handling Components.Flexible ACL.Data Sanitization.Flexible Caching.Localization.Works from any web site directory, with little to no Apache configuration involved.

Page 21: Php Course 9

MVC✤ A software design pattern that allows

separation of data (model) and the user interface (view).

✤ Model (Data Layer)

✤ database logic. data wrappers. security.

✤ View (user interface)

✤ Renders the model into a form suitable for interaction, typically a user interface element

✤ Controller (manages interactions)

✤ Processes and responds to events, typically user actions, and may invoke changes on the model.

Page 22: Php Course 9

CakePHP✤ Some of the things Cake does so you don’t have to:

✤ eases creation of standard content management functionality (adding, editing and deleting)

✤ uses template-like Layouts and Views to separate logic from presentation

✤ validates form fields

✤ automatically escapes data saved to the database (to prevent SQL injection attacks)

✤ includes callbacks (eg do an action before or after save)

✤ allows for both test and production databases

Page 23: Php Course 9
Page 24: Php Course 9

CakePHP in Action

✤ Using cakePHP’s scaffolding to create a simple webapp that tracks bookmarks

✤ 1. Set up your database (use db conventions)

✤ 2. Set up your model.

✤ 3. Set up your controller.

✤ 4. Set up view (optional)

Page 25: Php Course 9

Lab & Next Week

✤ Final Project - Get’r Done!

See you Tuesday!