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

Welcome to CS437/637 Spring 2018

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 7:00-8:15 in M-3-430
Professor: Betty O'Neil (eoneil at cs.umb.edu)
Office Hours: MW 3:45-5:15 and by appointment, in S-3-169
Grader: Adit Shah (ashah at cs.umb.edu)

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.

Syllabus

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 or 3rd Edition) by Joel Murach and Ray Harris, Murach & Assoc, 2014, available for example at Amazon (older edition (less expensive), newer edition) 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 fine. 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. 22 slides (6pp) Intro, start on HTML
Wed., Jan. 24 slides (6pp) HTML5: Duckett Chap.  4-7
Mon., Jan. 29 slides (6pp) HTML5: Duckett Chap. 8-12, including intro CSS
Wed., Jan. 31 slides (6pp) CSS: Duckett Chap. 13-14
Mon., Feb. 5  slides (6pp) Murach & Harris Chap. 2 Intro PHP
Wed., Feb. 7 slides (6pp) More on Forms, slides (6pp) M&H Chap. 3 Mysql, Intro to Pizza Project (doc)
Mon., Feb. 12 slides (6pp) M&H Chap. 4 PHP and Mysql
Wed., Feb. 14 slides (6pp) M&H Chap. 5 MVC apps
Mon., Feb. 19 Holiday
Wed., Feb. 21 Continuing on Chap. 5, slides (6pp) Chap. 6 Errors and Debugging


Assignments

Homework 1 due Monday, Feb 5, in class, on paper. Solution
Homework 2, due Wed., Feb. 21, in class, on paper.
Project 1 doc assignment: first delivery, due Tuesday, March 6, by midnight, in /var/www/html/cs637/<username>/pizza1 on topcat
Project 1 starting point: pizza1_setup (zip)
Homework 3, due Wed.,
March 7, in class, on paper (do this first, before project 1 first delivery)
Project 1 final delivery: Tuesday, March 20
, by midnight, in /var/www/html/cs637/<username>/pizza1 on topcat


Resources

Piazza Class Site

Home page for Spring, 2017

Access to cs.umb.edu systems from offsite Logging in and transferring files. (Updated Feb. 1 to remove unnecessary Oracle info.)

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. More on CSS: mozilla.org  css-tricks.com

HTTP : tutorial

MySQL We are using MariaDB (compatible with mysql 5.5, 5.6) 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 second edition text uses version 5.5, and the third edition uses version 7.1 (see pg. 12 in either edition). 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  the second edition of M&H apply only for older versions of XAMPP.

PHP Debugging Session: video 

REST Web Services Tutorial