dinsdag 18 januari 2011

Game Times

This is an interesting point that was brought up on which I havent thought of yet. While determining a match there is a negation point on which the teams decide to make the match happen. I will call this the handshake approach more or less.

At some point in time, the match is inserted and the first team gives a few times to play on. Then the second team needs to pick a time to play on.

When this happends the time match is set.

Basically it comes down that there are 3 till 5 different options of different playtimes as an optional gametime. Too many would probably lead to too much choice.

The way this could be implemented is as followed:

match date - default empty
option1 - filled
option2 - filled
option3 - filled

Once this is setup, the match goes in pending mode (since it still needs to be accepted by the other team).

Once the other team decides to take the match, and selects one of the options given to them the match date gets filled with that option which was selected.

From a database point of view it could be as dynamic as I want it to be (if i would do a seperate table insert). But it would also lead into having a total complex system just to insert a time. I am not sure though. I need to think about it.

The only advantadge point if I would go for the whole insert time in a seperate table is that I could have unlimited amount of times for one match (so I am not limiting myself with lets say, 3 or 5 options).

I am not sure about this though... since it can get really complex from an entry point of view (the way that the page needs to build up etc).

Or I could start adding the dynamic layer but have it fixed to start with. Since in this case I can start building it first. Have it with the date time inserts seperate. And later on decide if i'll make the times build up dynamic aswell. I think I will go with that approach.

Here's another interesting idea btw. I came accross this plugin: http://digitalbush.com/projects/masked-input-plugin/

It is a jquery plugin (which ofcourse needs the jquery libary). However, the cool thing with this plugin is that the definitions of it work pretty well. However, with checksums using additional javascripting you need to be extra carefull with it. Since input masking also changes the value of the input field. Yeah, I figured this one out the hard way a few months ago.

But anyways. This program is not gonna be that hard on javascripting validations (mostly serverside).

But anyways, jquery mask is implemented in this project now too... and it works like a charm. Now to add them dates.

For the whole DateTime veriant, i'll go with the following setup
- Match
- Date / Time
- Accepted

Thats it basically. Since the rest can be retrieved from the match itself.

Geen opmerkingen:

Een reactie posten