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.

The one-term cram courseWhen teaching this material in one semester it is important thatstudents set up their environments be<strong>for</strong>e the first class meeting. Astudent might have to reinstall operating systems and relationaldatabase management systems, contact technical support, orabandon an initial choice of tools.The one-year thorough courseThere are several possible reasons <strong>for</strong> spreading this material over afull year:• students who don't appreciate or can't handle a gung-hopace• students working individually rather than in teams (morecoding per student)• opportunity to go deeper into some of the underlyingconcepts and systems• opportunity to launch services to real users mid-way throughthe courseIf we had an extra semester we would devote more attention to theinner workings of the relational database management system,demystifying the SQL parser and the various methods <strong>for</strong> handlingconcurrency. We would have the students look more carefully at theHTTP standard, possibly building their own simple Web server. Wewould cover some of the more exotic Web Consortium work, such assemantic Web and RDF and multi-modal interfaces. We woulddevote more time to per<strong>for</strong>mance measurement and engineering. Wewould push the teams and clients to launch their sites to real usersas quickly as possible so that the students could learn from useractivity and user feedback.It would be nice to include a section on high-level <strong>for</strong>mal specificationof page flow and data model. Un<strong>for</strong>tunately as of 2003 there are notools available <strong>for</strong> this that compile into standard executablelanguages such as SQL and Java. A quick glance at UnifiedModeling Language (UML) might make one think that this is a usefulnod in the direction of <strong>for</strong>mal specification of <strong>Internet</strong> applications.Un<strong>for</strong>tunately UML cannot be compiled into a working system norcan it be verified against a system built in executable languages suchas SQL and Java. Even if students mastered the 150 primitives ofUML, the only thing that they would learn is that people in the ITindustry can get paid high salaries despite never have learned to2.3 CookiesInstead of playing games with rewriting hyperlinks in HTML pages wecan take advantage of an extension to HTTP known as cookies. Wesaid that we needed a way to write some in<strong>for</strong>mation out to anindividual user that will be returned on that user's next request. Thefirst paragraph ofhttp://home.netscape.com/newsref/std/cookie_spec.html readsCookies are a general mechanism which server side connections(such as CGI scripts) can use to both store and retrieve in<strong>for</strong>mationon the client side of the connection. The addition of a simple,persistent, client-side state significantly extends the capabilities ofWeb-based client/server applications.How does it work? After Joe Smith adds a book to his shopping cart,the server writesSet-Cookie: cart_contents=1588750019; path=/As long as Joe does not quit his browser, on every subsequentrequest to your server, the browser adds a header:Cookie: cart_contents=1588750019Your server-side scripts can read this header and extract the currentcontents of the shopping cart.Sound like the perfect solution? In some ways it is. If you're acomputer science egghead you can take pride in the fact that this is adistributed database management system. Instead of keeping a biglog file on your server, you're keeping bits of in<strong>for</strong>mation onthousands of users' machines worldwide. But one problem withcookies is that the spec limits you to asking each browser to store nomore than 20 cookies on behalf of your server and each of thosecookies must be no more than 4 kilobytes in size. A minor problem isthat cookie in<strong>for</strong>mation will be passed back up to your server onevery page load. If you have indeed indulged yourself by parking 80Kbytes of in<strong>for</strong>mation in 20 cookies and your user is on a modem,this is going to slow down Web interaction.A deeper problem with cookies is that they aren't portable <strong>for</strong> theuser. If Joe Smith starts shopping from his desktop computer at workand wants to continue from a mobile phone in a taxi or from a Webbrowser at home, he can't retrieve the contents of his cart so far. Theshopping cart resides in the memory of his computer at work.33415

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

Saved successfully!

Ooh no, something went wrong!