MCS-270 User-Interface (Web Application) Lab (Spring 2012)

In class March 26, 27, and 29, 2012; due April 10, 2012

In this lab project, you will work in pair-programming fashion on the objectives listed below. Let me know if you want any suggestions for extra-credit extensions to this project.

  1. Try out the deployed version of application at maxmsgboard.appspot.com so you can see what you'll be working on. Among other things you should see that a message I posted days ago is still present and that if you remain on the site, messages posted by other students appear. This version is the same as the one you'll be starting from, although so long as you run it in Eclipse's Development Mode rather than deploying to Google's AppEngine, you won't be able to see any communication between different users. (Although you can use multiple Chrome windows and can log out and log back in; your messages should remain.)

  2. Log into GitHub.com.

  3. Create, on GitHub, your own fork of my Max-Hailperin/MessageBoard repository.

  4. Import the MessageBoard project from that repository into Eclipse, creating a local clone of your repository.

  5. Run the project as a Web Application. When the URL appears, right-click it and add Google Chrome as the browser to use, entering the location /Applications/Google Chrome.app in the appropriate field. Once the project has fully loaded into the browser, try it out.

  6. After you've posted some messages, in another browser window visit the administrative console at 127.0.0.1:8888/_ah/admin. You should be able to see the entities you've inserted into the datastore. If you delete some and reload the Message Board browser window, you'll see they are gone.

  7. In Eclipse, open up the Message.java source file in the edu.gac.mcs270.messageboard.shared package. Add one more persistent field, the Date at which the Message was posted. (The Date class needs to be imported from the java.util package.) In the Message constructor, initialize this field to a Date representing the current date and time, which you can get from the default constructor, new Date(). Also, add a getter method to provide public access to your newly added field.

  8. Reload the Development Mode server with the yellow arrows button reload button and reload the Chrome browser window. Although the dates don't show up in the Message Board user interface yet, if you post any new messages and look at the datastore in the administrative console, you should see that the Message entities now include the information on when they were posted.

  9. Modify the user interface, which is in the MessageBoard.java source file within the edu.gac.mcs270.messageboard.client package. You should display the date/time each message was posted.

  10. I designed the application so that when the Message Board is newly loaded into a browser window and it updates the list of messages for the first time, the amount of time spent on the client side, the server side, and communicating between them are all kept modest even if the datastore contains lots of messages. Put a comment on the appropriate line in the server's MessageStoreImpl.java saying "keeps initial updates fast."

  11. If a Message Board browser window is left open, it may over time accumulate a lot of messages, but each time it communicates with the server for an update, the communication is kept brief because only the new messages (if any) are fetched from the datastore and transferred. Put a comment on the appropriate line in MessageStoreImpl.java saying "limit to new messages".

  12. Submit your work as before: commit it to your local repository, push it to your GitHub repository, and send me a pull request on GitHub.