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.

In this example, we:194• ask the caller whether theyprefer dogs or cats• listen <strong>for</strong> a response• redirect the caller toanother location based onthe response.The structure of the VoiceXML codein this example is basically identicalto that of the "Hello, World"example, with a few additionalelements. The top two lines arepresent in every VoiceXML 2.0document. Next, we have a <strong>for</strong>m;this time the <strong>for</strong>m is named, as wemust do if we are to have more thanone <strong>for</strong>m in a document.We created a variable calledfavorite_animal using the tag. After we've prompted the user<strong>for</strong> a response, we have to specifywhat the user is allowed to answerby defining a grammar. You'll findthat various gateways tend to usedifferent grammar <strong>for</strong>mats. Thegrammar in this example is in theGSL (Nuance's GrammarSpecification Language) <strong>for</strong>mat,which is used by Tellme andBeVocal, among others. Thegrammar above specifies that if theuser says "dog" or "dogs", the valueof favorite_animal becomes "dogs."If they respond "cat" or "cats",favorite_animal will be set to "cats".Note on grammarsIn VoiceXML 1.0, the W3C didnot specify the grammar <strong>for</strong>mat,allowing each VoiceXML plat<strong>for</strong>mto implement grammars as theychose. In VoiceXML 2.0, eachplat<strong>for</strong>m is required to implementthe XML <strong>for</strong>mat of the W3C'sSpeech Recognition GrammarFormat (SRGF), the latest draftof which is available fromhttp://www.w3.org/TR/grammarspec/.In one vendor's implementation,the following SRGF grammar canbe used in place of the grammarin the example:dogdogscatcatsHowever, other vendors haveimplemented the SRGF slightlydifferently. As the SRGFspecification graduates from a"candidate recommendation",vendors' implementations ofSRGF should converge.That's all there is to getting userinput. Now we can use the value of their response in our program. Inthis example, if their answer is "dogs", they will be sent to a <strong>for</strong>mAn early example of the <strong>for</strong>um-as-community isUSENET, which was started in 1979. Eachnewsgroup is a more or less self-containedcommunity of people interested in a particular topic,collaborating through a threaded discussion <strong>for</strong>um.A good example is rec.aviation.soaring,where people talk about flying around in airplaneswithout engines.In a USENET group the magnet content can be anylongish posting from a recognized expert. Keep inmind that the number of people using a group suchrec.aviation.soaring is fairly small--mostpeople get nervous in little planes and even more nervous in a littleplane with no engine. An analysis of November 2001 by Marc Smith'snetscan.research.microsoft.com service shows that thegroup had only 149 "Returnees". Thus it will be fairly straight<strong>for</strong>ward<strong>for</strong> these core users to recognize each other by name or emailaddress. A typical magnet content posting in a newsgroup is the FAQor frequently asked questions summary in which each question hasan agreed-upon-by-the-group-experts answer.The means of collaboration in the USENET groupis the ability <strong>for</strong> any member to start a new threador reply to a message within an existing thread. Inthe early days of USENET the means of browsingand searching were reasonably good <strong>for</strong> recentmessages but terrible or non-existent <strong>for</strong> learningfrom older exchanges. Starting in the mid-1990sAviation in itselfis not inherentlydangerous. Butto an evengreater degreethan the sea, itis terriblyun<strong>for</strong>giving ofanycarelessness,incapacity orneglect.-- Captain A. G.Lamplugh, 1930sIf the enginestops <strong>for</strong> anyreason, you aredue to tumble,and that's allthere is to it!-- Clyde CessnaWeb-based search engines such as DejaNews provided fast andeasy access to old messages.USENET has traditionally been weak on the 4th required element("means of delegation of moderation"). Not enough people havevolunteered to moderate, software to divide the ef<strong>for</strong>t of moderating asingle <strong>for</strong>um among multiple moderators was non-existent, and thenews protocols had security holes that let commercial spammessages through even on moderated groups. For an overview ofthe circa 2001 state of the art, readhttp://www.landfield.com/usenet/moderators/handbook/. For adiscussion of spam in history, seehttp://www.templetons.com/brad/spamterm.html by Brad Templeton,whose site contains a lot of other interesting articles on the history of<strong>Internet</strong>.155

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

Saved successfully!

Ooh no, something went wrong!