Tuesday, 1 May 2012

Gearing up...

Well, it has been a while since I last posted anything of worth here, so I thought I'd update with some opening thoughts on the new technical features for the Beavervision Scoreboard.


Problems what I was having with the old scoreboard (2010-2011 version) - whilst it was lovely were (in no particular order):

  • Feature adding was becoming a pain, LINQ to Entity Framework is difficult to get right with lazy loading, and easily chews up far too much memory.  Whilst this can be fixed, I was becoming less-and-less of a fan - the effort required just to change data retrieval is a tad silly, and adding features becomes quite onerous... surprisingly, databases have these amazing things called Stored Procedures - which, you know, do all this really well for you - as they have done for years.
  • Device support, was, well poor.  Sure I could support some iOS devices, but not very well and it was all turning into a teetering tower of terrifying tutiness.  Anyone with anything out of the ordinary was shunned (and rightly so).  But I wasn't making use of the available features on those devices I did support... so it was time for a rethink in that area.
  • Last minute fudges, were numerous and ugly - this year I gave myself way more time to think things through and come up with something right, mostly.
  • And numerous other things that I wasn't quite happy with... that I shall hopefully remember later on when I write more on each topic.
Now, thankfully, as I'm sensible and unlike many developers can actually design a database properly, that end of the problem stack wasn't a problem... in fact I've been extending the data model quite merrily without a hitch - and most of the core of this database will still merrily work on a 2004 version of the scoreboard front-end (I don't have the software or inclination to attempt to actually prove that... but you know, I'm right).

Next up the list is the DAL... and this was where I started with my first pile of changes (which I'll expand upon in my next post).  Traditionally I'd hosted everything in one monolithic website and stuck my thumbs up... as mentioned previously this had been implemented in LINQ to Entity Framework and all the SQL was abstracted away from my control - so this year I threw that all away.  I still use Entity Framework as my SQL Client and an Object Mapper, but all the data insie-outsie is done via Stored Procs - and the whole thing has been extracted into its own WCF host layer.

On top of that - ASP.NET MVC again, but this year I've decided to go for the bleeding edge 4 (Beta!) as the device detection stuff seems pretty solid and far simpler than previous versions.  This required rewiring all the data to methods exposed in the WCF host, modifying stuff to use RAZOR and well actually completely rewriting the site as everything had changed... again I'll go into this in more depth later on.

Finally, on top of all that, for mobile devices I've lobbed jQuery Mobile into the mix for good measure so that there should be a consistent behaviour across all devices (don't ever expect there to be consistent behaviour across all devices).  Expect plenty of whinging around this.

Thus far I've played about with it on various flavours of iPhone, iPad and Android devices - it all plays ball to a certain extent, and well looks quite good.  There a couple of features left to put in, but nothing particularly stunningly complicated or noticeable... so stay tuned for further updates.