Comp150CPA Homework Exercise 2: Services and Interactions
- Objective: to utilize another service to construct a composite service.
- Deliverables: the application URL of your working instance in the
Google sandbox.
- Work mode: exercise/lecture reinforcement, group work and
submissions encouraged.
Overview
In groups of 2-5 people, please create a google AppEngine
application that (sort of) emulates twitter. Until one logs into the
App with one's Google username and password, it shows a stream of the
last 20 ``tweets'' from other users. Logging in allows one to send
tweets to the stream, signed with one's login name. Your tweets
should be seen almost immediately by other people who are watching the
site, either logged in or not.
Suggested steps
Steps in creating this include the following:
- Start from working code for the previous assignment.
- Modify your code to only send and show the last 20 messages
from the persistent store.
- Modify your code to post a message from a login name. Do this
before you contact the user service and check that it works.
- Modify your code to show updates from other sources.
The easiest way is to start a timer and make frequent update
requests of the cloud, e.g., once every 5 seconds.
- Test that this works by running your code in several browsers
simultaneously.
- Use the tutorials to learn how to log in as a Google user.
It might help to write a small example program.
- Include login code in your application, and make the application
change state upon user login.
- Include logout code, and make sure it returns the application to the
prior "watch only" state.
Some hints
- Displaying only the last 20 entries is the same thing as not even
storing the prior ones.
- The key to utilizing the user service is to create the proper links,
as described in last week's lecture. The link contains a link back to your page.
Submitting completed assignments
Click
here
to fill out a form that -- when submitted -- generates a printable
form that can be saved to a file, e.g., hw02.html
.
Please submit this either physically, or by email to ta150cpa@cs.tufts.edu.
Completed assignments will be graded by hand and scanned back into the system.