Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Design Implementation

Implementation

We used the Django Web Framework to implement PackPlanner. For the main pages, we simply have links that query the Postgres database for the appropriate information for the current user. We use this information and the Django template tag system to create JavaScript objects that mirror entries in the database. Then, we build the UI from these javascript objects, encoding onclick functions that use object IDs to determine which objects are involved in the user's actions.

Our design focuses on using modals to keep the user from continually changing pages. For this to happen, we had to use AJAX to make a lot of our requests. When a user action requires a database change without a page refresh, we use AJAX to send a request to the server, often to a different URL containing the action name and the object ids. The AJAX requests return JSON objects that indicate the success or failure of a particular database transaction. If the transaction is a success, the response may also contain information used to update the JavaScript objects for correct completion of further user actions. If the transaction is a failure, the JSON response contains some information about what kind of failure to help with safety (although we would like to increase the user safety currently available in our system).

We used Twitter Bootstrap to help lessen the amount of work we would need to do to make the interface visually appealing. However, this decision did come with some tradeoffs. First, we used many Twitter Bootstrap widgets to be consistent, even though some of them did not quite fit into the needs of our system, particularly the use of JavaScript objects and the scaling of the event calendar and minical. We were forced to make some "hacky" solutions that we would have preferred not to do. If we had more time to work on this project, we would look into using other UI toolkits that integrate better with Django and our system as a whole.Implementation here

Evaluation

Evaluation here

...