Woudn't the backend be needed before Statistic storing in the DB? Because from what I've picked up about DB's in this thread, the backend will make accessing it easier like a class, isn't it?
See the magic about using the object mapping is that it runs as a separate process. Hence, the persistence of an object isn't tied in to its behavior. So, considering a not well-thought out API, this would be possible without any DB support whatsoever:
PHP:
Match m = MatchFactory.Create(); // assume that match creates its own scorecard
Player p = Player.Load(id);
BattingInning bi = m.Scorecard.CreateBattingInning(p);
bi.Runs = 100;
bi.BallsFaced = 150;
StatisticsEngine sc = new StatisticsEngine();
sc.ProcessScorecard(m.Scorecard);
So, the data would be valid since it would be stored in memory. There would be no persistence from one run to another, so you would need some sort of testing harness to be able to test things such as records and such. Basically, you would end up having to call a StatisticsEngine.Save() or something of that sort to save the data to the DB.
With that said, I have already started work on Backend, which you can see if you check out the repository. I will be touching base with Abhas later to figure more things out.
And here is the feature list (beware, it is long). If I were you, I would start a thread up (as a team leader) with the relevant data from the list below.
Backend Team
Design
- Database design
- Object Relational Mapping tool to use
- Abstraction layer for database
- Objects that will be persisted and an associative diagram
- Class/interface diagram describing interaction
- Initialization/accessor methods
- Brainstorm API
- Describe exception list
Implementation
- Discuss with other teams the requirements for each object
- Setup relevant databases
- Implement the code in the Backend project
- Implement relevant code for ORM
Testing
- Test with remote database
- Test with local database
- Test CRUD operations
- Test associations with primitive properties
- Test associations with persistent object properties
UI Team
Design
- Brainstorm with end+users the functions of the UI
- Develop a list of all the functions that will be possible through the UI and their organization (menu, button, etc.)
- Provide a plan for abstracting output
- Provide class/interface or block diagram
- Provide mock+ups/screenshots of UI design (Paint/Photoshop/Word)
- Come up with a design for Match and Tournament objects with the Backend team to streamline communication between UI and SimEngine
- Communicate with Statistics team to determine the behavior of the query engine in terms of UI
- Design the live output UI (probably a PHP page that refreshes and pulls latest data from a MySQL db)
- Communicate with other teams about exception handling
Implementation
- Implement the code in the UI project
Testing
- Test out all functions from the Design list
- Test with extreme inputs (Double.MAX_VALUE and the like)
- Test out with beta users
Statistics Team
Design
- Come up with a list of all records that will be stored
- Come up with a design for Statistics objects (that will be persisted) along with the Backend team
o Must separate FC, OD, Twenty20 stats
o Must separate International, Domestic stats
o Think about granularity when storing data (ball+by+ball vs. innings+by+innings vs. aggregate) and caching options
- Develop a design for query engine similar to StatsGuru but nowhere near as detailed
- Develop an intuitive API to fetch statistics... for example Player.Statistics.GetBattingAverage(Match.Types.FC, Match.Leagues.International) versus Player.GetTestBattingAverage() to get Test average
- Class/interface diagram of system
- Describe exception list
- Develop an API that will be used to update statistics (probably based off a Scorecard object -- discuss with Backend team)
Implementation
- Implement the design in the StatisticsEngine project
Testing
- Test engine with randomized data
- Test query engine with all possible queries
- Test queries that don't make sense, for example getting average over an impossible period
- Ensure that system works without the need for real data (should be completely modularized)
Fixture Team
Design
- Come up with XML specification to store the fixture lists
- Decide a XML parser that will be used to navigate the XML
- Class/interface diagram
- Come up with a list of all the provided fixtures
- Brainstorm design of Tournament and Match classes with UI and Backend teams
- Describe exception list
Implementation
- Design parser that converts parsed XML into appropriate objects and constructs them
- Write the default XML
- Write a guide of how to use the XML with examples for end-users
Testing
- Test with Backend team that constructed objects are correct
- Test with valid XML
- Test with invalid XML
- Test tournament details being computed correctly for each fixture type
sohummisra added 51 Minutes and 21 Seconds later...
Shouldn't you get a sub-forum for this?
Would be easier to keep track of whats going on and all
That would be nice.
