Dr. Logan | COM Courses
Dr. Patrick Logan
108 Davis Hall
Phone: 401-874-2970; Fax: 401-874-4722
Email: mayfly@uri.edu
http://www.uri.edu/artsci/com/Logan/teaching/html/com372_spring_2007/syllabus_S_07.html

Syllabus

COURSE GOALS: Our goal is to master web-development techniques that use databases to create content. This includes HTML form objects, database connections, and server-side programming. This semester we will focus on open-source approaches using the MySQL database, general-purpose structured query language (SQL), and PHP5 for programming on the server. If time permits, we will also introduce AJAX with PHP (a client/server technology).

TEXTS:PHP and MySQL Web Development—Third Edition. 2005. Luke Welling and Laura Thomson. Sam's Publishing.

Additional material will be provided from the course website and as handouts from the instructor.

FORMAT: We will have two lectures and two labs per week. Exercises will follow text examples and projects. Office hours are liberal and you are encouraged to take advantage of them.

GRADES: Programming assignments—in parallel with the text— will be graded. You are expected to attend and participate in all classes, to have completed assigned readings on time. A rubric for grading will be provided with each assignment. (Details)

PREREQUISITES: The course is for advanced students with career or program-related needs for Web applications training. Students should be familiar with Windows operating systems and with technology for static web pages, equivalent to COM271. Students who are deficient in client-side programming technique should discuss this with Dr. Logan, who will work with you to bring you fully up to speed (including possible evening lab instruction for 2-3 weeks, as needed).

SCHEDULE: Lectures, Monday and Wednesday, 3:00-3:50, room TBA

LAB SCHEDULE: Tuesdays and Thursdays, 3:30-5:15, 215 Quinn

COURSE OUTLINE

Using PHP

Week 1 (January 22-25)

Introduction: Course goals, syllabus, and classroom procedures explained.

Review—I: Page structure via XHTML. Page layout via CSS.

Review—II: XHTML form elements. <form> attributes Method and Action. <input>, <textarea>, <select>, and <option> elements. Radio buttons, checkboxes, scrolled lists, textboxes, hidden text, and submit buttons.

Client / Server Programming: Client-side Javascript versus Server-side scripting via PHP. Using server-side PHP to create and serve XHTML pages. Open-source versus Microsoft technologies.

Getting Started with PHP. Embedding PHP scripts with tags <?php and ?>. Adding dynamic content. Accessing form variables. Identifiers. Variables (types, values). Constants. Scope. Operators. Expressions. Functions. Conditions with if, else, and switch. Iteration with while, do, and for.

Reading: Welling and Thomson, cpt. 1, App. A.

Programming: Assignment 1—"Setting Up": I. Setting up a remote folder and initial course website for the lab. Use of FTP. II. Setting up PHP and MySQL for work at home. (Given 1/22; Due 1/29)

Week 2 (January 29-February 1)

Storing and Using Data:Saving data for later use. Creating, opening, reading from, writing to, and closing files. Locking and deleting files. Files versus relational databases.

Arrays: Array indices (numerical, non-numerical). Array operators. Multidimensional arrays. Sorting. Array functions.

Reading: Welling and Thomson, cpts. 2, 3.

Programming: Assignment 2—"The Grocery List": (Given 1/29; Due 2/5)

Week 3 (February 5-8)

Strings and Regular Expressions: Formatting, joining, and splitting strings. String comparisons. Functions for matching and replacing substrings. Using regular expressions.

Functions: Reusing code. Require ( ) and include ( ). Defining functions. Using parameters. Scope. Returning values. Calling by reference (pointer); calling by value. Recursions.

Reading: Welling and Thomson, cpts. 4, 5.

Programming: Assignment 3—Error-checking and Form Feedback (Given 2/5; Due 2/12)

Week 4 (February 12-15)

Object-oriented PHP: Concepts. Classes, attributes, and operations. Class attributes, constants, methods. Inheritance. Access modifiers. Static methods. Type hinting. Object cloning. Abstract classes. Class design. Advanced object-oriented functionality.

Exception Handling: Concepts. Try...throw...catch. Class Exception. User-defined exceptions. Other error handling methods.

MySQL

Database Design Overview: Relational database concepts and terminology. Principles and practices of database design. Normalization and de-normalization.

Reading: Welling and Thomson, cpts. 6, 7, 8.

Programming: Assignment 4—Object Oriented Web Programming (Given 2/12; Due 2/20)

Week 5 (February 20-22)

February 19 is Washington's Birthday: Classes do not meet.)

Setting Up Databases: Creating a database. Setting users and privileges. Creating tables. Column types (=fields). Setting indices and primary keys.

Using the MySQL Database: SQL (Structured Query Language). Inserting and retrieving data from a table. Joining tables. Subqueries. Updating records. Deleting records. Modifying or deleting tables.

Reading: Welling and Thomson, cpts. 9, 10.

Programming: Assignment 5—Setting up a database (using phpMyAdmin) (Given 2/20; Due 2/26)

Week 6 (February 26-March 1)

Database Access From PHP Web Pages: Web server communications with database server. Opening and Closing Connections. Finding and selecting available databases. Querying and retrieving query results. PEAR, an interface.

Advanced MySQL Administration: The MySQL privilege system in detail. Securing the database. Speeding up queries. Optimizing. Backup and Recovery. Replication.

Advanced MySQL Programming: The Load Data Infile statement. Transactions. Foreign keys. Stored queries / procedures.

Reading: Welling and Thomson, cpts. 11, 12, 13.

Programming: Assignment 6—Building a Front End (Given 2/26; Due 3/5)

E-commerce and Security

Week 7 (March 5-8)

E-commerce Overview: Site design and goals. Alternative designs. Risks and Threats. Strategies.

E-commerce Security Issues: Securing your information. Threats. Policies. Tradeoffs (usability, performance, cost, security). Authentication. Principles and practices of encryption. Digital signatures and certificates. Secure servers. Auditing and logging. Firewalls. Backups. Physical security.

Authentication with PHP and MySQL: Identifying visitors. Controlling access. Basic authentication. Apache authentication. Custom authentication.

Reading: Welling and Thomson, cpts. 14, 15, 16.

Programming: Assignment 7—Back end (Given 3/5; Due 3/12)

Week 8 (March 12-15)

Secure Transactions with PHP and MySQL: Providing secure transactions. Secure Sockets Layer (SSL). Secure storage. Storing (or not) credit card numbers. More on encryption,

Advanced PHP Techniques

Web Server File System: Uploading files. Directory functions. Interacting with server files. Executing server-side applications. Server environment variables.

Network and protocol functions: Sending and reading email. Using other websites via HTTP. Network lookup functions. FTP.

Reading: Welling and Thomson, cpts. 17, 18, 19.

Week 9 (March 26-29)

(Spring Break is March 19-25.)

Date and Time: Getting date and time. Converting date formats. Date calculations. Calendar functions.

Images on the fly: Image support in PHP. Image formats. Creating images. Using automatically generated images on web pages. Using text and fonts to create images. Drawing figures and graphing data.

Reading: Welling and Thomson, cpts. 20, 21.

Programming: Assignment 8—Authentication, session variables, and use of cookies (Given 3/29; Due 4/05)

Week 10 (April 2-5)

PHP Sessions: Session control. Cookies. Setting up a session. Session variables. Sessions and authentication.

Miscellaneous PHP features: Magic quotes. eval( ) for strings. Terminating execution with die and exit. Serializing variables and objects. Accessing the PHP environment. PHP extensions. Highlighting source code.

Reading: Welling and Thomson, cpts. 22, 23.

Programming: Assignment 10—TBA (Given 4/2; Due 4/9)

Practical PHP and MySQL Projects

Week 11 (April 9-12)

Managing Large Projects: Software engineering for web development. Project planning and management. Reusable and durable coding. Development environments. Documentation. Prototypes (wireframes). Optimization. Separating content, structure, style, and programming.

Debugging: Program errors (syntax, runtime, logic). Error messages and levels. Handling errors gracefully.

Authentication and Personalization: Logging in. Authenticating users. Passwords. User preferences. Personalized content. Suggesting content based on a user profile.

Reading: Welling and Thomson, cpts. 24, 25, 26.

Programming: Assignment 11—TBA (Given 4/9; Due 4/16)

Week 12 (April 16-19)

A Shopping Cart: A product database. Online categorized product catalog. Shopping cart to track purchases. Checkout script for payment and shipping. Administrative interface.

Content Management: Developing web pages that use a series of templates. Building a search engine that uses metadata.

Reading: Welling and Thomson, cpts. 27, 28.

Programming: Assignment 12—TBA (Given 4/16; Due 4/19)

Week 13 (April 23-26)

Web-based Email: Connecting to POP3 and IMAP mail servers. Reading and sending mail. Replying to and forwarding mail. Deleting mail from an account.

Web Services with XML and SOAP: XML and SOAP basics. Using XML to communicate with Amazon. Parsing XML. Caching responses. Talking to Amazon with NuSOAP.

Reading: Welling and Thomson, cpts. 29, 33.

Week 14 (April 30)

Classes end April 30.

Wrapping Up: Review and SETs.

Final Exam, TBA. Exams are on May 3-4, 7-11.