HW#3 --- last modified March 02 2019 13:33:15..Due date: Oct 25
Files to be submitted: Purpose: To learn about XML, web services, and databases. Related Course Outcomes: rest.html is related to learning outcome (6) [ Develop and deploy web applications that involve components, web services, and databases]. Here we are using the Yahoo REST web services. The bookmark DTD and XSD and XML files directly address learning outcome (3) [Write XML schemas, XML stylesheets, DTDs, and conforming XML documents] . The file bookmark.sql is also preliminary to a second pass at learning outcome (6) on a later assignment. Specification: For the first part of this assignment I want you to experiment with a small part of the extensive Yahoo Web Services REST API. Details about the particular services we will be interested in can be found at: I want you to write a page, rest.html, with a form having a text field and two buttons on it. It should look somewhat like the following: Search: [ ] [News Search] [Image Search] When you enter a query and click on [News Search] the onclick event should be trapped, and a REST query should then be made to the Yahoo News Search Service via a proxy on your server. Yahoo! provides the following useful PHP proxy script which you should use. Call it proxy.php and have it live in the same directory as your rest.html file. You should request only 5 results be returned from Yahoo News Search Service and get these results as an XML document. I want you to insert this document dynamically in a div tag on your page without doing a page change or refresh. I want you to use CSS to style the results so that it looks good. When you enter a query and click on [Image Search] the onclick event should be trapped, and a REST query should then be made to the Yahoo Image Search Service. You should request only 5 results be returned and get these results as an JSON data. I then want you to use this JSON data to display up to five thumbnails dynamically in a div tag on the current page. Each thumbnail should be clickable to the images contained in the result set. For the second part of the assignment, I want you to come up with a DTD and a XML-schema for storing bookmarks which might be used in a social bookmarking site. These should be written in the files bookmark.dtd and bookmark.xsd . A bookmark should at least include a title, a url, a description, a rank of how intersting it was, and a list of people who suggested it. I then want you to write two example documents, bookmarkdtd.xml, and bookmarkxsd.xml which should validate against your DTD and your schema. Finally, for the last part of your assignment I want you to create an SQL script which creates tables which could be used to store your book mark data. Call this script bookmark.sql . Have your script also insert a couple of rows into each of the tables you create. Put all the bookmark files above into the file bookmark.zip Point Breakdown
|