CSC 551: Web Programming
Spring 2004

Test 2 Review

TEST 1 MATERIAL Client-side Programming with 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, ArrayList, LinkedList, HashMap,... 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 Java Archive (JAR) files: multiple Java files/classes zipped together JavaBeans: reusable, packaged components Integrating JavaScript & Java calling Java routines from JavaScript: possible under 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 using POST, program reads from standard input URL-encoded data contain field names & values program writes to standard output: response header + blank + page data CGI in Perl free, portable, simple scripting language w/ support for CGI ( output via print("..."), print(<<LABEL)...LABEL variables are not declared & untyped (as in JavaScript), begin with $ arrays are declared using @, accessed using $[] control structures similar to C++/Java/JavaScript, simple file I/O