Club and League Walkthrough

12/5/17

Dustin McCraw

Terminology

Technology

Tabs

Terminology

  • Club
  • League
  • Division
  • SubDivision
  • Team
  • Commissioner
  • Division Commissioner
  • Member

Club

An organization that usually plays games with other clubs.

Their teams are in TeamSnap but the opponents are not.

  • Competitive
    • Boys
      • UA 10-11
      • UA 12-13
    • Girls
      • UA 10-11
      • UA 12-13

League

A larger organization with teams that usually play each other.

May consist of multiple clubs and maybe a tournament or two.

  • Boulder Soccer
    • Boys
      • UA 10-11
    • Girls
      • UA 10-11
  • Denver Soccer
    • Boys
      • UA 10-11
    • Girls
      • UA 10-11
  • Colorado Soccer
  • Tourney 2017 
    • Boys
      • Boulder UA 
      • Denver UA

Division

A nested set tree structure that we store to break up a club or league.

Uses the divisions table.

Nested set uses terms like root, parent, children, leaves.

Root division is the highest division.

  • Competitive
    • Boys
    • Girls

SubDivision

A division that has a parent division which may or may not be the root division.

Uses the divisions table.

  • Competitive
    • Boys
    • Girls

Team

The team we all know from TeamSide

Some differences in a division:

  • division_id
  • inherits plan from division
  • events can be schedule by division and not editable by the team
  • Competitive
    • Boys
      • UA 11-12

Commissioner

Member with permissions at a division level.

From rosters table

Adds a division_id

Division/SubDivision Commissioner

Member with permissions at a non-root level division.

Member

Same member from the teamside except it adds a division_id.

Can have a empty team_id.

Technology

  • Classic

  • League Frontend

  • Snapi/Elrond

Classic

  • Standard classic that everyone knows about.

  • Uses <division_id>/ as the first part of routes

    • this means routes can't match teamside

      • <division_id>/league_payments

      • <team_id>/payments

https://github.com/teamsnap/classic

League Frontend

  • Javascript that runs in a classic shell

    • Webpack

    • ES6 (ES2015)

    • React

    • Redux

https://github.com/teamsnap/league-frontend

Snapi/Elrond

  • Classic code that uses teamsnap_rb to connect through apiv3 to the database

 

  • Purpose was to help get us closer to having apiv3 as single source of data

Snapi/Elrond

  • Controlled through rollouts at an action level in the routes

 

  • Uses SnapiApplicationController as well as Mappers and Decorators to mimic the behavior of ActiveRecord

Snapi/Elrond

class SnapiLeagueLocationController < SnapiApplicationController
  def view
    response = Snapi::DivisionLocationMapper
      .new(@teamsnap_client, identity_map)
      .find(params[:id])

    if response.success?
      @location = response.objects.first
    else
      redirect_to league_location_path
    end
  end
end

Tabs

  1. Divisions/Teams
  2. Payments
  3. Registration
  4. Rostering
  5. Directory
  6. Schedule
  7. Messages
  8. Public -> Marketing
  9. Settings

Club and League Walkthrough

By Dustin McCraw

Club and League Walkthrough

  • 822