A consistant URL scheme for interacting with the application.
A consistent URL scheme for interacting with the application is required, e.g. '/ladder', '/rules', '/stats/monthly' etc. Once this URL scheme has been finalized, it must be implemented in a disbatcher or processor that performs the expected actions.
Blueprint information
- Status:
- Started
- Approver:
- Scott Armitage
- Priority:
- Undefined
- Drafter:
- Scott Armitage
- Direction:
- Needs approval
- Assignee:
- PyngPyng developers
- Definition:
- Approved
- Series goal:
- Accepted for trunk
- Implementation:
- Good progress
- Milestone target:
- 0.1
- Started by
- Scott Armitage
- Completed by
Whiteboard
In keeping with the RESTful-web concept, PyngPyng uses GET, PUT, and POST methods for all requests -- GET requests *return* information only; no changes are made[1]; PUT requests are mostly not used; POST requests modify information in the ladder storage engine. At present, the thought is to use something such as:
/ -- show the overall ladder ranking for all players; query parameters include sort columns
/{username} -- show the detailed statistics for a particular user
/{username}
/{username}/vs -- show the "vs" statistics for a particular user
/+game -- post a set of game results
/+user -- add a new user to the ladder
/+retire -- retire a user from the ladder
/rules -- show the game rules
/retired -- show the retired players
In general, `action` functions (such as /+game, /+user, and /+retire) are dual-purpose -- if the user makes a GET request, the action returns the input display and/or feedback of failed cases; if the user makes a POST request, the submit form is processed and the action is carried out. The user should be returned somewhere after a successful action with a message indicating success. Perhaps a generic "messages" block could be useful -- green, yellow, and red for success, warning, or failure respectively. This should be accounted for in bp:pyng/+spec/theme and bp:pyng/
[1] Note that changes may be made to the storage engine such as indexing or storing computed values for later use; what is implied is that none of the fundamental data are altered (i.e. no games are added, etc.).