CS437/637 - Database-backed Websites and Web Services, Spring 2017

Welcome to CS437/637 Spring 2017

This class will cover database-backed web sites and web services using SQL and PHP as the main programming languages. You need good programming skills and CS430/630 for SQL, or an equivalent introductory database course covering SQL, E-R diagrams, and client programming (in C, Java or PL/SQL). It is good to know basic HTML, including forms, but these topics will be covered in homework. There are plenty of tutorials for HTML on the Web.

Class meets MW 4:00-5:15 in W-2-200 (changed 1/20/17)
Professor: Betty O'Neil (eoneil at cs.umb.edu)
Office Hours: MW 3:30-3:45, 5:30-6:45 in S-3-169
Grader: Ashrita Muthukumaraswami

Office Hours (in-term): MW 3:30-3:45, 5:30-6:45 in S-3/169

Homework and Programming Assignments: Prerequisites: CS310, CS430/630 (these are important), and officially, CS451/651 for CS637 only (less important, can be replaced by programming experience). Note that CS310 is an implicit requirement for all (applied) CS graduate courses. It means you need to know data structures, preferably implemented in Java (C++ is also OK), including use of Collection classes like HashMap. However, if you are solid on intermediate Java, as covered in cs210, that should be sufficient for this class.

Note that I also teach CS436/636 Database Application Development, usually in the fall. You may take both classes if you wish. Both classes use databases for holding persistent data and use HTML5 for web UI, so there is some overlap. It's best to take cs637 before cs636, since it is easier. Here is a quick comparison of these classes:

CS436/636 CS437/637
use Java for business logic use PHP for business logic
requires Java expertise (cs310 or equivalent) requires intermediate Java (cs210 or equivalent)
focus on large or enterprise sites focus on smaller sites
basic HTML5, minimal CSS more HTML5, CSS
layered architecture (presentation/service/DAO) simpler sites, less layering emphasis
use MVC (Model/View/Controller) pattern for web UI use MVC (Model/View/Controller) pattern for web UI
use Oracle or mysql interchangeably use mysql
default to using eclipse IDE default to using NetBeans IDE
run your own tomcat application server run XAMPP, your own Apache webserver, mysql, PHP site
only discuss web services study and implement web services

Note: If you are interested in preparing to use .NET, you should probably take CS436/636, since .NET is an enterprise platform, like JEE.


Student Information sheet, with list of essential skills needed for this course

Texts: print editions required for open-book exam use

Murach's PHP and MySQL (2nd Edition) by Joel Murach and Ray Harris, second edition, Murach & Assoc, 2014, available for example at Amazon or the bookstore. This book cover basic web technology (HTTP), running XAMPP for your own PHP web server, using the MySQL database. Follow the book link for free code.

HTML and CSS: Design and Build Websites by Jon Duckett, under $20 at Amazon. Follow the book link for free code.

Recommended for HTML and CSS, including slightly more advanced CSS examples:
Learning Web Design, by Jennifer Robbins, O'Reilly, about $40.

Getting Ready:
Check out your development PC: A Windows 7 system with at least 2GB of memory works well with these tools. Windows 8 or 10 is OK. Alternatively, a Linux system or recent MacOSX system will work well. Setup directions are provided for Windows, Linux, and MacOSX, in the Appendixes of the text. Also see "Access to cs.umb.edu systems" linked below under Resources.

First week: Get a UNIX/Linux account for cs637 by running apply, even if you already have a UNIX account here. This will give you access to our Linux host topcat.cs.umb.edu, which has a MySQL installation and an Apache web server enabled for PHP. You can try out the book's examples even before you get an account: see the link below under Resources.

Slides, etc.

Mon., Jan. 23 slides (6pp) Intro, start on HTML500
Wed., Jan. 25 slides (6pp) HTML5, continued (Chap. 5-7)
Mon., Jan. 30 slides (6pp) HTML5, CSS (Chap. 8-12)
Wed., Feb. 1 slides (6pp) HTML5, CSS (Chap. 13-15, 17)
Mon., Feb. 6 slides (6pp) Chap. 2 M&H: Intro PHP
Wed., Feb. 8 slides (6pp) More on forms, slides (6pp) Chap. 3 M&H: MySQL, Intro to Pizza Project
Mon., Feb. 13 Snow day
Wed., Feb. 15 slides (6pp) Chap 4. M&H: MySQL and PHP
Mon., Feb. 20 Holiday
Wed., Feb. 22 finish Chap. 4, start Chap. 5 MVC slides (6pp)
Mon., Feb. 27 Continue on Chap. 5
Wed., Mar. 1 finish Chap. 5, cover Chap. 6 Errors and Debugging slides (6pp)
Mon., Mar. 5
slides (6pp) Chap. 7 More on Forms, slides (6pp) Chap. 8 Type Coercion, etc.
Wed., Mar. 7 slides (6pp) Chap. 9 Strings and Numbers, slides (6pp) Chap. 11 Arrays
Mon., Mar. 20 continuing on Chap. 11, Arrays 
Wed., Mar. 22 slides(6pp) Midterm Review, Arrays: practice_sheet (solution)

Mon., Mar. 27 Midterm Exam Practice Midterm Exam (Solution)
Wed., Mar. 29 slides(6pp) Chap. 12, Sessions and Session Variables
Mon., Apr. 3 slides(6pp) Chap. 13 Functions
Wed., Apr. 5 slides(6pp) Chap. 14 Objects
Makeup Midterm exam: exam solution  
Mon., Apr. 10 More on objects, slides(6pp) Chap. 19 PDO
Wed., Apr. 12 slides(6pp) Chap. 20 Larger Websites
Wed., Apr. 19 slides(6pp) Chap. 22 Accessing Other Web Sites, Intro Web Services
Mon., Apr. 24 slides(6pp) PHP Web Services
Wed., Apr. 26 slides(6pp) PHP Web Services, part 2
Mon., May 1 slides(6pp) Debugging Proj2 slides(6pp) More on HTTP
Wed., May 3 slides (6pp) Security for Websites and Web Services
Mon., May 8 slides(6pp) An eCommerce Website (Chap. 24) (covered on final)
                                           FYI, not covered on final: slides(6pp) Regular Expressions (Chap. 15) slides(6pp) Selenium
Wed., May 10 slides(6pp) Final Review, slides(6pp) Proj2 Review, teacher evaluations

Wed., May 17 Final Exam 3:00-6:00 in W-2-200. Let's try to start at 2:50. Practice Final (Solution)


Homework 1 due Monday, Feb 6, in class, on paper. Solution

Homework 2, due Wednesday, Feb. 22, in class, on paper. Solution

Homework 3, due Wednesday, Mar. 8, in class, on paper. (#3 slightly updated Mar. 5) Note that part of this homework, the first project delivery, is due the previous evening, Tuesday, Mar. 7.  Solution
First project delivery solution: zip deployed

Pizza Project: doc assignment starting-point: pizza1_setup project (zip)  Solution: zip (deployed)

Homework 4, due Wednesday, Apr. 12, in class, on paper: Arrays, pizza1, Session Varibles Solution

Homework 5, due Wednesday, Apr. 26, in class, on paper, Objects, Unit Testing, HTTP headers Solution 

Web Services Project: assignment setup zip (2 projects in one zip) proj2_tests (server-side tests) deployed pizza2
Solution: zip deployed pizza2


Home page for Spring, 2016

Access to cs.umb.edu systems from offsite Logging in and transferring files.

Development Setup Installing needed software. Some discussion of topcat.cs.umb.edu as well.

The book webapps deployed on topcat.cs.umb.edu and using the MySQL database on topcat.cs.umb.edu

HTML5: Intro at www.w3schools.com latest spec forms tutorial tag reference, with HTML 4/5 info  HTML5 validator

CSS3: Intro at www.w3schools.com CSS2.2 property index. (atMore on CSS: mozilla.org  css-tricks.com

HTTP : tutorial

MySQL We are using MariaDB (compatible with mysql 5.5) bundled with XAMPP, and also version 5.6 on topcat.cs.umb.edu. docs (SQL)

PHP The version of PHP is important to note because it is still evolving, although not significantly between versions 5.5 and 5.6. We are using version 5.6 bundled with XAMPP, and version 5.5 on topcat.cs.umb.edu. Our text uses version 5.5 (see pg. 12). docs evolving spec

PHP Internals: How Variables and References Work

PHP Debugging Setup and Use Note that the directions on setting up XDebug in the Appendices of M&H apply only for older versions of XAMPP.

PHP Debugging Session: video 

REST Web Services Tutorial