CSCI 470
Web Science
Spring 2015

Montana Tech
Computer Science & Software Engineering

Language word tutor

You will be creating a web application that mixes together several sources of web information. You will learn how to use a RESTful web API.

Overview. You are working for a company that does English as a second language instruction. Your instructors want a web-based application that lets them easily show students an English word along with a set of pictures representing that word. They would also like the application to also show the translation into a small set of languages (the native languages of the students in a particular class).

Your job is to build a web application mashup using several of Microsoft's web service APIs (Bing Search API and Translator API). The Ajax lecture on the schedule page has links to relevant examples that make use of these APIs. I will provide you with an API key that you can use during the assignment. If you like, you can register with Bing as a developer to get access to Bing's APIs yourself (free up to 5K/month search, 2M character of translation).

You should develop your web application using HTML, JavaScript, and/or PHP. You may NOT use any external or inlined JavaScript libraries that you did not personally write. The overall behavior of the application is demonstrated in the above video. You are free to implement the look-and-feel of the page as you see fit, but it should meet the requirements below.

Getting started. You should first deploy the PHP pages providing a search proxy and a translation proxy to your VM's web server. You will need to modify the PHP file to put in the API key I provided. You can test your proxy pages by also deploying the test HTML pages for search and translation to your server.

Can I use a single XMLHttpRequest object to make multiple parallel requests? No. You'll need to create multiple objects.

All my Ajax requests are served by the same onreadystatechange callback function. Is there a way to tell which request a particular response came from? Not that I could find. You may be able to figure it out based on the response generated by the web service. Another option would be to design your code so it works without this knowledge. Or you could have different callback functions for each type of request, though this may be a little inelegant.

Can I make the languages dynamically configurable in the web application? Sure, but this is not a requirement.
Submission. I will be testing your program on the URL specified in the header of your source. I will be using the Firefox browser. I will be turning on the developer console to see if I can cause any JavaScript errors. You also need to submit your source file(s) to the Moodle dropbox. The Moodle timestamp is the completion time for the assignment.

Page last updated: March 04, 2015