Skip to main content

Posts

Showing posts from November, 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: FacebookAuthenticator.zip


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: https://graph.facebook.com/19292868552

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…