Saturday, 20 March 2010

Tidying up a few minor issues

One of the artefacts of moving from IIS to Apache to host the html was caching becoming a problem, and due to the limited way I have control over the hosting server - I can only hope the few tweaks I've been able to make will help.  But I'll have to keep my eye on it.

The only other problems I've thus far noticed was the score graph had the incorrect start point, and the sort order of the races on the X axis was wrong.

  • I decided that rather than using the database race id it would be better to normalise the sequence myself - this meant flot (the graphing tool) saw a discrete procession from 1 to 20 rather than say 36, and then maybe 37 to 56.  This made it easier to tie the value to a point in the graph too and overall a bit neater.
  • Sorting the X axis was a little more involved as I needed to extend the DAL's static method for retrieving the season to include the individual round (i.e. race or qualifying) so that I could sort on the date.  Then through the power of LINQ I was able to sort in the view and just trawl through the output var - which worked, although you end up with some hideous looking code at times, ala:
    • var v_Query = (from r in v_Season.tbl_Race select r).OrderBy(r => r.tbl_RaceRound.Max(rr => rr.date));
That's all I've noticed so far, which is fairly good I think.


Time to start looking at the Beavervision scoreboard - I think the biggest conclusions I've drawn from the Sweepstake is that having a really well designed database really makes using things like ADO.Net Entity Framework & ASP.Net MVC much cleaner and simpler - and building maintenance parts of applications becomes almost cookie-cutter in its simplicity - generally only 6 lines of code are needed to retrieve data for list/view/edit, and the views are pretty much identical, just bound to the specific object - which in turn is really just a database object.

The more complex side of development then is what the application does itself, but even then, getting and setting data through these frameworks is so simple, it allows you to concentrate on the more interesting elements rather than worrying about minutiae.  Which of course means you can then abuse it all within an inch of its life.


Simples!

No comments:

Post a Comment