seanconnollydev / yahoo-fantasy-football-tools

Yahoo Fantasy Footballs Tools is a web application to assist with managing Yahoo! Fantasy Football leagues and teams using the Yahoo Fantasy Sports API.
6 stars 2 forks source link

Input and store past keepers #44

Closed seanconnollydev closed 11 years ago

seanconnollydev commented 11 years ago

This is a multipart story.

An authorized user must enter their league's keeper settings (since these are not available from Yahoo's API).

An authorized user can enter one or more players kept by each team from a prior season.

An authorized user can modify the player-keeper associations from a prior season.

seanconnollydev commented 11 years ago

It looks like NHibernate requires a lot of configuration. I should evaluate Fluent NHibernate: https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started

seanconnollydev commented 11 years ago

Fluent NHibernate looks reasonable enough. I also need to find a DB migration solution for deployments to prod. In dev, I think it is reasonable to build up and tear down the full DB locally.

It looks like NHibernate has a limited schema update feature. A few options are also listed here: http://stackoverflow.com/questions/933327/nhibernate-schemaupdate.

AppHarbor has a post on using NHibernate for automatic migrations: http://blog.appharbor.com/2012/06/11/automatic-migrations-with-nhibernate (Note they migrate on application start).

AppHarbor also has a post on using EF for automatic migrations: http://blog.appharbor.com/2012/04/24/automatic-migrations-with-entity-framework-4-3

Also consider Fluent Migrator: https://github.com/schambers/fluentmigrator

seanconnollydev commented 11 years ago

Go here to setup AppHarbor for SQL Server usage: http://support.appharbor.com/kb/add-ons/using-sequelizer

seanconnollydev commented 11 years ago

I wasn't able to test this since SQLite was not playing nicely with FluentNHibernate. I should try this against a local version of SQLExpress, which will more closely resemble AppHarbor's environment.

seanconnollydev commented 11 years ago

A few things remaining here:

seanconnollydev commented 11 years ago

Next step is to continue work on the Edit Keeper Settings page, using Who Can Help Me as an example for the model binding pattern that I want to try: https://github.com/jongeorge1/Who-Can-Help-Me/blob/master/Solutions/WhoCanHelpMe.Web.Controllers/Profile/ProfileController.cs

After that, I still want to put the analyzers behind an interface.

seanconnollydev commented 11 years ago

Another ViewModel -> Entity pattern is to use a builder interface: http://stackoverflow.com/questions/2206005/how-to-map-view-model-back-to-domain-model-in-a-post-action

seanconnollydev commented 11 years ago

I still need to wire up editing. There are some strange interactions between models and domain objects when viewing and editing settings, which is why it isn't working.

I also should look into the ignore list, because I think it ignores my packages folders, which I probably need to include. I think this is why my references to FluentNHibernate and MvcContrib broke.

seanconnollydev commented 11 years ago

Later, consider separating local unit testing database from web application.

seanconnollydev commented 11 years ago

Remaining:

seanconnollydev commented 11 years ago

Remaining:

Unit tests for new action methods Put analyzers behind an interface Look into ignore list Fix download eligible keeper issue (see TODO)

seanconnollydev commented 11 years ago

Remaining:

seanconnollydev commented 11 years ago

I think this is ready to merge, so remaining items are:

seanconnollydev commented 11 years ago

Reviewed, tested, and deployed.