200 likes | 411 Views
Fundamentals of Web Programming. Lecture 1: Introduction. Today’s Topics. Background Survey Overview of the Course Web Programming Defined. Course Format. Lectures MWF 1:30-2:50 (in 146, except 5/17: Mellon Aud) Regular TA Office Hours (TBA) Instructor Office Hours by Appointment
E N D
Fundamentals ofWeb Programming Lecture 1: Introduction Lecture 1: Introduction
Today’s Topics • Background Survey • Overview of the Course • Web Programming Defined Lecture 1: Introduction
Course Format • Lectures MWF 1:30-2:50(in 146, except 5/17: Mellon Aud) • Regular TA Office Hours (TBA) • Instructor Office Hours by Appointment • Best Way to Reach Us:ehn@cs.cmu.edukczuba@cs.cmu.edu Lecture 1: Introduction
Course Syllabus • Web Site/Page Design (2 lectures) • HTML (4 lectures) • WWW Protocols (2 lectures) • Programming Fundamentals • Server-side scripts (3 lectures) • Client-side scripts (2 lectures) • Java apps/applets/etc. (3 lectures) • Mini-Project (4 lectures) Lecture 1: Introduction
Grading • Background Exercises 15% • Homeworks 25% • Mini-Project 30% • Final Examination 30% • TOTAL 100% Lecture 1: Introduction
Course Web Site • Contact Information • Syllabus • Detailed Schedule • eLibrary • Chat Room • Pending: FAQ, Tutorials, … Lecture 1: Introduction
Surviving the Course • Lectures will be structured to include prerequisite concepts, main lecture, demos, and on-line exercises • Don’t fall behind - schedule meetings with TA or instructor • We want to know where you need extra help… or an extra challenge! Lecture 1: Introduction
Web Programming Defined • What are Programs? • Why is Web Programming Different? • Web Programming Basics • Web Pages (content delivery) • Elements of Web Pages (content) • URLs, HTTP, CGI (content requests) Lecture 1: Introduction
What are Programs? • A program is a sequence of written instructions which is compiled and executed by a computer • A script is a program which runs directly without pre-compilation • Web pages can be thought of as scripts which are interpreted by web browsers Lecture 1: Introduction
Program Binary Code Compiler (executed by CPU) (executed by CPU) Script HTML Interpreter Browser Result Result Output (executed by CPU) Programs vs. Scripts Lecture 1: Introduction
HTML Output Applet Browser PDF Java Acrobat Browsers and Plug-ins • A plug-in is an adapter which lets browsers work with non-HTML • e.g. Java VM: Java applets • e.g. Acrobat: PDF files Lecture 1: Introduction
Web Programming • Programs usually get their data from the local disk • Web browsers get their ‘programs’ (HTML) from the local disk or remotely from a web site on the Internet • Web programming is inherently a client-server enterprise Lecture 1: Introduction
HTTP Request Web Server Web Browser Pages Remote Computer Your Computer HTML Page CLIENT SERVER Web Clients and Servers • The ‘client’ is usually the browser • The ‘server’ is usually a web server • Client-server communication relies on network protocols Lecture 1: Introduction
Techniques We Will Learn • Creating HTML pages and organizing them into web sites • Scripting on the server side for content delivery (Perl) • Scripting on the client side for interactive content (Javascript) • Programming on the client side and server side (Java) Lecture 1: Introduction
Protocols: CGI (Common Gateway Interface) HTTP (Hypertext Transfer Protocol) Content Authoring: HTML (Hypertext Markup Language) Web Server Web Browser Pages CLIENT SERVER Server Scripts: Perl Server Programs: Java Servlets Client Scripts: Javascript Client Programs: Java Applets Putting it All Together Lecture 1: Introduction
Content Cornucopia • Text (ASCII, HTML, …) • Graphics (GIF, JPEG, …) • Multimedia (sound, video, …) • Links (relative, external, …) • Programs (applets, plug-ins, …) Lecture 1: Introduction
Content Delivery • Content is Delivered by Web Pages • Web Pages are Programs • Web Browsers ‘Run’ Web Pages • Web Pages Can Contain Errors • Not All Browsers Are the Same • Other Means of Content Delivery: Streaming Media, Email, … Lecture 1: Introduction
Generate and Test • Programs: Edit / Compile / Test / Debug • Scripts: Edit / Test / Debug • HTML: Edit / Browse / Debug • When learning a new technique, try a simple example in your browser Lecture 1: Introduction
The Programming Process • Old Days: ‘Programmer as Guru’ • Today: ‘Programmer as Engineer’ • Basic Software Engineering Steps • Requirements Analysis & Specification • Designing a Solution to the Problem • Plan the Implementation, then Build • Document Everything • Leave Plenty of Time for Testing Lecture 1: Introduction