Jul 16
I have been doing some Test-After Development unit testing on an ASP.NET MVC app and hit code that uses the cache through HttpContext.Current.Cache (I bet @serialseb would just love that!
) which as you may know is a royal pain in the arse for getting at or mocking without a web server.
As most sane people do I binged (that just does not sound right!) for an answer to my problem and came across a few interesting things but the closest I came initially was a post from Phil Haacked on his HttpSimulator cache where someone mentioned that using HttpRuntime got around the issue. I tired, it failed and I went back to Bing and came up with a post on Scott Hanselman’s blog where he details a conversation about simply including System.Web along with System.Web.Caching in non-web applications. I was skeptical but people have noted success with this method so I tried it and what did I find, it sodding well worked!
Granted the articles I found are old but this is the first time I have tried to unit test the Cache before so this was quite useful.
In other news I have ordered a copy of Working Effectively with Legacy Code by Michael Feathers
from Amazon after @chriscanal recommended it, looking forward to having a read.
Nov 23
Well, I was going to be writing up a review of DDD7 but after seeking out a good 3 column layout that I actually liked for WordPress last night (and failing) I have decided to take a new course of action.
I have been wanting to write a blog with ASP.NET MVC for quite some time, just never really found the time. I am now however, faced with a 7+ hour drive home from Reading and I think this would be the perfect time to write one, if nothing else just to see if I can actually do that in 7 hours
The tools I have with me are:
- Laptop
- Mobile Broadband Dongle
- Visual Studio 2008
- SQL Server 2008 Express
- ASP.NET MVC
- ADO.NET Entity Framework
- Endless antics from Gary Short
- Time
Update:
I knew it was adventurous and it was far more fun to be sociable in the car and help Colin Mackay out on the Developer Day Scotland website than it was to work on the blog. Saying that however, I think I am going to continue on with the blog and turn it into an MVC tutorial (or perhaps “Yet Another MVC Tutorial” better suits) which would allow me more time to develop it and actually provide something useful on the actual blog as well.
So while I don’t actually have a new blog yet, this has given me the idea to develop my own blog system in MVC and publish a tutorial along the way. Neat huh? (Well I think so)
DDD7 post will follow in the next couple of days but in the meantime, a big thanks to everyone who helped organise and run Developer Day 7 and a huge shout out to everyone who attended and made it what it was!
Tagged with: ASP.NET • MVC
May 09
Update: Some how I now have a twitter account, i’m saying nothing on how that happened.
First, sorry for the lack of updates and also the fact the blog had to be rolled back, there was a problem during an upgrade and the database decided to throw a wobbler so I had to restore from backup. I am also in the middle of my 3rd year degree examinations (3 down 1 to go) so time has been pretty scarce of late.
I start my position at NCR on the 19th and between now and then I seem to have been filling up a rather busy schedule between both work and social life. I guess I want to make the most of my last few days of “freedom” before my summer of corporate life begins.

Anyway, one of my lighter items is tomorrow. I will be attending Developer Day Scotland at Glasgow Caledonian University which has been very kindly organised by Colin Mackay. The event will see speakers from across Scotland talking on a variety of .NET and SQL Server related topics.
Barry Carr (a ex-colegue of mine) will be delivering his talk on Regular Expression (which I have actually yet to witness and I wonder if the Macbook will be aiding him this time) and another North East Scotland .NET founder Gary Short who will be presenting on The Web Client Software Factory. I will also be attending Tom Wardill’s talk on the ASP.NET MVC Framework which is of great interest to me since I have been doing quite a bit of work with the framework and I do like the features it brings to the ASP.NET dinner table.
So it’s late and I have some last minute things to catch up on before I rest, I just wanted to post this last minute item so that when I return and do a write up it wont be so out of the blue.
Anyone attending tomorrow I will possibly see there.
Jan 02
New Year, new projects, new challenges and also some nice new upcoming technologies. So given this is a new blog I wanted to make my first post a bit of a reference post detailing a nice new ASP.NET 3.5 Extension Project which is currently in CTP. From the Extensions information page:
The ASP.NET 3.5 Extensions Preview is a new release that provides new functionality being added to ASP.NET 3.5 and ADO.NET in 2008. This release delivers a set of new features that target:
- Enabling High Productivity Data Scenarios – including MVC, Entity Framework, ADO.NET Data Services and dynamic data
- Supporting Test Driven Development – including a powerful and extensible MVC framework
- Creating the best server for Rich Clients – including Ajax history support and Silverlight controls for ASP.NET
Now the part that I have been very interested in is the MVC Framework for ASP.NET.
MVC stands for Model-View-Controller, it is a high-level design pattern which effectively separates business objects and data from presentation (explanation). MVC is by far a new concept in programming and it is not even new to ASP.NET. Projects like MonoRail have been developing a reliable MVC framework for quite some time so why am I interested in what Microsoft have brought to the table?
Well that is kind of like asking why use ASP.NET over PHP for me, I will happily use both but one has different features and functionality to the other. But reading through blogs from the likes of Scott Guthrie, Fredrik Normén and others I am impressed by the levels of functionality the frameworks brings.
There is little point discussing the details nor workings of the framework, I more wanted to raise awareness of it as I feel that it is a very useful and powerful development tool. However I realise that not everyone shares the view. Still it will be interesting to see how the project matures.
Links:
ASP.NET 3.5 Extensions Preview
Scott Guthrie’s 4 part tutorial
Fredrik Normén on ASP.NET MVC Framework