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

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

Embed Size (px)

Citation preview

Page 1: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Date : 3/04/2010

Web Technology SolutionsClass: PHP Web Application Frameworks

Page 2: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Tonight

✤ Final Review

✤ Intro to PHP Frameworks

✤ Sample CakePHP App

✤ Lab

Page 3: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Lab Preview

✤ Application Development

✤ Registration Feature

✤ Login\Logout

✤ Maintain State

✤ CRUD

✤ Publish XML and RSS

Page 4: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

The Final Project

Page 5: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Final Project Details

✤ What is it? A Web App

✤ Use custom HTML, CSS, JS and PHP

✤ MySQL DB provided for you.

Page 6: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Final Project Report

✤ An intro paragraph describing your app.

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

✤ a table with a brief description of pages within your app and how they function.

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

Page 8: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Final Project Documentation

✤ Requirements Document

✤ Interaction Design Document

✤ Application Architecture Drawing

Page 9: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Final Project Documentation

✤ Interaction Design Doc

✤ Wireframes

✤ Interaction Flow Model

Page 11: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Final Project Documentation

✤ Application Architecture Drawing

✤ Show your application stack \ tiers

Page 12: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

PHP FRAMEWORKS

Page 16: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

PHP Frameworks✤ 10. WACT (component toolkit)

✤ 9. Seagull

✤ 8. Prado

✤ 7. PHPDevShell

✤ 6. Zend Framework (recommend)

✤ 5. CodeIgniter (recommend)

✤ 4. Symfony (recommend)

✤ 3. Yii (recommend)

✤ 2. Kohana (recommend)

✤ 1. CakePHP (recommend)

Page 20: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks
Page 24: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

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: Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks

Lab & Next Week

✤ Final Project - Get’r Done!

See you Tuesday!