Football Application – Preparing to code

Posted on 18th July 2008 in development

A Domain Model?

I don’t know. I have only read the first chapter of Eric Evans’, Domain Driven Design so far, so I might be on the right track here.
From what we have figured out so far from the requirements we have the following entities.
  • Club
  • Member
  • Team
  • Manager
  • Player
  • Staff-Member
This is where I am starting from. It might not be the right place, but it seems as good as any right now. I believe that with these concepts I should be able to start building an application that the users will understand.
Some more detailed requirements

Further discussions with people related to the club highlights the fact that the system should be available outside of office hours and over the internet, apparently the managers/coaches of the kids teams are volunteers who have day jobs. It should be secured in some way so that club information stays private. This leads me to the decision to build the application as a website. The website will be hosted on a windows server machine with IIS and ASP.NET available.
(Ok, so that is a little staged, but isn’t all of this?)
I decide to leverage what I can of the Membership, Roles, Profile and Personalization features offered by ASP.NET. (Learning about the ASP.NET MVC or Monorail is a step too far right now, I might do that on the second iteration.)
After this decision is made I need to figure out what to do first. As the club secretary is the person who will be in acting as the administrator of the software I need to make sure that they have the features that they want as soon as possible. We need to get them familiar with the system and allow them to get the initial sets of data entered.
Somehow I manage to get in touch with the club secretary again to talk through some features of the system. This is what I got out of the conversation.
(This is going to make BDD people cry, please let me know what I can do to make this better)
When I try to access data in the system, I should not be allowed to, unless I have logged in.
Given that a user is not logged in,
When sensitive data is accessed,
Should be shown the login screen.
When I want to contact a member, I need to be able to see a list of all members, so that I can see the ones I want.
Given that there are members in the system,
When the member list page loads,
A list is populated with all the members of the club.
When a member joins the club, they need to be added to the system, so that I can make sure they are organised.
Given the member does not already have details in the system,
When I enter their details,
They appear in the list of members for my club.
Given the member is already in the system,
When I enter their details,
I should be made aware that they already exist
And I should have the choice to duplicate the entry

When a member leaves that club, I need to be able to remove them from the system, so that I don’t end up with lots of out of date information.
Given that a member exists in the system,
When I delete their information,
They are removed from all lists of members,
And they are removed from all Teams

As I am leaving the club owner wants to find out how things are going, so we go through the list of requirements that I have gathered so far and he is quite happy with them. In fact he thinks that it sounds so good that we should make this available to other clubs to use, at a price of course. This introduces another concept, multiple clubs active in the system at the same time. We might consider setting each club up with their own system, but lets not go there until we know that it is a problem.
I think that this will do for now. There is actually quite a lot of work involved in getting to this point. Some infrastructure needs to be in place to handle some of the non-functional requirements that we have.
  • The system needs to be stable.
  • If there is a problem we need to be able to find out what happened.
  • The system need to be responsive.
Lets jump in and start coding. I will be trying to do as much as I can in a TDD style, no sure how the database interaction part is going to go yet, I always hate writing tests that hit the database.
As the title of the first post suggested, I will be using NHIbernate for data access and other goodies that object relational mappers offer. Ninject will be used for any dependency injection needs, I am sure that there will be some somewhere. jQuery will be used for the web UI and any ajax capabilities. What about the iPhone? Well I am not sure about that yet, all I know is that I have an iPod Touch, a usb cable, a Mac Book Pro and an iPhone developer account. I am sure that I can come up with something for remote administration, even if it is just an iPhone Web Application.
I’ll be back when I have something interesting to show.
comments: Closed

One Response to “Football Application – Preparing to code”

  1. David Kiff says:

    "I always hate writing tests that hit the database"
    Yeah, I always struggle when it gets this low down, I tend to wrap the thing (i.e create a data access class that has ExecuteScalar, ExecuteNonQuery methods etc) and then I can inject into something and setup expectations on that class. This is fine but when you get to unit testing the dataaccess class you are actually calling the database, and therefore de-isolating the test, placing dependencies on the database being present. At work we get away with not unit testing that class because it "is essentially unit testing the .NET Framework"… however this doesnt feel to good!

    "NHIbernate for data access"
    That sounds really good, theres been quite a lot of discussion about using this at work!

    "What about the iPhone? Well I am not sure about that yet, all I know is that I have an iPod Touch, a usb cable, a Mac Book Pro and an iPhone developer account."
    Sounds cool! developer account :D ! Theres a quy that wrote an article on IPhone Web apps:
    http://steveorr.net/articles/iPhone.aspx
    not sure if it will be of any help though?



Pings responses to this post