Server Requests

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 39: Line 39:
 
[[Image:initial.png]]
 
[[Image:initial.png]]
  
XRequest is the abstract implementation of IRequest implementing the shared functionality. Each request is defined by a collection of name-value pairs representing the request HTTP POST parameter names and values. All different request types in essence exist so that they can ensure the right parameters (&types) are sent. An HTTP POST request is simply a unique list of required parameters.
+
XRequest is the abstract implementation of IRequest implementing the shared functionality. Each request is defined by a collection of name-value pairs representing the request HTTP POST parameter names and values. All different request types in essence exist so that they can ensure the right parameters (&types) are sent. An HTTP POST request is simply a unique list of required parameters - different requests yield different parameter lists as the concrete XRequest implementations indicate. The abstract GetPOSTParameters() method is left for concrete implementations to implement.

Revision as of 09:48, 28 July 2010

Contents

My Project

Background

My design study is related to my part time job, where I am developing an application that can retrieve and plot data from a device that monitors air quality. The application is connected to a back end server where certain data is stored.

User operations that require communication with the server roughly include:

  • Requesting help (and that the user be contacted)
  • Electronically registering a device
  • Calibrating a device - data about the calibration process is uploaded

Additionally, server communication is needed when the application:

  • Authenticates with the server
  • Pings the server to ensure network connectivity

My goal here is to create a design for the application side server interface framework. HTTPS POST requests are to be used to transfer data to the server.

Requirements

As this is a just a part of the app, the requirements are largely self imposed & generic:

  • something that works
  • is as nicely designed as practical
  • is as easy to understand and maintain as practical
  • is flexible so that new server requests can be added without much hassle

And not to forget:

  • apply & learn better OO techniques

Design Study

Deliverables

  • Classes that model the different request types
  • Classes that allow requests to be sent over the network

Initial Design

This is my initial attempt at the design.

Initial.png

XRequest is the abstract implementation of IRequest implementing the shared functionality. Each request is defined by a collection of name-value pairs representing the request HTTP POST parameter names and values. All different request types in essence exist so that they can ensure the right parameters (&types) are sent. An HTTP POST request is simply a unique list of required parameters - different requests yield different parameter lists as the concrete XRequest implementations indicate. The abstract GetPOSTParameters() method is left for concrete implementations to implement.

Personal tools