18 Jan 2011
6 Jun 2010
Slides and code from DDDSW
I’ve popped my slides and code on my sky drive, they can be downloaded from here:
I had an excellent time, and really enjoyed giving the talk, as well as going to the other talks :) Guy and the team deserve every kudos going for putting on such an excellent event! Hopefully I’ll be back next year :)
18 Mar 2010
Upcoming talks and sessions
So I didn’t make it into DDD Scotland either, again the competition was fierce! Worried? Me? Not at all! I’ve currently got 3 sessions submitted to DDD South West! MUHAHAHAHAAA! As before I’ve submitted my intro to PRISM and intro to Workflow 4.0, but this time I’ve also added in a new Unity based session. So vote for me! I’ll get into DDD eventually! :D
In other news I’ve got a few talks lined up at the GL.NET and VBUG User Groups. The dates are:
24th May VBUG Portsmouth – Introduction to PRISM
5th June DDD South West – Hopefully I’ll get in!
16th June VBUG Bristol – Introduction To Workflow
? September GL.NET – Unity & IoC (link and better name to follow)
So what about NxtGenUG Southampton I hear you cry! Well we’ve got a cracking line up coming up over the coming months. Tonight we’ve got Neil Robbins coming down from the big smoke to do his talk on Document Databases.
Then on the 15th April we join in the UK Tech Days launch festivities with our own Richard Costal talking about Silverlight 4, and have a special guest from Microsoft joining us. Details to follow on the special guest!
On the 27th May we have all round Guru Liz Keogh joining us to talk about BDD. This should prove to be an excellent session, because if you have any examples you’d like Liz to apply BDD during the session then submit them to me via email me at JohnMc@NxtGenUG.net and she’ll select the best ones.
Then on 24th June we’ve got Phil Pursglove coming down to discuss Microsoft’s exciting new Velocity technology.
An absolutely cracking line up I’m sure you’re agree! In fact what are you waiting for?! Go register now! :D
18 Jan 2010
DDD8 & DDDScotland
So I didn’t get any sessions into DDD8, which isn’t surprising considering the number of excellent sessions that have been proposed this year. But it does mean that I get to go to all the sessions I want to and not have to worry about speaking :)
But I’m not out of the running yet, as I have submitted the same sessions to DDD Scotland, so there is still every chance one of my sessions will get voted in. The voting for DDD Scotland opened today, so go vote for my sessions now! ;)
The voting link is http://www.developerdeveloperdeveloper.com/scotland2010/Users/VoteForSessions.aspx.
12 Jan 2010
DDD8 Voting open!
Voting has opened for DDD8, so pop over there now and vote! http://developerdeveloperdeveloper.com/ddd8/Users/VoteForSessions.aspx
I’ve put in 3 sessions this time:
Introduction to Windows Workflow Foundation 4.0
Introduction to PRISM
PRISM and MEF, Can they be friends
So if you’re interested in seeing any of these, vote for me! ;) I’ve also submitted the same sessions for DDD Scotland in May.
9 Jan 2010
Little things…
For instance, we’re all familiar with the Quick Watch and Watch Panes. They’re invaluable when you’re poking around debugging stuff. But something new that has entered VS 2010 is the ability to pin watches onto the code itself. So you can hover over a variable like you always have to see its value
but now you can pin that value in place and add comments, so whenever you debug into that code, your pinned value is displayed
Which is pretty darn cool :)
10 Nov 2009
It’s a girl!
On Monday 2nd November at 19:12 my wife give birth to a beautiful little girl who we’ve since named Mae Ellen McLoughlin :) Mae was brought into this world at home in a birth pool with the assistance of Eleanor May-Johnson as Midwife. Eleanor is an independent midwife and just plain rocks! If you’re planning a birth in the Hampshire/Dorset area I’d highly recommend hiring Eleanor. You can check out her web site at http://www.hampshirehomebirths.co.uk/.
Cue the cute piccies of mum and baby! :)
Now all we got to do now is to figure out baby communication! :D
21 Sept 2009
Win a ticket to TechEd Berlin!
As we approach TechEd 2009 in Berlin, NxtGenUG will be running our yearly contest to win a ticket (no flights or accommodation included) for the event.
So what do you have to do? Well, pop over to the competition page and give us a caption on what’s happening between Richard Costall and John Price :) Simple eh? So what are you waiting for? Get over to the competition page and starting captioning!
17 Sept 2009
My new eBook reader
A couple of weeks ago I treated myself to a new toy! I got myself a Sony PRS 505 just as Sony announced there new models. I’m not worried though, as I got it for £149 form John Lewis in sexy Red :)
So why did I buy one? Well I’ve got an increasingly large number of PDFs and eBooks and I hate reading them on the screen. I also wanted to be able to read them away from the computer. I choose the PRS because it is currently the cheapest of the bunch and I wanted to see if I would get on with a reader.
So, first impressions. The PRS 505 has a nice crisp clear screen and I haven’t had any problems with glare off of it. The page refresh is definitely slower in PDFs compared to the LFR/ePub books, but not to the extent where it’s a problem. In fact, I did my review of The Art of Unit Testing using it. The PDF layout isn’t ideal as it can be a bit small, but the reader can increase the font size :) So do I like it? Yes, I think it’s fantastic!
The downside? There is one, and it’s the software you get with it. Sony have really let us down with their library software. First off it regularly crashes if you either try syncing all your books in one go, or on some large books. Secondly the UI is terrible! They’ve based it on iTunes off yester year and the feedback for copying UI files it terrible. A single progress bar that never moves :( Guys, seriously, progress bar per book, not per number of books! Lastly, and this is the biggest shame on Sony, it’s not Windows 7 compatible! Come on, Windows 7 has been available for an age to developers now, why isn’t it compatible. Oh, and before you say well the OS X version is better, it’s not I’ve tried it on my Mac with exactly the same problems!
So to sum up, an excellent reader let down terribly by the software. Now that I know I like eReader, I’m looking at getting a BeBook. If you’re getting a BeBook, please help me by using my email address imaji dot wolfshead at ntlworld. dot com in the discount coupon box and you'll get 25 Euros off!
14 Sept 2009
Review - The Art of Unit testing by Roy Osherove
I thought this book was excellent, but it came to me 6 years too late! If you're just starting out down the unit testing/TDD route then I would highly recommend you get this book and give it a read. It's broken up into 4 parts, each part building on the concepts from the previous part.
The first part sets the arena for the rest of the book by providing concise definitions of what Unit and Integration tests are, as well as introducing the reader to the concept of Test Driven Development (TDD). Part 1 ends with chapter 2 that walks the reader through an example of putting together their first unit test.
The second part then starts looking at ways of making your code loosely coupled so that you can test more effectively and start using Fake objects. Roy does this by introducing the concept of Dependency Injection (DI), otherwise known as Inversion of Control (IoC), and then how you can utilise DI to make use of Stub and Mock objects in your tests. The second part ends with the introduction of Isolation Frameworks and looks at how they can ease the complexity of using Stubs and Mocks in your Unit Tests.
The third part then starts moving in to the more practical side of Unit testing now that the groundwork has been established in the first 2 parts. Roy takes the reader through the various patterns that can be used for test classes and how you can utilise them in a Test Hierarchy. Roy highlights that a Automated Build process is essential for running your test regularly to pick up any breaking changes that may have occurred in your app. Chapter 7 then moves onto the critical area of how to write tests that are maintainable, trustworthy and readable.
The final part is aimed at the the devs out there who are coming from existing organisations that don't do Unit Testing, but want to introduce it, or have started Unit Testing in their new app, but want to start Unit Testing their legacy code. Roy provides some good pointers on how to get Unit Testing accepted by teams less than eager to pursue new practices :)
The book also contains 2 appendices, one attempts to answer the question of how much testing should influence the design process and the second provides a good overview of the Isolation Frameworks, Tools and Test Frameworks currently available to make your life a little bit easier when you're testing.
Summary
If you're looking for a good book to get yourself, your fellow developers or team up to speed with good Unit Testing practices, then I'd highly recommend this book. If however you're a TDD guru, or have been unit testing for a while you probably won't get as much out of this as those who are new to Unit Testing.
7 Sept 2009
WF 4.0 - Part 2. The Flowchart Workflow & Designer
The following is based on Beta 1 of WF 4.0 and as such might change or be missing in futures releases.
In Part 1 of this series of articles on WF 4.0 we started by looking at the new Sequential Workflow Designer, and creating a basic Sequential Workflow that added greeted a User. In this second part we will be looking at the new Flowchart Workflow and its designer.
So whats a Flowchart Workflow?
The Flowchart Workflow is a new hybrid of the Sequential and State Machine Workflows that we are already familiar with from 3.x. Even though WF was designed to be extensible so that people could extend it with their own custom Workflows, Microsoft found that a very large percentage of their customers using WF were bending over backwards to crowbar their Workflows into either the Sequential or State Machine types when neither were appropriate. From this Microsoft identified the need for a hybrid type, and this is the result.
So what do you use it for? This is easier to follow if we define when you'd want to use a Sequential and State Machine Workflow first.
So when do you use a Sequential Workflow?
The Sequential Workflow is ideal when you want to model a process that has a defined start and end points and follows a defined (linear) path through a number of Activities. Here's an example:
As you can see even though we have branches in the Workflow, we always go through the same activities and end at our defined point. The Sequential is ideal for modelling Processes.
So when do you use a State Machine Workflow?
The State Machine Workflow is ideal when you want to model a process that doesn't have a defined path and could be one of many paths that will be taken through the Activities. A State Machine does not necessarily need an End Point. Here's an example we're all familiar with.
The State Machine was for Version Control, and as we all know there is no definite path as to how we perform our check in/check outs. One of the best uses for the State Machine Workflow is for Lifecycles of objects, where we have a defined number of States an object can be, in but the direction of state changes comes from an external source.
What about this new Flowchart Workflow?
So hopefully you've now got some idea as to what the original Workflows could do and where they might be used. We can now take a look at the Flowchart Workflow. One of the biggest differences between 3.x and 4.0 is that there is no longer any restriction on which kind of Workflow an Activity can be used on, so our Flowchart Workflow can use exactly the same activities as we did on the Sequential example.
So first off the designer.

As you can see we have the same features as before from the Sequential designer, but this time we have different rules as to how the Activities interact. First off we no longer get connections for free between activities. This is of course down to the nature of the Workflow type, as the designer can't guess what Activities we want to join together and how. So to join Activities together we select the start Activity and then drag one of the edge connectors to the target Activity's edge connector.
Again Variable and Arguments are used in exactly the same way as we did with the Sequential Designer. The Flowchart Workflow currently comes with 3 extra Items (not Activities) that allow us to add decision logic into the Workflow. The first is the FlowDecision which acts as a simple If statement in the logic.
This is actually a very simple Item to use, again dragging from either the green True connector or red False connector to another Activity will give you the path when either a True or False result comes from the Condition you set. The Condition is something that evaluates and returns a boolean result. So far I've been using things like VariableName.Equals("StringToMatch") for the condition. I suspect that in future releases this may have some sort of Expression Editor to it (but this is just my speculation).
The second new item is the FlowSwitch, and looks very similar to the FlowDecision.
OK, so lets put this altogether. I'm going to create a simple Workflow for Pizza management at User Group talks. It's going to ask us our location, if its the home region of Southampton then it'll tell me I need to order Pizza. If it's not Southampton, I'm doing a WF talk somewhere else so I remind the User Group leader. Then because I could in theory be doing a marathon number of talks in one day, it'll ask if my location has changed and if it has we go back to the beginning, otherwise the flow end.
Using the custom Readline and Writeline Activities that were also used on the Sequential Workflow, this is the result. For details as to how to bind to Variables and create them, see Part 1.
A screen cast with the construction of the Pizza Flowchart, will follow shortly.
In Part 3, we will be looking at creating a custom Activity.
20 Aug 2009
WF 4.0 - Part 1. The Sequential Designer
This is the first in a number of articles that look at the new features in the WF 4.0, and as such the features might change or be missing in futures releases.
Windows Workflow Foundation 4.0 (WF), along with .NET 4.0 was announced at PDC 2008 and those present were lucky enough to get their hands on a VPC image. The Beta 1 VS2010 ISO is now available for download, you can get it from HERE.
So what's all the fuss about? Well put simply, WF as we know it has been given a complete overhaul from the ground up! They're rewritten the entire foundation and simplified it no end. WF is now far simpler to use and easier to extend. So in the coming series of articles I'll walk you through the new features showing how they differ to the 3.x version.
We're start off with the new Designers provided with WF 4.0. I can't show you the State Machine Designer, as it has been dropped from the 4.0 release. Instead we’ll be getting the Sequential Designer, and the new Flowchart Designer which is kind of a Sequential/State Machine hybrid.
Workflow Designers
The first thing you notice with the designers is that they are now written in WPF! This gives a whole host of advantages to the Designer experience, first off you get all the standard benefits of a WPF application (zooming, scaling, etc) but more importantly it is far more responsive that the old 3.x designer. This has a knock on effect on how you can use Activities on the designer, but we'll come onto that later. Lets have a look at the Sequential Designer.
The designer hasn't changed much from its transition to 3.x, you still insert activities in a vertical line onto it's surface. But what has changed are the addition of a couple of very small innocuous buttons in the bottom left of the designer called "Arguments" and "Variables".
Arguments are the method into which you pass values from the outside world into the Workflow you'll be executing, or from a Workflow into an Activity. Previously in 3.x to pass Arguments into a Workflow this meant dropping into code and adding a number of Dependency Properties in by hand.
So how do you add Arguments to a Workflow in 4.0? Easy, you click the Arguments button and add each Argument into the dialog that appears.
Give the Argument a name, select a Direction, a Type and if required a Default value. Once complete, you’ve created your first Argument.
As you can see, we have the choice of assigning a direction to the Arguments. This does exactly as you'd expect, so values are either taken In (like passing by reference), In Out (like passing by Value), Out (return a value) or as a Property.
But how do you actually get the Arguments into a Workflow? This hasn't changed at all, you still pass in a Dictionary with string keys for each of the values. The key relates to the name of the Argument it will be assigned to.
The Variables functionality is new in WF 4.0 and designer to solve a problem of complexity from 3.x. In 3.x you would have activities binding to each other, but this could lead to some very odd behaviour if the activities bound to the wrong activity and make things complex as an Activity could bind to another activity from either end of a Workflow.
So what the WF team introduced in 4.0 is the concept of variables within a Workflow. Instead of binding Activities to other Activities we now have a broker in the middle to hold the value. It sounds terrible and a bit like a global variable, but it does work very well and is only scoped to the parent Workflow or child Activity, so it's a lot more like Members in a Class. You could almost go as far to say the Workflow is now stateful, as it contains values that change as it executes.
So what does the Variables dialog look like?
To create a new Variable supply a Name, Type and if needed a default Value.
Ok, so what about when we change the context of the Workflow designer? What happens then? Well in that case the Variables window will show all of the Variables available to the selected Activity from the parent Activity (or Workflow) and above. Here you can see that the child Sequence Activity has 2 Variables available to it. AVariable owned by the parent Sequence Activity and it’s own AScopedVariable.
Create your first Sequential Workflow
The following is a textual version of the screencast.
Ok, so lets build a Sequential Workflow using these new features in a Console Application. This Sequential Workflow is going to greet a person we name. Now I'm going to be using a number of custom activities to perform the work, but I won't be going into how they work as this will be covered in a future article.
The process I'll be following is quite simple, the User will be welcomed and then prompted for their name and a greeting will then be displayed.
The first thing we need to do with our Workflow is to add in the Activities, so I'll add in a single WriteLine Activity that write text out to a Console, a custom ReadLine Activity that reads in from the Console, the Greeting activity. I do this in exactly the same manner as we add Activities currently, by dragging them onto the surface in the order I desire.

In the next article, I'll be looking at the new Flowchart Workflow and Designer.
13 Aug 2009
Slides for the Intro to WF 4.0 talk
I’ve uploaded the slides for my Windows Workflow Foundation 4.0 to my SkyDrive, you can get at them via this link.
Now includes code for the 5 basic demos. Enjoy the coding goodness!
11 Aug 2009
Upcoming events at NxtGenUG Southampton
Over the next couple of months we will be continuing our Web technologies theme by having Ben Hall down to talk about Testing ASP.Net applications on the 20th August. We’ve also managed to grab some uber swag from TypeMock and some of Roy Osherove excellent “The Art of Unit Testing” eBooks to give away! You can register here.
Then on 17th September we’ve got Yossi Dahan stopping by Southampton again, no BizTalk this time, but the new Windows Identity Framework! The Windows Identity Framework is Microsoft's offering for dealing with federated security. You can register here.
Then on 22nd October for our 2nd Birthday(!) we’ve hosting the follow up grudge match between Phil Winstanley and Sebastien Lambla as they duke out the merits of ASP.NET WebForms against ASP.NET MVC (and OpenRasta!). This was a very highly rated session in London, and promises to be very entertaining and informative. You can register here. More details to follow for this session on the site soon!
5 Aug 2009
Twitter on Windows Mobile 6
I downloaded both clients so I could test them out simultaneously on the device during my day to day activities. All pictures taken from the relevant twitter client site. So here are my findings:
Pocketwit
Pocketwit had the more flash of the two interfaces, allowing the user to scroll up and down the timeline using via the phones touch screen. The tweets were in a nice big font with the person avatar to the right hand side.
Navigation was performed by dragging the tweets either left for context specific options on a tweet or right for a main menu like set of options. Whilst this looked excellent I found the binding to selected tweet was a little dodgy as sometimes the context menu wasn’t for the currently selected tweet.
I also had problems swapping from vertical to horizontal screen orientation when I opened the keyboard. The screen would get stuck in the previous orientation which meant options and navigation became a bit fiddly.
Twikini
Twikini has a more classic windows feels to it and doesn’t take advantage of the touch screen for navigation. Friends, Mentions and Direct Message are selectable from a menu option which then loads the appropriate timeline.
The tweets themselves are not always displayed in full, so you do have to open a tweet from time to time to read it in its completeness. Each tweet has the users avatar to the right of their tweet, and the text is in a very readable font.
During my use of Twikini I didn’t encounter any of the selection and orientation problems I had with Pocketwit, which has lead me to stump up the huge charge of $5 to get a full license :) A couple of weeks on, and I’m still happy with the client.
If I were to change anything about Twikini I would include some sort of status bar on it so I can see any new mentions or direct message, as currently I have to open those timelines up explicitly to see if any have arrived.
Conclusion
Both are cracking clients, but for the time being I’ll stick with Twikini, even though Pocketwit is free. Once Pocketwit gets out of Beta I’ll be revisiting it to see if they’ve managed to sort out the bugs that were enough for me to opt for Twikini.
3 Jul 2009
PRISM Assault Course and Julys event at Southampton NxtGen
We're currently tracking down a venue and sorting out the agenda, but we hope to be kicking off the event in either August or Septemeber. Further details to follow :)
Also this month at NxtGenUG Southampton on the 16th (July) we're be hosting Mike Ormonds ASP.NET 4.0 talk, which promises to be damn interesting as it will be covering all the new exciting areas of the upcoming release.
We're also be having a nugget from Mark Heath on managed Audio wrappers in in .Net.
You can register for the event here.
10 Jun 2009
Slides for my PRISM-tation
Here are the slides for my Introduction to PRISM session that I given at Birmingham and Southampton.
The code examples are to follow.
Thanks to everyone who attended! All comments welcome :)
UPDATE - The code is now up as well :)
28 May 2009
WF 4 talk at the GL.NET User Group
The talk will be covering the Beta 1 release of VS2010 and Windows Workflow Foundation, unless Microsoft releases another Beta/Release Candidate by then ;). I'll be looking at the new features of WF 4.0 like the new Workflow Designers and the WPF based Activity functionality.
If you fancy coming along go here to register and I'll see you there!
20 May 2009
Typemock Giveaway!
I just found out typeMock are running this promotion adn I just at the chance to get a TypeMock license.
Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.
Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers.
The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.
Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.
The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.
Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.
Go ahead, click the following link for more information on how to get your free license.
19 May 2009
Visual Studio 2010
I then tried installing it on my Win 7 installation (dev laptop), but the damn things always bombs out with the following dialog when the progress bar completes
on this screen
I’ve tried disabling Anti Virus (AVG), removing the external HD it was running from and running it locally, I’ve tried running it from the local HD in CloneDrive as opposed to from the external HD, I’ve tried removing CloneDrive and I’ve even copied the contents of the ISO to a local folder and run it that way. But still no joy.
I thought I’d be smart and check the event logs, but nope, they just said it had completed successfully :P Oddly enough Professional works...
Ah well, if anyone else has any ideas as to why this might have happened I’m open to suggestions :)
















