Web Development 2
Dr Derek Bridge
School of Computer Science & Information Technology
University College Cork
Administrivia: The lecturer
Administrivia: Module delivery
||5 credit module
||CS1117, CS1106/CS5021, CS1115/CS5002
||2 × 1 hr per week
||1 × 2 hr per week
||At least 2 hrs per week
|Course web site:
Contains copies of some of the slides
N.B. Slides, not notes!
||1.5 hr written exam (75% of the marks)
||Programming project (25% of the marks)
|How to fail:
||Skip lectures & labs; avoid private study; cram the week before the exam; expect the exam to be a memory test
|How to pass:
||Attend lectures & labs; take notes; organize your notes; tackle the lab activities properly; expect a programming exam
- Plagiarism is presenting someone else’s work as your own. It is a violation of
UCC Policy and there are strict and severe penalties.
- You must read and comply with the UCC Policy on Plagiarism
- The Policy applies to all work submitted, including software.
- You can expect that your work will be checked for evidence of plagiarism or
- In some circumstances it may be acceptable to reuse a small amount of work by
others, but only if you provide explicit acknowledgement and justification.
- If in doubt ask your module lecturer prior to submission. Better safe than sorry!
The risk of complacency
- Web Development 1 was
- But Web Development 2 is a programming module
- where we learn two programming languages
Programs on the Web
- Server-side: the program executes on the server
- E.g. Google search, Amazon — anything that must consult a large database, stored on the server
- Programming languages: e.g. Python, PHP, Java, C, …
- Client-side: the program executes on the client
- E.g. simple calculators, simple games, programs to make Web pages more interactive
Programs on the Web
- Often, both server-side and client-side programs are involved, e.g. Facebook
A server-side Python program
from datetime import datetime
<meta charset="utf-8" />
Hello world. It is %s, right now.
</html>""" % (datetime.now().strftime('%H:%M:%S %d-%m-%y')))
Check your understanding
- (Trick question:) What will the browser do with this Python program?
- What is that ugly comment doing there?
- Why do we need the
- Why do we need to print a blank line?
- Why are we using three (double) quotes for the string?
Suppose this program is on our server in Cork. Someone in Australia requests it.
Whose time/date do they see?