Lecture 31: ChatApp Interfaces

Ambient Temperature: 75.5oF

Concepts

  1. How to Design Software
    1. Use Cases: Talk to your user(s) and find out what they want the application to do. When that’s done, you know what tasks your application must be able to accomplish in order to satisfy the user. These will not be phrased in terms of code at all, as the users don’t know or care about code. Example: “Talk to multiple groups of people over the internet.”
    2. Specification: Using your knowledge as a programmer and the Use Cases from step 1, enumerate all of the tasks that your program must be able to perform in order to satisfy the use cases. Example: “Allow user to choose an avatar graphic from their local machine.” versus the use-case of “I want to be able to have a picture display next to my name.”
    3. Protocol: Describe a language for your program to use to communicate that will allow it to fulfill all of the tasks in the Specification, including:
      1. The format of its input.
      2. The format of its output.
      3. Assumptions that your program makes about the input it receives.
      4. Assumptions that third parties can make about your program’s output.
    4. Interface: Using your knowledge as a programmer, design a code interface that will allow you to implement the Protocol.
    5. Test Cases: Write test cases to for the code interface that can be used to verify its functionality.
    6. Implementation: Write the code that implements the Protocol.
  2. Dr. Wong decided that the protocol for Homework 8 will be a fully peer-to-peer model. There will be no notion of centralization.
  3. Design decisions by the class:
    1. Connection to other clients will be handled with one RMI stub per activity.
    2. There will be separate stubs for pre-conversation methods and for the methods involved in participating in a conversation.
    3. The pre-conversation stub will be called IHost. Different machines will exchange IHost stubs before they can chat with each other.
    4. IHost‘s method that will be called by a remote host to send it a data packet will be called receive(…).

Resources

  1. Lecture 31 Webpage: http://www.clear.rice.edu/comp310/f12/lectures/lec31/
  2. Some people collaborating on Google Docs:  https://docs.google.com/a/rice.edu/document/d/1gjDWVNwe5zArtCF1MeePVy37-9U7f0uJRGvCkT3ZHgA/edit