Prototype/Demo
The prototype or demo project is a simple web application that demonstrates a rudimentary implementation of the Notes function. Features are:
- web application, deployable in OAS or Tomcat
- static web page, based on Online Reg "Registration Summary" page.
- AJAX used to read & write notes data
- REST API used as the back end for the AJAX calls
- Spring MVC Controller used to implement REST API
- Data returned from REST API is in JSON format
- Remainder of back end is standard Service, DAO, Domain classes.
Source Code
The source code itself is in Subversion at:
svn+ssh://svn.mit.edu/csf-playground/notes-proto/trunk
Screenshots
Assuming the app is running locally, the URL for the demo page would be something like:
http://localhost:8080/notes-proto/index.html
Initial State
In this shot, an existing note has been loaded from the database (via an AJAX GET request). The note is presented "read only", with an Edit button next to it.
Edit Mode
After the Edit button is pressed, the note field becomes editable. The Edit button is removed, and a Save button appears. In the demo, any changes to the text will be persisted to the database if the Save button is pressed. This happens via an AJAX POST request.
Here is the note field in Edit mode:
Adding a new Note
There is one "Add Note" button below all the comments. Clicking this will open up a new empty note field, with its own Save button at the side. Currently (10/3/2012) the Save button does not save data to the database.
Here is the new Note field, resulting in a click on "Add Note":