CSIT 207                                Web Programming II                                 Spring 2007

Tentative Syllabus and Course Policies

_____________________________________________________________________________________________

 

Instructor:      Dr. Iyad Abu-Jeib

Office: 109 Fenton Hall

Office Phone: 673-4757

Office Hours: MWF 4:00-5:00 PM, R 12:00-1:00 pm, F 5:00-6:00 PM or by appointment.

E-mail: abu-jeib@cs.fredonia.edu

Website: http://www.cs.fredonia.edu/abu-jeib

 

Meeting Times:

                 MWF 1:00 - 1:50 Fenton 2162.

 

Textbook:

PHP and MySQL by EXAMPLE, Ellie Quigley with Marko Gargenta, 2007, Pearson Education, Inc, Prentice Hall. ISBN-10: 0131875086.
In addition to the material in the textbook, there will be material covered from other sources.
 

Reference:

Core PHP Programming Third Edition, Leon Atkinson, Zeev Suraski, 2004, Pearson Education, Inc, Prentice Hall.
 

Prerequisites: CSIT 107 and (CSIT 105 or CSIT 121). If you didn’t take CSIT 121, you may not be able to pass the course.

 

Grading:

1.       Two hour exams and a comprehensive final. Each hour (50-minute) exam will consist 10% of your course grade. The final will consist 20% of the course grade.

2.       Assignments. The assignments will consist 30% of your course grade. Some of the assignments may be assigned in class and will have to be turned in during the period of that class.

3.       Project. The project will consist 10% of the course grade.

4.       Quizzes. The quizzes will consist 10% of the course grade.

5.       Attendance and participation. Attendance and participation will consist 10% of the course grade. Here is the attendance policy:

a)      You'll be allowed to miss at most 3 classes with no documented acceptable excuse (email is not considered as such).

b)      Any class you miss after the first 3 classes described above will result in deducting 2% of your course grade. This applies until the 10% portion of the course grade assigned for attendance is consumed. Attendance may be taken randomly (may be 8 random classes).

c)      If the student does not have satisfactory attendance, the student may not be notified, but I'll take a note of that and keep it in my records until I assign the course grades at the end of the semester.

d)      You must be on time. You must not leave before the class ends. Repeated late arrival or early departure may be considered as absence.

e)      Excusable absence must be documented and must be inline with the college's policy about that. You must inform me in advance if you intend to miss class for a legitimate reason. Legitimate reasons as reasons such as death in the family (with a proof) and illness (with a doctor's report). Absences for family gatherings or family problems or to catch a flight or because of another course, etc, are not considered excusable absences. 

 

Remark: There is a possibility that I may not include attendance in the course grade for those who don’t want to count attendance. If that is the case, the 10% portion of the course grade that is assigned for attendance and participation will go for the final exam.

 

Attendance: Attendance is required (see above). You are responsible for material presented in class and for announcements announced in class. If you miss a class, it’s your responsibility to ask about the material covered in the class you missed and about the announcements announced that day. Make ups of exams/quizzes/worksheets are allowed only if you have a documented hardship. Late assignments won’t be accepted. Any measure to improve your grades (like extra-credit, extra points, and dropping a quiz/assignment (if happened)) may apply only to students who have satisfactory attendance.

 

Note: What’s stated above does not mean that I’ll give you extra-credit work or extra points or drop a quiz/assignment. I may do one of them or more of them or none.

 

Incomplete: Incomplete grade will be given only if you meet the university guidelines for incomplete.

 

Grading Scale: 92-100: A, 90-91: A-, 88-89: B+, 82-87: B, 80-81: B-, 78-79: C+, 72-77: C, 70-71: C-, 68-69: D+, 62-67: D, 60-61: D-, < 60: F.

 

Behavior: Inappropriate behavior will not be tolerated and severe consequences may follow. Any behavior that may result in disturbing the class, students, or the professor, is considered inappropriate behavior.

 

Academic Integrity (Fraud, Plagiarism, Cheating, Collusion): The consequences of any violation of academic integrity may include (but not limited to): a formal warning, a grade of zero assigned to that particular work (quiz, assignment, exam, project, etc), a failing grade in the course.

 

Final Exam: The final exam is accumulative. It will be Monday, May 7, 1:30 PM – 3:30 PM.

 

Remarks:

1)      This course is not CCC.

2)      I may assign extra work to do for bonus points or do something else to improve your grades. Such work (if assigned) will be optional.

3)      If you need help, please do not hesitate to ask for it. My job is to help you understand the material and succeed. I’ll be extremely happy to answer your questions and to assist you.

4)      If you have a hardship, please let me know in advance.

5)      I’ll be extremely happy to get a feedback from you about my teaching style and the level of difficulty of the exams and the assignments. We have to work together to make improvements if such improvements are needed. You can provide me with feedback directly or indirectly (by leaving a note underneath my office door or using the teaching feedback form on my website).

6)      You must do your assignments by yourself. Do NOT work in pairs or in groups unless I ask you to.

7)      I may cover material not available in the textbook. You are responsible for such material and for everything I mention in class.

8)      I may not grade all the assignments and I may not grade all the questions/parts in the assignment I decide to grade.

9)      Check your Fredonia email daily. I may contact you any day by email.

10)   The syllabus is subject to change.

11)   Bring your Fredonia ID to the exams and the quizzes.

12)   The grading scale is subject to be made more flexible if that’s needed to improve the grades.

13)   Keep all of your graded assignments, quizzes, exams, and all other graded stuff.

14)   At some point of time, I’ll give you usernames and passwords to access your grades and other stuff. You’ll be able to change the password, but if you're taking two classes with me, make sure that each class has a different password.

15)   Sometimes I repeat questions. Repeated mistakes result in harsher grading.

16)   Here's how (unless I tell you something else) my makeup work is done (of course provided there is an acceptable documented excuse): If a student misses a quiz, the next quiz will be doubled (counted twice) and if a student misses a test, the next one will be doubled (i.e. counted twice). That does not apply, of course, to the final.

17)   Always use only the notation used in class. Using a different notation may result in no credit or partial credit.

18)   Always spread out when a quiz/test is given.

19)   Never give two answers for the same question. If you do that, you'll get no credit.

20)   On tests, quizzes, homework, always cross out unwanted writing.

21)   An extra credit quiz may be given (may be without advanced notice) within a week of a quiz/test/homework. There will be no make up for such a quiz. Such quizzes will be given only when necessary.

22)   I may make random photocopies of some random graded quizzes/homework/exams.

23)   For “identify the error” questions, identifying non-errors as errors would result in deduction of points.

24)   Suppose that I asked you to find all solutions of an equation and suppose the equation has two solutions. If you write down three solutions and two of them are the correct ones, you will not get a full credit and if you write down more than 3 solutions and two of them are the correct ones, you may get no points at all. A similar thing can be said about "find the error" questions.

25)   I may ask each student to answer a question or more every class.

26)   If a class was cancelled for an unexpected reason and a test/quiz/assignment/homework was scheduled or due that day, it will be held/due next meeting time.

 

Objectives: This course is an advanced course in server-side programming. It’s designed to help you establish background in server-side programming. Server-side programming is a major part of web design. Client-based languages such as JavaScript are not enough. You need server-side scripts to be able to interact with files and databases. Server-side programming is needed, among other things, to store/retrieve information. Server-side scripts are important for designing applications such as email serve lists, guestbooks, counters, login user pages, forums, E-commerce, shopping carts, log in systems, etc. Every web designer has to know a server-side programming language such as Perl/CGI, PHP, ASP. However, you should keep security in mind when you use server-side scripts. Also, always avoid having public writable directories. The instruction language we’ll use in this course is PHP.

 

Topics (not necessarily in order and not necessarily from the textbook):

Basics, sticky forms, interacting with forms, arrays, functions, date, string, math, and array functions, file access, database access (including queries joining more than one table), sending email, uploading files, downloading files/images from non public directories, interacting with the file/dir systems, cookies, sessions, graphics, bar and pi charts, SSI commands, htaccess, security, applications, and others. In detail, the topics we cover may include (9n addition to other topics):

 

(1)   How PHP files are written.

(2)   Comments in PHP.

(3)   Running PHP from the command line.

(4)   Running PHP in an interactive mode.

(5)   HTML and PHP, HTML in PHP code, multiple PHP codes, <BR> vs. \n.

(6)   Using the backslash to print characters in output statements.

(7)   Single vs. double quotes (problem with whitespace characters when using single quotes).

(8)   Echo vs. print (unlike echo, print can.t be used for multiple prints separated by commas) vs. print_r.

(9)   Text blocks and the HERE docs (<<< operator).

(10)           Variables and named constants in PHP.

(11)           One-dimensional arrays, processing them (including accessing the keys), foreach, range, count, etc.

(12)           Associative (string indices/keys) and indexed (integral indices) arrays.

(13)           Sorting one-dimensional arrays, sort, assort, ksort, rsort, arsort, krsort.

(14)           Multi-dimensional arrays and processing them (including accessing the keys).

(15)           The _SERVER array.

(16)           Math functions: trig functions, fmod, rand, mt_rand, getrandmax, lcg_value, pow, log, etc.

(17)           Multiple files: include and require.

(18)           Forms (action, get vs. post methods, etc) and processing them.

(19)           The _REQUEST, _GET, and _POST arrays, magic quotes, validating forms, functions isset, empty, strlen, is_numeric, stipslashes, addslashes.

(20)           Sticky forms.

(21)           Functions: non-value returning functions, value-returning function, value parameters, reference parameters, reference returning functions, array arguments, value default arguments, reference default arguments, recursive functions, dynamic function calls, using list for functions returning arrays, global, local and static variables, global named constants, using global and _GLOBALS, etc.

(22)           Sending e-mail and HTML email (file uploads, sending emails with attachments, building email lists, forwarding email, etc, will be covered later).

(23)           Reading files.

(24)           Writing to files. 

(25)           Uploading files.

(26)           Dir and file processing, operations and functions on files and directories.

(27)            The date(), gmdate(),  and getdate() functions, string functions and operations.

(28)           Introduction to databases.

(29)           SQL and MySQL; logging in, changing the password, databases: creating, deleting, showing all databases, showing tables in the database; tables: creating, describing, inserting/updating/deleting records (rows) or fields, adding new columns at chosen locations, renaming columns or changing their types, renaming tables, dropping a column, dropping a table, dealing with null (setting a field to null, deleting null fields, updating them, queries involving null or not null), queries (selection records, whole table, fields, etc), ordered queries, using like, using relational operators (<, <=, >, >=, =), using logical operators (not !, and &&, or ||).

(30)           Queries joining two tables, copying tables, creating table from another (i.e. some/all of the columns of the new table are from an old one); PHP and MySQL: connecting to MySQL from PHP, selecting a database, performing queries, processing queries (e.g. printing them), determining the number of rows (records) and the number of fields (columns), determining the fields (e.g. names), closing the MySQL connection.

(31)           Using MySQL to perform calculations, data types; math, string, and date functions; other functions; work on Assignment 6.

(32)           Counter  example (# of users, # of distinct users, # visitors this hour, # visitors today).

(33)           Alumni example (new alumni, update alumni, change password, list alumni); Assignment 6 continued.

(34)           Cookies (tracking visitors, using as counters, keeping track of visitors, etc).

(35)            Sessions.

(36)           htaccess, SSI commands, Web and Unix tips, using SSI commands or the browser or links (URLs) to send arguments/parameters to a PHP file, prompting the user to download (instead of sending it to the browser) a file (from public or nonpublic director).

(37)           Graphics: supported graphics types in PHP, difference between them, colors in PHP (as decimal and hexadecimal) and HTML, graphic functions, how to create a graph, graphic functions, sending the graph to the browser, saving the graph to a file, using existing graphs, destroying the graph, other topics.

(38)           Bar and Pie charts.

(39)           Security.