As I've had a lot of thoughts regarding potential improvements to my ULT module, I'm creating this page to start discussing/documenting information regarding an improved D7 'League Management' module.
To all 'League' Module Maintainers
In order to help address the 'Module Duplication' concern within the Drupal community, I'm proposing this as a collaborative effort between all of the maintainers of 'league-related' modules ... if we can come to a consensus on a common data model, then feature integration and interoperability between our various components will be much easier - think a 'common league API' for league module developers.
To that end, I'll be generating a few pages here over the next couple days, and invite your comments, suggestions, and feedback ...
Features
I believe a combination of the ULT and LeagueSite feature sets is a great place to start, with enhancements to scheduling and tournament support thrown in as well. Ideally, given the number of 'fantasy' league queries I've received on ULT, a 'combined' league management module should be able to provide functionality to support both 'amateur' and 'fantasy' style leagues.
Data Model
I'd propose fully leveraging the new 'Entity' concept within Drupal to represent each of the components required in a league management module.
Object | Entity | Bundles | Comments |
---|---|---|---|
Sport | Sport | Team Sport Individual Sport |
|
League | League | League Conference Division |
Conferences and Divisions would have a 'parent league' reference field |
Season | Season | Season | |
Facilities | Facility | Site Field/Court |
Fields have a 'site' reference (support for 'multi-field' sites) |
Team | Team | Team Container Team Instance |
Team 'Instance' represents team in a season |
Roster | Roster | Roster Instance Line-up |
Roster 'Instance' represents roster in a season, 'Lineup' in a game |
Player | Player | Player User Admin |
"User" players have uid, Admin for non-players (such as coach) |
Position | Position | Position | Represents sport-specific 'positions' as well as admin (coach, etc) |
Match | Match | Match Exhibition Match (by sport) |
May include 'parent' relationships for Game/Set/Match setups |
Result | Result | Game/Set/Match Results types (by sport) | |
Summary | Summary | Game Scoring Summary (by sport) | |
Stats | Player Stats | Per sport Player Statistics bundles |
Thus, the data model should be flexible enough to support:
- Multiple sports
- League/Conference/Division seperations (and inter-division/conference games if desired)
- Facilities tracking/assignment
- Maintaining 'Team' objects across seasons
- Flexible 'Roster' tracking, and per-game lineups
- both the 'players as users' model used in ULT, as well as the 'players as objects' model used in LeagueSite
- Tracking of team 'admin' in addition to players (and flexibility to support 'player-coaches')
- Per-sport 'positions'
- Both single game and game/set/match structures
- Tracking of both 'exhibition' and 'league' games/results
- Scoring summaries by sport
- Player Statistics by sport
... more to come ...