Structure for an app

tgabe213

2[H]4U
Joined
Aug 27, 2007
Messages
3,684
I’m looking for some input on building out a structure for a project & here’s what I want to do:

Annoyed with Yahoo’s fantasy football iPhone app, I wanted to build a fairly simple web page for viewing stats. I’m writing this in asp.net & c#. I thought, once this is complete, that I’d be able to re-purpose a lot of the DAL for connecting to Yahoo into an app for WP7.

What I’m wondering about is, how to separate these layers apart. There would/could be a database to connect to, but also connecting to Yahoo, etc.

How would you go about this? I’d like to keep my OAuth & Yahoo data access abstracted out to be reused.

Thanks!
 
I think I was over thinking this, because hitting the Yahoo API would be the same as your standard DAO that hits a database.

What I forgot when I was making my post, was that I think it would be easiest to use web services so that the phone applications would be able to hit that, rather than having it run on the phone.
 
Have you looked at MVC 2 for asp.net? It provides a conventional way to separate parts of a project so they are decoupled (separation of concerns).
 
Create three projects in VS:
  • Yahoo data connector
  • FantasyFootball class object
  • Feeder project

Have the Feeder project hydrate the FantasyFootball class object(s) based on data from the Yahoo connector project, and return the loaded FantasyFootball class object(s). Generics could also be flexed to further abstract common pieces.
 
Last edited:
Back
Top