City College of San Francisco
Course Outline of Record
Course Status: Active
I. GENERAL DESCRIPTION
A. Approval Date November 2016
B. Effective Semester Fall 2017
C. Department Computer Science
D. Course Number CS 130B
E. Course Title Advanced PHP Programming
F. Course Outline Originator Keith Freedman
G. Department Chairperson Craig Persiko
H. Dean David Yee
II. COURSE SPECIFICS
A. Hours
Lecture: 52.5 total
B. Units 3
C. Prerequisite None
    Corequisite None
    Pre/Corequisite None
    Advisory CS 130A
    Advisory Pre/Corequisite None
D. Course Justification PHP is a common programming platform for web site development, database connectivity, and multimedia programming. PHP is used in courses taught in the Visual Media Design, CNIT and CS departments. CS 130B is the second course in a two-semester sequence. It fulfills a requirement for the Web Application Programming certificate.
E. Field Trips No
F. Method of Grading Letter or Pass/No Pass
G. Repeatability Course is not repeatable
III. CATALOG DESCRIPTION
This class covers using PHP for database connectivity to build scalable, dynamic websites. Assignments emphasize using PHP for user authentication, site personalization, content management, session tracking, and user-driven database updating. Class project demonstrates using PHP and a database (MySQL) to build a scalable, object oriented, template-based web application.
IV. STUDENT LEARNING OUTCOMES
Upon completion of this course, a student will be able to:
  1. Create PHP programs using classes and objects
  2. Write PHP programs to use AJAX to interact with other systems including XML and JavaScript/JSON
  3. Create web applications using PHP database connectivity
  4. Secure PHP web application data
V. CONTENTS
 
  1. Advanced PHP Programming
    1. Documentation
    2. Constants
      1. Creating a constant
      2. Using a constant
    3. Functions
      1. Recursion
      2. Static Variables
      3. References 
  2. Object Oriented Programming (OOP)
    1. Defining a Class
      1. Creating an object
      2. Creating constructors
      3. Object inheritance
      4. Using class functions without instances
    2. Serializing Objects
    3. Destroying Objects in PHP
  3. Security
    1. Validating Forms
      1. Check user name
      2. Validate submitted password
      3. Validate user's submitted email address
    2. Mcrypt security application
      1. encode data
      2. decode data.
    3. HTTP or PHP application based authentication
    4. Web Server Security
      1. Safe mode
      2. open_basedit directive
      3. Register globals
  4. Developing Web Applications
    1. Database Design
      1. Normalization
      2. Unique Identifier
    2. Creating the Database
      1. CREATE DATABASE statement
      2. USE DATABASE statement
      3. CREATE TABLE statement
    3. Generating Query Results
      1. SELECT statement
      2. Making the PHP interface
      3. Using PHP's MySQL class
      4. Building HTML tables using SQL (Structured Query Language) Queries
    4. Site Structure
    5. PHP and OOP Templates
    6. Sessions
      1. What is a session
      2. Understanding PHP session variables
      3. Create a PHP session variable
      4. Register and modify PHP session variables
      5. Putting PHP session IDs in pages
      6. Good Practice with sessions and PHP
      7. PHP Sessions and databases
    7. Debugging
    8. Errors
      1. Logging
      2. Reporting
      3. Handling and avoiding errors
  5. Using Cookies with PHP
    1. Cookie properties
    2. Setting a cookie
    3. Retrieving PHP cookies
      1. Expiring cookies
      2. Deleting cookies
    4. Drawbacks to cookies
    5. Using cookies well
    6. Cookie Security Issues
  6. Creating interactive web applications
    1. Using the Database
      1. Database APIs
      2. Connection/disconnection
      3. Error-handling strategies
    2. PHP website administration
  7. XML/JSON and PHP
    1. What is XML (eXtensible Markup Language)
    2. XML Syntax
    3. Document Type Definitions
    4. Encoding/Decoding JSON
    5. Parsing XML with PHP
    6. XML Error Handling
VI. INSTRUCTIONAL METHODOLOGY
  1. Assignments
    1. In-class assignment: Readings and discussion from textbooks, reference manuals, sample applications and handouts
    2. In-class assignment: Describing the main features of Object Oriented Programming in PHP
    3. In-class assignment: Writing PHP programs that implement security
    4. In-class assignment: Developing web applications to manipulate databases
    5. In-class assignment: Creating web sites using cookies
    6. In-class assignment: Using PHP to program e-commerce web applications
    7. In-class assignment: Using PHP to parse XML documents
    8. Out-of-class assignment: Writing a complete application (shopping cart, content management system, photo gallery, etc.)
    9. Out-of-class assignment: Hands-on assignments using the PHP programming language to solve typical data processing tasks
    10. Out-of-class assignment: Using the PHP language to build Object Oriented Programs
    11. Out-of-class assignment: Write web application design document
    12. Out-of-class assignment: Diagnosing and solving web site security needs
    13. Out-of-class assignment: Writing PHP programs to manipulate the contents of a database file
    14. Out-of-class assignment: Creating PHP programs to set and retrieve cookies
    15. Out-of-class assignment: Writing a template-based e-commerce web application
    16. Out-of-class assignment: Analyzing and parsing XML syntax and document type definitions
    17. Out-of-class assignment: Diagnosing and solving common Web administration tasks using PHP.
  2. Evaluation
    1. Written work: PHP programming assignments as described above, uploaded to the learning management system for grading.
    2. Exams/Quizzes/Tests: Written quizzes and/or tests that measure the student's knowledge of topics such as: a) The main features of Object Oriented Programming in PHP b) Implementing security in a web site c) The creation of web applications to interact with databases d) Use of PHP to develop web applications e) Use of cookies f) Use of PHP with XML documents
    3. Participation: Class discussion will be conducted face-to-face in class, and/or facilitated through weekly asynchronous discussion forums via the online learning system.
    4. Final Assessment: A written comprehensive final computer program that measures the student's ability to create advanced PHP programs.
  3. Representative Textbooks and Other Instructional Materials
    1. Luke Welling & Laura Thomson. 2017. PHP and MySQL Web Development. Addison Wesley.
    2. Website: http://php.net
    3. Website: http://php.dzone.com
VII. TITLE 5 CLASSIFICATION
CREDIT/DEGREE APPLICABLE (meets all standards of Title 5. Section 55002(a))