Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

Syllabus version 1.03

Instructor David J. Malan [email protected] http://www.cs.harvard.edu/~malan/ +1-617-523-0925

Description Today’s websites are increasingly dynamic. Pages are no longer static HTML files but instead generated by scripts and database calls. User interfaces are more seamless, with technologies like Ajax replacing traditional page reloads. This course teaches students how to build dynamic websites with Ajax and with Linux, Apache, MySQL, and PHP (LAMP), one of today’s most popular frameworks. Students learn how to set up domain names with DNS, how to structure pages with XHTML and CSS, how to program in JavaScript and PHP, how to configure Apache and MySQL, how to design and query databases with SQL, how to use Ajax with both XML and JSON, and how to build mashups. The course explores issues of security, scalability, and cross-browser support and also discusses enterprise-level deployments of websites, including third-party hosting, virtualization, colocation in data centers, firewalling, and loadbalancing.

Prerequisites Prior programming experience (in any language) and familiarity with HTML are assumed.

Expectations You are expected to attend or watch all lectures, to implement four projects, and to design and implement a final project.

Grades Your final grade will be based on your performance on the course’s projects, each of which will bear equal weight. Projects will be evaluated along the axes of correctness, design, and style. Remarkable effort and improvement will not go unnoticed.

0<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

Website The address of this course’s website is: http://www.cs75.net/ Visit the course’s website to access the course’s bulletin board, enter the virtual classroom, watch videos of lectures and sections, download handouts and software, and follow links to other resources.

Staff To contact the entire staff, email: [email protected] However, you are encouraged to post most questions to the bulletin board on the course’s website instead so that others might benefit as well.

Lectures Lectures will take place in Harvard Hall 104 on Mondays from 5:30pm ET until 7:30pm ET. Each lecture will be filmed and made available within 72 hours via the course’s website in Flash, MP3, and QuickTime formats. Once posted, these recordings will remain available until semester’s end. Although the recordings are intended to be used by students taking the course via the Internet, students taking the course on campus are welcome to watch or listen to the recordings in the event that their attendance at one or more lectures is not possible. All students are welcome to watch or listen to the recordings for the purpose of reviewing the content of particular lectures. A schedule of lectures, subject to change, appears below. Lecture 0: HTTP Monday, 31 August 2009 Lecture 1: PHP Monday, 14 September 2009 Lecture 2: PHP, Continued Monday, 21 September 2009 Lecture 3: XML Monday, 28 September 2009

1<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

Lecture 4: XML, Continued Monday, 5 October 2009 Lecture 5: SQL Monday, 19 October 2009 Lecture 6: SQL, Continued Monday, 26 October 2009 Lecture 7: JavaScript Monday, 2 November 2009 Lecture 8: JavaScript, Continued Monday, 9 November 2009 Lecture 9: Ajax Monday, 16 November 2009 Lecture 10: Ajax, Continued Monday, 23 November 2009 Lecture 11: Security Monday, 30 November 2009 Lecture 12: Scalability Monday, 7 December 2009

Sections Sections offer opportunities to review recent lectures’ material in a more intimate environment with only teaching fellows and a handful of classmates present. Sections also provide guidance on projects. A schedule of sections appears on the course’s website.

2<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

Projects A schedule of projects, subject to change, appears below. Project 0: Setup Released: Monday, 31 August 2009 Due: Monday, 28 September 2009, noon ET Project 1: PizzaML Released: Monday, 28 September 2009 Due: Monday, 19 October 2009, noon ET Project 2: C$75 Finance Released: Monday, 19 October 2009 Due: Monday, 9 November 2009, noon ET Project 3: Google Mashup Released: Monday, 9 November 2009 Due: Monday, 7 December 2009, noon ET Final Project Pre-Proposal Due: Monday, 16 November 2009, noon ET Proposal Due: Monday, 23 November 2009, noon ET Status Report Due: Monday, 7 December 2009, noon ET Implementation Due: Monday, 21 December 2009, noon ET Computer Science Fair: Monday, 21 December 2009, 6:30 pm ET – 8:30 pm ET Extensions on these projects will not be granted, except in cases of emergency. Technical difficulties will not constitute emergencies. Late submissions will be penalized 1% per minute late up to 100%. Lateness will be determined by submissions’ timestamps. The climax of this course is the final project. The final project will be your opportunity to design and implement a dynamic website of your very own. So long as your final project draws upon this course’s lessons, the nature of your website will be entirely up to you, albeit subject to the staff’s approval. This semester will conclude with the third annual “Computer Science Fair” on Monday, 21 December 2009, from 6:30 pm ET until 8:30 pm ET, in Maxwell Dworkin at 33 Oxford St., room 119. A course-wide exhibition of final projects held jointly with CSCI E-7: Exposing Digital Photography, the Fair will be an opportunity to mingle with classmates, see each other’s work, and eat cake. Distant students are encouraged to travel to campus for this event.

3<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

Inasmuch as software development is rarely a one-person effort, you will be allowed an opportunity to collaborate with one or two fellow students for this final project. Needless to say, it is expected that every student in any such group will contribute equally to the design and implementation of that group’s project. Moreover, it is expected that the scope of a two- or three-person group’s project will be, respectively, twice or thrice that of a typical one-person project. A one-person project, mind you, should entail time and effort equivalent to or greater than that required by one of this course’s assigned projects. Collaboration is not allowed on the four assigned projects.

Exams This course has neither a midterm nor a final exam.

Books No books are required for this course. However, we recommend either of the sets below. All of these books is available for purchase at sites like Amazon.com. Each has also been placed on reserve at Grossman Library. Realize that links to free, if not superior, alternatives to these books can be found on the course’s website. For Those Less Comfortable HTML, XHTML, and CSS: Your visual blueprint for designing effective Web pages Rob Huddleston Wiley Publishing, Inc., 2008 ISBN-13 978-0-470-27436-1 JavaScript: Your visual blueprint for building dynamic Web pages, 2nd Edition* Eric Pascarello Wiley Publishing, Inc., 2004 ISBN-10 0-7645-7497-3 PHP & MySQL: Your visual blueprint for creating dynamic, database-driven Web sites Janet Valade Wiley Publishing, Inc., 2006 ISBN-10 0-4700-4839-5

*

Out of print but available from third parties on Amazon.com.

4<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

For Those More Comfortable Apache Phrasebook Daniel Lopez Sams Publishing, 2006 ISBN-10 0-672-32836-4 JavaScript Phrasebook Christian Wenz Sams Publishing, 2007 ISBN-10 0-672-32880-1 Linux Phrasebook Scott Granneman Sams Publishing, 2006 ISBN-10 0-672-32838-0 MySQL Phrasebook Zak Greant, Chris Newman Sams Publishing, 2006 ISBN-10 0-672-32839-9 PHP Phrasebook Christian Wenz Sams Publishing, 2006 ISBN-10 0-672-32817-8

Software It is not necessary to purchase any software for this course. All software required by the course’s projects will be available for download via the course’s website for Linux, Mac OS, and Windows alike.

Academic Honesty All work that you do toward fulfillment of this course’s expectations must be your own unless collaboration is explicitly allowed (e.g., by some problem set or the final project). Viewing or copying another individual’s work (even if left by a printer, stored in an executable directory, or accidentally shared in the course’s virtual classroom) or lifting material from a book, magazine, website, or other source—even in part—and presenting it as your own constitutes academic dishonesty, as does showing or giving your work, even in part, to another student. Similarly is dual submission academic dishonesty: you may not submit the same or similar work to this course that you have submitted or will submit to another. Nor may you provide or make available your or other students’ solutions to Project 1, Project 2, or Project 3 to individuals who take or may take this

5<7

Computer Science E-75: Building Dynamic Websites Harvard Extension School Fall 2009

course in the future. Moreover, submission of any work that you intend to use outside of the course (e.g., for a job) must be approved by the staff. You are welcome to discuss the course’s material with others in order to better understand it. You may even discuss problem sets with classmates, but you may not share code. You may also turn to the Web for instruction beyond the course’s lectures and sections, for references, and for solutions to technical difficulties, but not for outright solutions to problems on projects. However, failure to cite (as with comments) the origin of any code or technique that you do discover outside of the course’s lectures and sections (even while respecting these constraints) and then integrate into your own work may be considered academic dishonesty. If in doubt as to the appropriateness of some discussion or action, contact the staff. All forms of academic dishonesty are dealt with harshly.

Noncredit Status If you are not taking this course for credit, you are not required to submit any work. However, all of the work in this course is designed to facilitate your comprehension and retention of the course’s material. Consequently, you are encouraged to complete on time as much of the work as possible. In return, you will receive feedback on any work that you do submit.

6<7

Syllabus - Building Dynamic Websites

Dec 21, 2009 - JavaScript and PHP, how to configure Apache and MySQL, how to ... Prior programming experience (in any language) and familiarity with ...

83KB Sizes 3 Downloads 333 Views

Recommend Documents

Syllabus - Building Dynamic Websites
Dec 21, 2009 - Today's websites are increasingly dynamic. Pages are no longer static HTML files but instead generated by scripts and database calls.

Specification - Building Dynamic Websites
Sep 28, 2009 - HTML, XHTML, and CSS: Your visual blueprint for designing effective Web .... At least one of your pages must include at least one mailto: link.

JavaScript - Building Dynamic Websites
put cursor in username field if empty if (document.forms.login.username.value == ""). { document.forms.login.username.focus(); document.forms.login.username.value = document.forms.login.username.value;. } // else put cursor in password field else. {

Specification - Building Dynamic Websites
Sep 28, 2009 - All work that you do toward fulfillment of this course's expectations must be your own unless collaboration is explicitly allowed (e.g., by some ...

Notes - Building Dynamic Websites
case "PHP": header("Location: http://us.php.net/results.php?q=" . $_GET["q"]); break; case "MySQL": header("Location: http://search.mysql.com/search?q=" . ... purpose is to whisk the user away, in which case there shouldn't be any time left to ... de

Notes - Building Dynamic Websites
MySQL PHP) framework as well as employing Ajax. Ajax is the fantastic .... language which will empower you to create dynamic websites. Soon after, we'll hit ...

Notes - Building Dynamic Websites
these projects and on average you will require about 10 hours over the course of those three .... 1America is the best. Just ask this guy. 5 .... One of the advantages of doing our own web hosting is that we have root access over the server.

Notes - Building Dynamic Websites
in the semester when we work with databases that forgetting to escape user input can be a serious security concern. • We resorted .... Register for Frosh IMs. .

JavaScript - Building Dynamic Websites
if (document.forms.login.username.value == "") ... document.forms.login.password.focus(); ... 19. Quirks http://www.quirksmode.org/js/contents.html ...

Project 1 - Building Dynamic Websites
Oct 19, 2009 - All work that you do toward fulfillment of this course's expectations must be your own unless collaboration is explicitly allowed (e.g., by some ...

Project 1 - Building Dynamic Websites
Oct 19, 2009 - or other students' solutions to Project 1, Project 2, or Project 3 to .... After all, you don't want a phone call every ... That way, too, the folks at.

Computer Science E-75 - Building Dynamic Websites
Table adapted from http://www.webcheatsheet.com/php/regular_expressions.php. Page 4. 3. A Dynamic Website. Page 5. 4. OOP.

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 5: SQL. David J. Malan [email protected] ...

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 10: Ajax, Continued. David J. Malan.

Computer Science E-75 - Building Dynamic Websites
21. Debuggers. ▫ FireBug https://addons.mozilla.org/en-US/firefox/addon/1843. ▫ JavaScript Debugger https://addons.mozilla.org/en-US/firefox/addon/216 ...

Project 1: PizzaML - Building Dynamic Websites
Oct 19, 2009 - shared in the course's virtual classroom) or lifting material from a book, magazine, ... Design. To what extent is your code written well (i.e., clearly, ... The bulletin board is actually PHP-based software called SMF that we download

Computer Science E-75 - Building Dynamic Websites
Page 2. 1. Grades. Page 3 ... Page 4. 3. Relational Databases. Page 5 ... 10. Lunch http://www.rebeccascafe.com/wraps_sandwiches_boston_catering.html.

Computer Science E-75 - Building Dynamic Websites
Computer Science E-75. Building Dynamic Websites. Harvard Extension School http://www.cs75.net/. Lecture 10: Ajax, Continued. David J. Malan.

Computer Science E-75 - Building Dynamic Websites
Table adapted from http://www.webcheatsheet.com/php/regular_expressions.php. Page 4. 3. A Dynamic Website. Page 5. 4. OOP.

Computer Science E-75 - Building Dynamic Websites
Page 2 ... 11. Caching. ▫ .html. ▫ MySQL Query Cache. ▫ memcached. ▫ . ... query_cache_type = 1 http://dev.mysql.com/doc/refman/5.0/en/query-cache.html ...

Lectures / Lecture 9 - Building Dynamic Websites
Andrew Sellergren. Contents. 1 Announcements (0:00–2:00). 2. 2 Ajax (2:00–105:00). 2. 2.1 Introduction . ... 2.4.2 ajax2.html . ... 2.4.10 ajax10.html .

Project 0: Setup - Building Dynamic Websites
Sep 28, 2009 - Within 48 hours, you should receive an email via your preferred address from [email protected] containing your username and password for cs75.net. Be sure to remember both! If you don't receive said email within 72 hours, check your spam fo

Computer Science E-75 - Building Dynamic Websites
START TRANSACTION;. UPDATE account SET balance = balance - 1000 WHERE number = 2;. UPDATE account SET balance = balance + 1000 WHERE number = 1;. SELECT balance FROM account WHERE number = 2;. # suppose account #2 has a negative balance! ROLLBACK;. E

Computer Science E-75 - Building Dynamic Websites
6. Properties. ▫ onreadystatechange. ▫. readyState. □ 0 (unitialized). □ 1 (open). □ 2 (sent). □ 3 (receiving). □ 4 (loaded). ▫. responseBody. ▫. responseText. ▫. responseXML. ▫ status. □ 200 (OK). □ 404 (Not Found). □ 500