Skip to main content


Showing posts from 2011

Manually Testing Web Services in Visual Studio

The first time you debug a web service after creating it, Visual Studio will launch the WCF Test Client - a very useful piece of kit - and preload it with the details of your service.

In this article, we'll look first at testing your WCF service, and then an all-too-familiar issue that might crop up and spoil your fun!

Using the WCF Test Client

The WCF Test Client looks a bit like SoapUI, and is pretty similar in purpose: It allows you to connect to a service, enter some parameters and submit them to any given service method to see what you get.

After the first time you run the WCF Client, Visual Studio will forget all about launching it again until you make significant changes to it - which means when you subsequently hit f5 or choose Debug, it won't run again. It's worth knowing how to bring it up...

You can find it again by launching the Visual Studio Command Prompt, and launching wcftestclient.exe from there.

Once connected, making use of it is as simple as filling in …

Authenticating with Facebook

Facebook uses OAuth 2.0 to allow web applications and desktop applications to authenticate and subsequently make use of the Facebook Open Graph API.

This article is a quick walkthrough of how this works, and how to do that authentication - with a focus on writing a desktop application that can do it.

As a special free bonus, I've included a C# project that can do the authentication for you, and retrieve a token quickly and easily. Hopefully you'll find it useful as a tool in its own right as well as good tutorial material!

You can download the C# desktop Facebook authenticator here:

Open Graph

Open Graph provides access to both public data (accessible without authentication), and protected data (requiring permissions and authentication). The simplest way to get hold of simple data is to send an HTTP request to the Facebook API. You'll get some JSON back, eg:

To get hold of protected data, your application will…

Project Space

What is Project Space?

Working socially is the best way to work.

Project Space is a small (pronounced 'cosy') initiative get-together for coders with a project. Anyone can set one up just by providing a space, and anyone can come. There's no theme, no requirements, and very few rules! You just need to set aside a day for making headway - and this will help you force yourself to do it...

We held one in August and had a lot of fun as well as productive times. The next follow up's coming this month and once we're done, I'll put together a post about the outcomes.

Why not start your own? Here's a link to the original invitation - feel free to adapt, reuse, or reinvent!

Review: UI Stencils range (prototyping tools)

Rapid application development (RAD) is more key than ever in a world of agile development and customers looking for feedback and prototypes of their ideas before they spend money making it real.

UI Stencils have stepped in to the market to provide an interesting and low-tech solution to an age old problem:

How do I show my customer what I think they mean?

UI Stencils provide a range of stencils, pads, and whiteboards for designs on various form factors and devices. I took a look at the Android stencil...

So how well do their products shape up?

The stencil comes as a neatly cut, thin stainless steel sheet. With it are a couple of pencils and stickers ready to go out of the box wrapping - no installs or account setups required! The manufacturing is of good quality and I've no complaints about rough edges or sharp corners. These aren't your pencil-case ready cheap plastic stencils from school...

There are various designs cut into the stencil which provide a good range of iconography…

Visual Studio AddIns

Writing AddIns for Visual Studio is pretty straightforward these days, but there are still a few gotchas! Here's a walk through with some helpful code samples and a class you can inherit from to save you some time and trouble...

These instructions will help you to create an AddIn that loads with Visual Studio, and gives you a new menu item which you can attach your own code to.

Creating an AddIn project

In Studio, choose New Project, and select the AddIn project from those available (you'll find it listed under Extensibility).

This isn't an add-in for the Macros editor, so uncheck that option. When asked, choose to have add-in start with the host application. Complete the wizard, and an AddIn project will be created.

The project has various key files you need to know about:
Connect.cs: This contains the Connect class - specified in the .AddIn file as the class for Visual Studio to invoke when the AddIn loads.<name>.AddIn: The AddIn file that stays with your project (a…

Drive Stamper

Drive Stamper is an application to facilitate the branding (or 'stamping') of USB drives (and any other removable media) by copying a set of files quickly and easy onto each. It's ideal for a small promotion or a small business that needs to quickly distribute the same files onto a lot of media units and wishes to save costs by doing it themselves.

The application, once loaded, will monitor your system for new drives and (if they have not already been stamped) will copy the files you specify onto the drive.

Download the latest installer for Drive Stamper from GitHub:Setup.exeThe source code for Drive Stamper is available from the Git repository.
Recommended use scenario

A small business needs to stamp their product's documentation onto a large number of USB drives but does not wish to pay a 3rd party to do this. They buy a set of USB drives, install Drive Stamper, set it up to stamp their documentation, and plug in a USB hub. They switch Drive Stamper into Automatic mode…

Android application development

I recently wrote a series of articles for my previous employers - Softwire - on the subject of Android development. The full series has now been posted on the Softwire blog. Links below...

"These articles are intended as a quick-start guide to getting yourself up and running developing Android applications. The idea is to provide a quick guide that follows the development of an application touching a few more areas of the system than the basic ‘Hello World’. It’s aimed at developers familiar with Java who want to learn more about developing for Android.
The app we’ll be developing is a simple GPS application, able to request and read some coordinates from GPS hardware aboard the Android device, make use of a web-service to derive some information about the location (this is called reverse-geolocation), and display what it has found out."

Articles on the Softwire Blog
Part I, getting started with Android and Eclipse, and a skeleton application.Part II, retrieving G…