Monday, June 25, 2012

Notoriously Databased v0.22

The next objective is to build an administration panel to link all the table controllers to. This will allow quick access to the game's internals in case the proper game fails.
  •  Added an AdminController with a simple list of table links.
  • Tested all links and found that CharacterSubmission controller failed due to pluralisation issues.
  • Fixed CharacterSubmission to CharacterSubmissions in the db, and rebuilt the model and controller.
Now some initial prep work on the game. If a new game is created, it would be best to have defaults set up immediately for VillageState and Turns.
  • Located the creation of game objects and added code for creating a new Turn object once successful
  • Reviewed changing ID fields for the new record, but it looks like it does that automatically once saved. 
  • Reviewed adding linked GameID fields from the original object. Does it pick up what the new ID field is once added? Yep, fantastic. Nice and easy.
  • To check that all the IDs are working, I redid the display view for Turns. Entity Framework is a treat for getting related data out. 
  • Formatted GameDate to Now() until I know when the game will be pitched at. 
  • Added VillageState object, linked to the current turn, and saved.  
All in all a pretty good night's programming (plus F1). Slowly coming to grips with MVC / EF / C# and it now feels like I can put together data onto the page where I like. Will still have a little work to prep for user account interaction, but hopefully it's only a Google away from a standard solution.