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