CSC 551: Web Programming
Spring 2001

Course Overview

Specific goals for the course To develop an understanding of the technology and protocols underlying the Web. To become familiar with the common tools and techniques for developing Web-based applications, both client-side and server-side. To develop a working knowledge of HTML, JavaScript, and Java as languages for developing Web applications. Skills developed programming & problem solving interface design and implementation ability to research and learn from external sources collaborative learning & development Internet & Web technologies history of Internet networking 7-layer model, TCP/IP protocols history of World Wide Web HyperText Transfer Protocol (HTTP) GET/POST requests, request headers (e.g., If-Modified-Since, ...) response headers (e.g., status code, Last-modified, ...) caching, cookies static vs. dynamic pages, client-side vs. server-side programming Web development HyperText Markup Language (HTML) tags vs. elements structural elements, text layout, text styles, lists hyperlinks, images, tables, frames style sheets STYLE attribute for an element vs. STYLE tag in HEAD vs. STYLE file Client-side Programming JavaScript language constructs variables: loosley typed, don't have to declare assignments, operators, control statements similar to C++ predefined functions (e.g., Math.sqrt) user-defined functions: typeless, can declare local variables predefined classes/objects: String, Array, Date, document, navigator user-defined classes: awkward to define, no info hiding serial programs code is embedded in SCRIPT tags, executed when page loads output produced by document.write appears in page event-driven programs code is specified in page elements, called to handle events e.g., OnClick, OnMouseOver, OnMouseOut events for link/image form elements: button, text box, text area, selection list, ... properties: e.g., name, type value methods: e.g., blur(), focus(), click() event handlers: e.g., onblur, onfocus, onchange, onclick, ... techniques: form validation, output to window/frame, timeouts, cookies Java design goals platform independence, portable, secure, simple, object-oriented, ... source code compiled into Java byte code, then interpreted language constructs basic syntax similar to C++, but simpler & more robust class vs. instance variables/methods, primitive vs. reference types no explicit pointers, automatic garbage collection extensive library support: String, Array, Vector, Stack, HashTable, ... no templates, but can store arbitrary Objects via inheritance, wrappers Java applets inherit from Applet class, default methods include init, paint, ... APPLET & OBJECT tags, applet parameters & dimensions Graphics object, methods (drawRect, drawString, ...), double buffering GUI elements, applet layout, event handling JavaBeans: reusable, packaged components Java Archive (JAR) files: multiple Java files/classes zipped together Integrating JavaScript & Java calling Java routines from JavaScript: possible using Netscape calling applet methods from JavaScript: document.APPLET_NAME.METHOD_CALL(...) accessing HTML/JavaScript from an applet: more complex, use JSObject class extract window object, document object, form object, field object, ... Server-side programming advantages: cross-platform, more tools/power, code integrity Common Gateway Interface (CGI) language-neutral protocol for Web server/program communication reads from standard input: URL-encoded data containing field names & values writes to standard output: response header + blank + page data server-specific technologies Netscape ONE, including LiveWire (Server-Side JavaScript) Microsoft DNA, including Active Server Pages server-independent technologies: Java servlets server-side equivalent to applets; similar to CGI but executed by server advanced Web development tools: Cold Fusion vs. WebObjects Emerging technologies Dynamic HTML, ActiveX, XML