13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FilterFirewallFlat-fileGIF318functioning as a mail reader, USENET news reader, Webbrowser, shell, calendar, calculator, and Lisp evaluator.Emacs is infinitely customizable because users can writetheir own commands in Lisp. You can find out more aboutEmacs at ftp://publications.ai.mit.edu/aipublications/pdf/AIM-519A.pdf(Stallman's 1979 MIT AI Labreport), at www.gnu.org (where you can download thesource code <strong>for</strong> free), or by reading Learning Emacs(Cameron et al 1996; O'Reilly). If you want to programEmacs and then you'll want Writing Gnu Emacs Extensions(Bob Glickstein 1997; O'Reilly).The best Web server APIs allow the programmer to say "runthis little piece of code be<strong>for</strong>e [or after] serving files thatmatch a particular URL pattern." Filters that run after a file isserved are useful if you want to add extra logging to anapplication. Filters that run be<strong>for</strong>e a file is served or a scriptis run are useful <strong>for</strong> implementing a security policy in aconsistent fashion rather than relying on the authors ofindividual scripts to insert an authentication check.A computer that sits between a company's internal networkof computers and the public <strong>Internet</strong>. The firewall's job is tomake sure that internal users can get out to enjoy thebenefits of the <strong>Internet</strong> while external crackers are unable tomake connections to machines behind the firewall.A flat-file database keeps in<strong>for</strong>mation organized in astructured manner, typically in one big file. A desktopspreadsheet application is an example of a flat-file databasemanagement system. These are useful <strong>for</strong> Web publisherspreparing content because a large body of in<strong>for</strong>mation canbe assembled and then distributed in a consistent <strong>for</strong>mat.Flat-file databases typically lack support <strong>for</strong> processingtransactions (inserts and updates) from concurrent users.Thus, collaboration or ecommerce Web sites generally relyon a relational database management system as a backend.Graphical Interchange Format. Developed in 1987 byCompuServe, this is a way of storing compressed imageswith up to 256 colors. It became popular on the Webbecause it was the only <strong>for</strong>mat that could be displayed inlineby the first multi-plat<strong>for</strong>m Web browser (NCSA Mosaic).The JPEG image file <strong>for</strong>mat results in much better lookingimages with much smaller sized files.If you're using Microsoft .NET, you'll find the examples inhttp://philip.greenspun.com/seia/examples-basics/dot-net-examples/helpful.Exercise 1: Finding your place in the worldFind your Web server's page root, the directory where the Webserver begins looking <strong>for</strong> files. Put a file there named "index.html"and fill it with text identifying this as your server. Include yourhyperlinked email address at the bottom of the page.Connect to your server from a Web browser, using only the hostname. For the rest of this problem set we're going to assume thatyour hostname is "yourhostname.com". Verify that when you requesthttp://yourhostname.com your customized page is presented (if youget a directory listing instead your Web server is probably notconfigured to look <strong>for</strong> index files named "index.html"; you'll have toreconfigure your server). Now use an HTML validator to make surethat your HTML is legal (seehttp://dir.yahoo.com/Computers_and_<strong>Internet</strong>/Data_Formats/HTML/Validation_and_Checkers/ <strong>for</strong> a list of programs and services).You've made at least two requests from your Web server now. Thesewill have been logged in the server access log. Find it in the filesystem and verify that the times and files requested shown makesense to you.Exercise 2: Your first programCreate a subdirectory called "basics" at the same level in the filesystem as the index.html file that you just created, i.e., basics shouldbe one level below the Web server root. This directory should beaccessible at http://yourhostname.com/basics/Put a file in the directory so that it is accessible athttp://yourhostname.com/basics/my-first-program (if you haven't yetfigured out how to implement abstract URLs, this may be "my-firstprogram.pl"or "my-first-program.asp" or similar).When we visit http://yourhostname.com/basics/my-first-program weshould see the current time wrapped in a legal HTML page of somesort, signed with your email address.Add some code that will generate a divide-by-zero error to yourprogram. Find and visit the server error log to see how this error is31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!