From 49dda73ced1dc2257a7566f9ac522e72e92c1edf Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Feb 2014 19:58:30 -0500 Subject: work on DesignDocument-classes.dot --- docs/DesignDocument-classes.dot | 232 ++++++++++++++++++++++++++++++++-------- docs/DesignDocument.md | 6 +- 2 files changed, 193 insertions(+), 45 deletions(-) diff --git a/docs/DesignDocument-classes.dot b/docs/DesignDocument-classes.dot index 000256d..eed00d3 100644 --- a/docs/DesignDocument-classes.dot +++ b/docs/DesignDocument-classes.dot @@ -1,88 +1,213 @@ digraph systemModel { rankdir="LR"; - splines="line"; + splines="ortho"; subgraph _clusterModels { label="Models" node[shape="record"]; - + BaseModel[label="
ActiveRecord::Base (abstract)"] + + Server[label="
Server"]; + Tournament[label="
Tournament"]; + Match[label="
Match"]; + Team[label="
Team"]; User[label="
User | role | password hash"]; } - - subgraph _clusterControllers { - label="Controllers"; - node[shape="record"]; - - ApplicationController[label="
ApplicationController (abstract)"]; - - MainController[label="
MainController | show_homepage() | edit_settings() | update_settings()"]; - TournamentsController[label="
TournamentsController | index() | new() | create() | show() | edit() | update() | end()"]; - MessagesController[label="
MessagesController"]; - LoginController[label="
LoginController | login() | logout()"]; - SearchController[label="
SearchController"]; - UsersController[label="
UsersController"]; - MatchesController[label="
MatchesController"]; - } subgraph _clusterViews { label="views/"; node[shape="rectangle"] - layouts_application[label="layouts/application.html (abstract)"] - + layouts_application[label="layouts_application (abstract)"] subgraph clusterViewsCommon { label="views/common/"; common_permission_denied; common_invalid; } - subgraph clusterViewsMain { label="views/main/"; main_homepage; main_edit; } + search_results; + subgraph clusterViewsMessages { + label="views/messages/"; + messages_new_alert; + messages_private; + } subgraph clusterViewsTournament { label="views/tournament/"; tournaments_index; - tournaments_new; tournaments_show; + tournaments_new; tournaments_edit; } - subgraph clusterViewsMessages { - label="views/messages/"; - messages_private; - messages_new_alert; + subgraph clusterViewsMatches { + label="views/matches/"; + matches_show; + matches_edit; + } + subgraph clusterViewsTeams { + label="views/teams/"; + teams_index; + teams_show; + teams_new; + teams_edit; + } + subgraph clusterViewsUsers { + label="views/users/"; + users_index; + users_new; + users_show; + users_edit; } } + subgraph _clusterControllers { + label="Controllers"; + node[shape="record"]; + + 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()"]; + 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()"] + } + + /* subgraph inheritance { - edge[arrowhead="onormal"]; - MainController:main -> ApplicationController; + # Kludge: Have a arrow going both ways, but one invisible, so + # that it doesn't try to force a position + + # models + + Server:main -> BaseModel[arrowhead=onormal]; + BaseModel -> Server:main[style=invis]; + + Tournament:main -> BaseModel[arrowhead=onormal]; + BaseModel -> Tournament:main[style=invis]; + + Match:main -> BaseModel[arrowhead=onormal]; + BaseModel -> Match:main[style=invis]; + + Team:main -> BaseModel[arrowhead=onormal]; + BaseModel -> Team:main[style=invis]; + + User:main -> BaseModel[arrowhead=onormal]; + BaseModel -> User:main[style=invis]; + + # views + + common_permission_denied -> layouts_application[arrowhead=onormal]; + layouts_application -> common_permission_denied[style=invis]; + + common_invalid -> layouts_application[arrowhead=onormal]; + layouts_application -> common_invalid[style=invis]; + + main_homepage -> layouts_application[arrowhead=onormal]; + layouts_application -> main_homepage[style=invis]; + + main_edit -> layouts_application[arrowhead=onormal]; + layouts_application -> main_edit[style=invis]; + + messages_new_alert -> layouts_application[arrowhead=onormal]; + layouts_application -> messages_new_alert[style=invis]; + + messages_private -> layouts_application[arrowhead=onormal]; + layouts_application -> messages_private[style=invis]; + + tournaments_index -> layouts_application[arrowhead=onormal]; + layouts_application -> tournaments_index[style=invis]; + + tournaments_show -> layouts_application[arrowhead=onormal]; + layouts_application -> tournaments_show[style=invis]; + + tournaments_new -> layouts_application[arrowhead=onormal]; + layouts_application -> tournaments_new[style=invis]; + + tournaments_edit -> layouts_application[arrowhead=onormal]; + layouts_application -> tournaments_edit[style=invis]; + + matches_show -> layouts_application[arrowhead=onormal]; + layouts_application -> matches_show[style=invis]; + + matches_edit -> layouts_application[arrowhead=onormal]; + layouts_application -> matches_edit[style=invis]; + + teams_index -> layouts_application[arrowhead=onormal]; + layouts_application -> teams_index[style=invis]; + + teams_show -> layouts_application[arrowhead=onormal]; + layouts_application -> teams_show[style=invis]; + + teams_new -> layouts_application[arrowhead=onormal]; + layouts_application -> teams_new[style=invis]; + + teams_edit -> layouts_application[arrowhead=onormal]; + layouts_application -> teams_edit[style=invis]; + + users_index -> layouts_application[arrowhead=onormal]; + layouts_application -> users_index[style=invis]; + + users_new -> layouts_application[arrowhead=onormal]; + layouts_application -> users_new[style=invis]; + + users_show -> layouts_application[arrowhead=onormal]; + layouts_application -> users_show[style=invis]; + + users_edit -> layouts_application[arrowhead=onormal]; + layouts_application -> users_edit[style=invis]; + + # controllers + + MainController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> MainController:main[style=invis]; - TournamentsController:main -> ApplicationController; + + TournamentsController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> TournamentsController:main[style=invis]; - MessagesController:main -> ApplicationController; + + MessagesController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> MessagesController:main[style=invis]; - LoginController:main -> ApplicationController; + + LoginController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> LoginController:main[style=invis]; - SearchController:main -> ApplicationController; + + SearchController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> SearchController:main[style=invis]; - UsersController:main -> ApplicationController; + + UsersController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> UsersController:main[style=invis]; - MatchesController:main -> ApplicationController; + + MatchesController:main -> ApplicationController[arrowhead="onormal"]; ApplicationController -> MatchesController:main[style=invis]; } + */ subgraph controller2view { - layouts_application -> LoginController:login; - layouts_application -> LoginController:logout; - MainController:index -> main_homepage; MainController:edit -> main_edit -> MainController:update; - MainController:edit -> common_permission_denied; + #MainController:edit -> common_permission_denied; MainController:update -> main_edit; - MainController:update -> common_permission_denied; + #MainController:update -> common_permission_denied; + + #LoginController:login -> common_permission_denied; + #LoginController:logout -> common_invalid; + + 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; TournamentsController:index -> tournaments_index; TournamentsController:new -> tournaments_new -> TournamentsController:create; @@ -90,13 +215,32 @@ digraph systemModel { TournamentsController:show -> tournaments_show; TournamentsController:edit -> tournaments_edit -> TournamentsController:update; TournamentsController:update -> tournaments_edit - TournamentsController:edit -> common_permission_denied; - TournamentsController:end -> common_permission_denied; + #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; + + MatchesController:show -> matches_show; + MatchesController:edit -> matches_edit -> MatchesController:update; + #MatchesController:edit -> common_permission_denied; + #MatchesController:update -> common_permission_denied; - MessagesController -> messages_private; - MessagesController -> messages_new_alert; + 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; - LoginController:login -> common_permission_denied; - LoginController:logout -> common_invalid; + 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 } } diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index e9df70f..e07fb0c 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -205,6 +205,9 @@ tournaments/edit.html : A form for editing an existing tournament. The form is POSTed to `TournamentsController#update()`. +matches/index.html + : TODO: list of matches + matches/show.html : Shows an individual match; q display of both teams. Each team's players are clickable which causes a GET for the player's profile @@ -324,6 +327,7 @@ TournamentsController MatchesController : TODO + - `index()`: TODO: GET - `show()` TODO: GET - `edit()` TODO: GET - `update()` TODO: POST @@ -342,9 +346,9 @@ UsersController : TODO - `index()` TODO: GET + - `show()` TODO: GET - `new()` TODO: GET - `create()` TODO: POST - - `show()` TODO: GET - `edit()` TODO: GET - `update()` TODO: POST - `delete()` TODO: POST -- cgit v1.2.3 From 0b153e46fcd9a22b7d83eaac04a5102150e79c80 Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Mon, 10 Feb 2014 20:01:18 -0500 Subject: Minor fixes --- docs/DesignDocument.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 43947e4..c7e66a2 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -130,7 +130,7 @@ Match : A match will be a single set of data that contains all of the statistics of one game. This includes: players, scores, game time, the tournement that match took place in, and the date. Team - : This model will consist of a list of players for a tournement/game. The team creation process is chosen by the host of the tournement and will either be pre-determined teams, or randomly assigned teams. + : This model will consist of a list of players for a tournement/game. The team creation process is chosen by the host of the tournement and will either be pre-determined teams or randomly assigned teams. User : This model represents all types of users; hosts, players, and -- cgit v1.2.3 From 2bb24c4d3dc612cc8e65ad414c529a96682efb1b Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 10 Feb 2014 20:03:10 -0500 Subject: Updated SearchController and Fixed an Error in LoginController. --- docs/DesignDocument.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 98ba57c..0a21005 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -280,13 +280,15 @@ LoginController model to validate the username and password. - `logout()` Responds to POST requests by clearing the session token, logging the user out, then redirects to the home page - (`MainController#show_homepage()`). If the was not logged in, + (`MainController#show_homepage()`). If the user was not logged in, it renders the `common/invalid` view. SearchController - : TODO + : This controller handles user search terms. It has one method: - - `show_results()` TODO: RESPONDS TO POST + - `show_results()` Responds to POST by accessing whichever model(s) + contains the information requested and renders the `search/results` + view. MessagesController : TODO -- cgit v1.2.3 From 40758a58d4473f0581598a962f12f4e75af3c822 Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Mon, 10 Feb 2014 20:07:02 -0500 Subject: Refined match adn team in the design sections --- docs/DesignDocument.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index 0be2493..11803f8 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -127,15 +127,14 @@ Tournement : This model represents the structure of a tournement. It will have several data sections to it including: The match settings, the matches contained inside of the tournement, a unique id for the tournement, and the registered players that are participating in the tournement. Match - : A match will be a single set of data that contains all of the statistics of one game. This includes: players, scores, game time, the tournement that match took place in, and the date. + : A match will be a single set of data that contains all of the statistics of one game. This includes: players personal scores, team members, scores for each team, game time, the tournement that match took place in, and the date. Team - : This model will consist of a list of players for a tournement/game. The team creation process is chosen by the host of the tournement and will either be pre-determined teams or randomly assigned teams. + : This model will consist of a list of players for a tournement. The team creation process is chosen by the host of the tournement and team setup will either be pre-determined teams or randomly assigned teams. User : This model represents all types of users; hosts, players, and spectators. These roles are identified by a “role” attribute. - TODO ### VIEWS -- cgit v1.2.3 From be4d313af082b0b8d6131dc5d376b2f2e94e490c Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 10 Feb 2014 20:13:24 -0500 Subject: Added/Edited Guntas' changes to the Non-Functional Requirements. --- docs/DesignDocument.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/DesignDocument.md b/docs/DesignDocument.md index c54e8d5..d35504e 100644 --- a/docs/DesignDocument.md +++ b/docs/DesignDocument.md @@ -29,6 +29,7 @@ sleek web application which manages tournaments. 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 -- cgit v1.2.3