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 ...
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.
I'd propose fully leveraging the new 'Entity' concept within Drupal to represent each of the components required in a league management module.
|Conferences and Divisions would have a 'parent league' reference field|
|Fields have a 'site' reference (support for 'multi-field' sites)|
|Team 'Instance' represents team in a season|
|Roster 'Instance' represents roster in a season, 'Lineup' in a game|
|"User" players have uid, Admin for non-players (such as coach)|
|Position||Position||Position||Represents sport-specific 'positions' as well as admin (coach, etc)|
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
I envision this as a central 'infrastructure' or 'API' module, with the actual league functionality being supported via additional supplementary modules (pick and choose only those which provide the functionality you require).
As such, I'd like to leverage the 'league_' prefix as the namespace for the central module ... with any supporting modules adopting the 'league__' prefix. As far as I can recall, I believe this namespace is still available and doesn't conflict with any existing modules already in contrib - if you find a module with a conflicting namespace, please let me know.
Integration with Other Modules
Where reasonable, the act of creating new players, leagues, teams, games, etc should be defined as actions; to allow for integration with the 'Rules' engine, and expose greater flexibility in how users may implement the project.
... more to come ...