From dd9213d9d02e8b2e5eb834d4a72abd9aea0470de Mon Sep 17 00:00:00 2001 From: nfoy Date: Mon, 10 Feb 2014 20:22:15 -0500 Subject: Messages/new and private .html Put in the information for these. Unsure if I did it properly. --- docs/DesignDocument.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 98ba57c..b647de4 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -178,10 +178,22 @@ search/results.html triggers a GET request to the relevent controller method. messages/new_alert.html - : TODO + : This shows the user that a new message is available for view. + Clicking on the notification should cause a GET to the + show_private controller and take the user to his/her messages. + new_alert should interact with the Main controller's + show_homepage to display the notification. messages/private.html - : TODO + : This page is used to handle user private messaging. It should + display a list of private message and which user the private + messages are communicating with. Clicking on a message should + trigger a GET to show_private and display the message. A field + box for entering a message should be present. When posting a + message a POST should be sent to Message's post_private and + then a POST to post_alert confirming that it was sent. A + new_alert should then be sent to the recieving user. + tournaments/index.html : TODO: list of tournaments -- cgit v1.2.3 From 2a1eda1683c35eceb6fcf43dac90f43dfb398971 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Feb 2014 20:23:55 -0500 Subject: tidy up DesignDocument-classes --- docs/DesignDocument-classes.dot | 98 ++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 59 deletions(-) (limited to 'docs') diff --git a/docs/DesignDocument-classes.dot b/docs/DesignDocument-classes.dot index eed00d3..d9ef01e 100644 --- a/docs/DesignDocument-classes.dot +++ b/docs/DesignDocument-classes.dot @@ -1,12 +1,13 @@ digraph systemModel { rankdir="LR"; - splines="ortho"; + splines="line"; + /* subgraph _clusterModels { label="Models" node[shape="record"]; - BaseModel[label="
ActiveRecord::Base (abstract)"] + //BaseModel[label="
ActiveRecord::Base (abstract)"] Server[label="
Server"]; Tournament[label="
Tournament"]; @@ -14,53 +15,56 @@ digraph systemModel { Team[label="
Team"]; User[label="
User | role | password hash"]; } + */ subgraph _clusterViews { label="views/"; node[shape="rectangle"] - layouts_application[label="layouts_application (abstract)"] + /* + layouts_application[label="layouts/application (abstract)"] subgraph clusterViewsCommon { label="views/common/"; - common_permission_denied; - common_invalid; + common_permission_denied[label="common/permission_denied"]; + common_invalid[label="common/invalid"]; } + */ subgraph clusterViewsMain { label="views/main/"; - main_homepage; - main_edit; + main_homepage[label="main/homepage"]; + main_edit[label="main/edit"]; } - search_results; + search_results[label="search/results"]; subgraph clusterViewsMessages { label="views/messages/"; - messages_new_alert; - messages_private; + messages_new_alert[label="messages/new_alert"]; + messages_private[label="messages/private"]; } subgraph clusterViewsTournament { label="views/tournament/"; - tournaments_index; - tournaments_show; - tournaments_new; - tournaments_edit; + tournaments_index[label="tournaments/index"]; + tournaments_show[label="tournaments/show"]; + tournaments_new[label="tournaments/new"]; + tournaments_edit[label="tournaments/edit"]; } subgraph clusterViewsMatches { label="views/matches/"; - matches_show; - matches_edit; + matches_show[label="matches/show"]; + matches_edit[label="matches/edit"]; } subgraph clusterViewsTeams { label="views/teams/"; - teams_index; - teams_show; - teams_new; - teams_edit; + teams_index[label="teams/index"]; + teams_show[label="teams/show"]; + teams_new[label="teams/new"]; + teams_edit[label="teams/edit"]; } subgraph clusterViewsUsers { label="views/users/"; - users_index; - users_new; - users_show; - users_edit; + users_index[label="users/index"]; + users_new[label="users/new"]; + users_show[label="users/show"]; + users_edit[label="users/edit"]; } } @@ -68,13 +72,13 @@ digraph systemModel { label="Controllers"; node[shape="record"]; - ApplicationController[label="
ApplicationController (abstract)"]; + //ApplicationController[label="
ApplicationController (abstract)"]; MainController[label="
MainController | show_homepage() | edit_settings() | update_settings()"]; LoginController[label="
LoginController | login() | logout()"]; SearchController[label="
SearchController | show_results()"]; MessagesController[label="
MessagesController | new_alert() | post_alert() | show_private() | post_private()"]; - TournamentsController[label="
TournamentsController | index() | new() | create() | show() | edit() | update() | end()"]; + TournamentsController[label="
TournamentsController | index() | show() | new() | create() | edit() | update() | end()"]; MatchesController[label="
MatchesController | index() | show() | edit() | update()"]; TeamsController[label="
TeamsController | index() | show() | new() | create() | edit() | update()"] UsersController[label="
UsersController | index() | show() | new() | create() | edit() | update() | delete()"] @@ -191,10 +195,7 @@ digraph systemModel { subgraph controller2view { MainController:index -> main_homepage; - MainController:edit -> main_edit -> MainController:update; - #MainController:edit -> common_permission_denied; - MainController:update -> main_edit; - #MainController:update -> common_permission_denied; + MainController:edit -> main_edit -> MainController:update -> main_edit; #LoginController:login -> common_permission_denied; #LoginController:logout -> common_invalid; @@ -202,45 +203,24 @@ digraph systemModel { SearchController:show_results -> search_results; MessagesController:new_alert -> messages_new_alert -> MessagesController:post_alert; - MessagesController:show_private -> messages_private; - MessagesController:post_private -> messages_private; - #MessagesController:new_alert -> commmon_permission_denied; - #MessagesController:post_alert -> commmon_permission_denied; - #Messagescontroller:show_private -> common_permission_denied; - #Messagescontroller:post_private -> common_permission_denied; + MessagesController:show_private -> messages_private -> MessagesController:post_private -> messages_private; TournamentsController:index -> tournaments_index; - TournamentsController:new -> tournaments_new -> TournamentsController:create; - TournamentsController:create -> tournaments_edit -> TournamentsController:end; TournamentsController:show -> tournaments_show; - TournamentsController:edit -> tournaments_edit -> TournamentsController:update; - TournamentsController:update -> tournaments_edit - #TournamentsController:new -> common_permission_denied; - #TournamentsController:create -> common_permission_denied; - #TournamentsController:edit -> common_permission_denied; - #TournamentsController:update -> common_permission_denied; - #TournamentsController:end -> common_permission_denied; + TournamentsController:new -> tournaments_new -> TournamentsController:create -> tournaments_edit -> TournamentsController:end; + TournamentsController:edit -> tournaments_edit -> TournamentsController:update -> tournaments_edit; MatchesController:show -> matches_show; - MatchesController:edit -> matches_edit -> MatchesController:update; - #MatchesController:edit -> common_permission_denied; - #MatchesController:update -> common_permission_denied; + MatchesController:edit -> matches_edit -> MatchesController:update -> matches_edit; TeamsController:index -> teams_index; TeamsController:show -> teams_show; - TeamsController:new -> teams_new -> TeamsController:create; - TeamsController:create -> teams_edit; - TeamsController:edit -> teams_edit -> TeamsController_update; - #TeamsController:new -> common_permission_denied; - #TeamsController:create -> common_permission_denied; - #TeamsController:edit -> common_permission_denied; - #TeamsController:update -> common_permission_denied; + TeamsController:new -> teams_new -> TeamsController:create -> teams_edit; + TeamsController:edit -> teams_edit -> TeamsController:update -> teams_edit; UsersController:index -> users_index; - UsersController:new -> users_new -> UsersController:create; - UsersController:edit -> users_edit -> UsersController:delete; UsersController:show -> users_show; - UsersController:edit -> users_edit -> UsersController:update - # TODO: permission_denied + UsersController:new -> users_new -> UsersController:create -> users_edit -> UsersController:delete; + UsersController:edit -> users_edit -> UsersController:update -> users_edit; } } -- cgit v1.2.3 From 4e810a9f0c19afcda7bcdb00ddfedc4724617b62 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Feb 2014 20:36:13 -0500 Subject: write more views --- docs/DesignDocument.md | 52 +++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'docs') diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 0f0087c..00e2a43 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -26,10 +26,10 @@ sleek web application which manages tournaments. # Non-Functional Requirements -1. Security: - Because Project Leaguer servers may store sensitive user information like name, email, statistics, user-name, profile, etc. it is an important non-functional requirement that such data is well secured from both accidental exposure and intentional tampering. Even so, the System may not be responsible for the theft of user information or even alterations made to the database from a source different from that of Leaguer. -2. Backup: - The Leaguer system provides a user with a database of user information and is updated and stored, which is functional. In contrast, the non-functional requirement of leaguer is its ability to back up all the information of the user when the user chooses to suspend or delete record or even when the user happens to disconnect from the server. -3. Platform Compatibility: - A non-functional requirement for the system is to be able to run on multiple platforms. Primarily a web based application, Leaguer may not be able to install into embedded gaming devices and special operation systems that do not run the interface that Leaguer was initially built on. -4. Response Time: - Even though the "Model 2" architecture tends to scale well for medium/large applications and data sets, it is still important to keep the response time of the system in mind. Using efficient data structures, short time complexity algorithms, and minimizing network overhead whenever possible will help to keep the response time of the system reasonable even for large data sets or complex statists or scoring schemes. +1. Security: - Because Project Leaguer servers may store sensitive user information like name, email, statistics, user-name, profile, etc. it is an important non-functional requirement that such data is well secured from both accidental exposure and intentional tampering. Even so, the System may not be responsible for the theft of user information or even alterations made to the database from a source different from that of Leaguer. +2. Backup: - The Leaguer system provides a user with a database of user information and is updated and stored, which is functional. In contrast, the non-functional requirement of leaguer is its ability to back up all the information of the user when the user chooses to suspend or delete record or even when the user happens to disconnect from the server. +3. Platform Compatibility: - A non-functional requirement for the system is to be able to run on multiple platforms. Primarily a web based application, Leaguer may not be able to install into embedded gaming devices and special operation systems that do not run the interface that Leaguer was initially built on. +4. Response Time: - Even though the "Model 2" architecture tends to scale well for medium/large applications and data sets, it is still important to keep the response time of the system in mind. Using efficient data structures, short time complexity algorithms, and minimizing network overhead whenever possible will help to keep the response time of the system reasonable even for large data sets or complex statists or scoring schemes. # Design Outlines @@ -151,7 +151,9 @@ layouts/application.html (abstract) to `LoginController#login()`, and the button causes a GET to `UserController#new()`. If a user is logged in, it displays a logout button that causes a POST to `LoginController#logout()`. - TODO: alerts, search + It may contain an alert box of recent alerts submitted by a + tournament host. It contains a searc form that is POSTed to + `SearchController#show_results`. common/permission_denied.html : A generic page for when a user attempts to do something for which @@ -162,12 +164,10 @@ common/invalid.html when not logged in). main/homepage.html - : This page has 3 basic options. Visually simple – two large buttons - on a white screen, and a search bar above them. The search bar - will cause a POST request to the search controller. Log in (which - will cause a POST to the login controller) and “Go to Tournament” - in which you enter a tournament title. This interacts with the - Homepage Controller. + : This page is visually simple. In addition to the basic functions + of `layouts/application`, this page has a “Go to Tournament” text + area, in which you enter a tournament title, and will take you to + the relevent tournament page. main/edit.html : This page is a form for editing the server-wide configuration, @@ -178,25 +178,20 @@ search/results.html triggers a GET request to the relevent controller method. messages/new_alert.html - : This shows the user that a new message is available for view. - Clicking on the notification should cause a GET to the - show_private controller and take the user to his/her messages. - new_alert should interact with the Main controller's - show_homepage to display the notification. + : This is a form for a host to submit a new system-wide alert. The + form is POSTed to `MessagesController#post_alert()`. messages/private.html - : This page is used to handle user private messaging. It should - display a list of private message and which user the private - messages are communicating with. Clicking on a message should - trigger a GET to show_private and display the message. A field - box for entering a message should be present. When posting a - message a POST should be sent to Message's post_private and - then a POST to post_alert confirming that it was sent. A - new_alert should then be sent to the recieving user. - + : This page is used to handle user private messaging. It both + displays private messages, and contains a form for sending a new + private message. Nes messages are POSTed to + `MessageController#post_private()` tournaments/index.html - : TODO: list of tournaments + : Shows a list of tournaments. Clicking on any of them causes the + browser GET that tournament via `TournamentController#show()`. If + the user is authorized, it also contains a button that causes the + browser to GET `TournamentsController#new()`. tournaments/show.html : Shows the information for a single tournament. If the user is @@ -218,10 +213,11 @@ tournaments/edit.html `TournamentsController#update()`. matches/index.html - : TODO: list of matches + : Shows a list of matches. Clicking on any of them causes the + browser GET that match via `MatchesController#show()`. matches/show.html - : Shows an individual match; q display of both teams. Each team's + : Shows an individual match; a display of both teams. Each team's players are clickable which causes a GET for the player's profile HTML (`UsersController#show()`). A link above both teams will GET the tournament the match belongs to -- cgit v1.2.3 From 3e913a0f64954b2d7c7869917d674924682598f7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Feb 2014 20:50:45 -0500 Subject: DesignDocument: don't allow manual team creation --- docs/DesignDocument-classes.dot | 3 +-- docs/DesignDocument.md | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/DesignDocument-classes.dot b/docs/DesignDocument-classes.dot index d9ef01e..c91f7b1 100644 --- a/docs/DesignDocument-classes.dot +++ b/docs/DesignDocument-classes.dot @@ -80,7 +80,7 @@ digraph systemModel { MessagesController[label="
MessagesController | new_alert() | post_alert() | show_private() | post_private()"]; TournamentsController[label="
TournamentsController | index() | show() | new() | create() | edit() | update() | end()"]; MatchesController[label="
MatchesController | index() | show() | edit() | update()"]; - TeamsController[label="
TeamsController | index() | show() | new() | create() | edit() | update()"] + TeamsController[label="
TeamsController | index() | show() | create() | edit() | update()"] UsersController[label="
UsersController | index() | show() | new() | create() | edit() | update() | delete()"] } @@ -215,7 +215,6 @@ digraph systemModel { TeamsController:index -> teams_index; TeamsController:show -> teams_show; - TeamsController:new -> teams_new -> TeamsController:create -> teams_edit; TeamsController:edit -> teams_edit -> TeamsController:update -> teams_edit; UsersController:index -> users_index; diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 00e2a43..58c78c5 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -233,9 +233,6 @@ teams/index.html teams/show.html : TODO: show individual team -teams/new.html - : MAYBE TODO: form to create a new team - teams/edit.html : TODO: form to edit a team @@ -347,8 +344,6 @@ TeamsController - `index()` TODO: GET - `show()` TODO: GET - - `new()` MAYBE TODO: GET - - `create()` MAYBE TODO: POST - `edit()` TODO: GET - `update()` TODO: POST -- cgit v1.2.3 From 8596b22b91d59f4591634efb9cb4334076ddc30a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Feb 2014 20:50:59 -0500 Subject: DesignDocument: finish writing the views --- docs/DesignDocument.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 58c78c5..65603c4 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -171,7 +171,8 @@ main/homepage.html main/edit.html : This page is a form for editing the server-wide configuration, - such as the language or the graphical theme. + such as the language or the graphical theme. The form is + submitted to `MainController#update()`. search/results.html : Shows the results of a search. Each item is clickable and @@ -214,43 +215,52 @@ tournaments/edit.html matches/index.html : Shows a list of matches. Clicking on any of them causes the - browser GET that match via `MatchesController#show()`. + browser to GET that match via `MatchesController#show()`. matches/show.html : Shows an individual match; a display of both teams. Each team's players are clickable which causes a GET for the player's profile HTML (`UsersController#show()`). A link above both teams will GET the tournament the match belongs to - (`TournamentsController#show()`). This will POST its actions to - the Match controller. TODO: What will POSTing do? + (`TournamentsController#show()`). If the user is authorized, it + also has a button to edit the match by GETting + `MatchesController#edit()`. matches/edit.html - : TODO: form to adit a match + : Shows a form to edit a match. The form is POSTed to + `MatchesController#update()`. teams/index.html - : TODO: show list of teams + : Shows a list of teams. Clicking any of them causers the browser + to GET that team via `TeamsController#show()`. teams/show.html - : TODO: show individual team + : Show an individual team, including statistics, and links to + individual members (GET `UsersController#show()`). If the user is + authorized, it also has a button do edit the team by GETting + `TeamsController#edit()`. teams/edit.html - : TODO: form to edit a team + : A form to manually edit a team, and its members. The form + contents are POSTed to `TeamsController#update()`. users/index.html - : TODO: list of users + : Show a list of users. Clicking any of them causers the browser + to GET that user via `UsersController#show()`. users/new.html - : One for repeating the password, and one for email. This POST to - the Login controller. TODO: complete sentences + : Shows a form for creatig a new user. It includes fields for + username, email, password, and other information. The form is + POSTed to `UsersController#create()`; users/show.html : A page with the user's information. One can view the player's - reviews. If the user is viewing his/her own profile, they can edit - it causing a POST to the userProfile controller. TODO: fix + reviews. If the user is authorized, it also has a button do edit + the user by GETting `UsersController#edit()`. users/edit.html - : TODO - + : A form to edit a user; including meta-data and tournament + registration. The form is POSTed to `USersController#update()`. ### CONTROLLERS -- cgit v1.2.3