Archive for category Uncategorized

Talking about REST

Mark and Clark over at just published ‘my’ show: We spent time talking about REST and SOAP as well as a number of other topics related to REST. One of the things that I don’t think was made clear enough was that REST and SOAP are not competing service techniques. Each technology/interface type has an appropriate use case. When integrating applications within an enterprise, the development team needs to worry about:

– Security

– Transactions

– Reliable delivery of messages

– Integration with tooling for other developers

In the enterprise case, WCF + SOAP/WS-* can make integration between systems pretty simple. Yes, the teams may struggle with getting the security setup just right between domains, but overall, things will go well, especially if the setup requires communicating between different WS-* implementations. Finally, enterprise integrations typically happen for applications running on the same network/VPN. The infrastructure for an enterprise is different than that for the web. It’s important to build your applications for their environment.

When integrating applications over the Internet, sometimes WS-* adds too much complexity. For extensive integration across partners who are connected via the Internet, there is some benefit to understanding REST. REST will allow your application to scale using the HTTP architecture. Features such as caching, proxy servers, and the general uniform interface exposed by HTTP helps make things work better on the global network.

Because of my point of view here, when asked “do you prefer SOAP or REST?”, I am forced to answer “For what scenario?” I’m not popular in either circle, but understanding both helps me get stuff done.

Leave a comment

Grand Rapids Day of .NET is Looking for You!

Planning is in full swing for the Fall 2010 Day of .NET (DODN) conference in Grand Rapids on Saturday October 23rd, 2010 at Calvin College.

The theme for this year is "Open to the Future". The theme combines two important trends in developing with .NET – "open" and the "future". On the "open" side there has been a lot of activity in opening up the platform, creating open source projects and libraries, enabling projects to work well in a mixed-IT environment, and opening up data to diverse applications. On the "future" side we see .NET 4.0 and Visual Studio 2010 which brings many new capabilities to the platform.

What this means for potential speakers is that there is a huge range of topics for you to consider. While this event is a "Day of .NET", speakers are encouraged to submit talks that span the spectrum of technologies being used in active development today.

This event is a great opportunity for new speakers and local speakers to get a chance to participate in the larger development community – come share what you have been learning and network with other speakers and participants.

In addition to having a set of planned ~1 hour talks, there is room available for open sessions. These can be from a 5-minute "lightening talk" to something longer that is of interest to an ad-hoc presenter and group. So if you have an idea for a session to be put on the schedule and promoted, please send it along ASAP. But if you also have something smaller, or that develops between now and then, please bring it along to the event and the organizers have a forum to share it.

Speaker submissions will be accepted between August 25 and September 18 and will have the sessions and schedule completed by the end of September for the event on October 23.

In a brief e-mail to please provide your:

– Name

– Email

– Phone Number

– Twitter

– URL (Blog/Personal/Company)

– Brief Bio

– Session Abstract

– Session Level (e.g. 100,200,Advanced)

– Notes/Info (new presentation, done before?)

Leave a comment

Project Phoenix

The current economic condition is hitting everyone pretty hard, even developers. For developers, part of the challenge in finding that next job is having the right, up to date skills. To help folks get those skills, Arnie Rowland and a number of other MVPs got together to pool MSDN subscriptions. This year, every MVP gets 3 MSDN Universal Subscriptions- 1 to use and 2 to give to worthy recipients. To pick a worthy recipient, an unemployed or underemployed developer needs to propose a software project for a non-profit agency, school, or church to be assisted by Project Phoenix. Arnie and his associates will then pick at least one project week to ‘fund’ with the MSDN Universal Subscription. A number of other companies joined in to offer more resources to help the selected developers make the most of this opportunity. Publishers have donated books and software companies have donated tools. I’m very proud that Pluralsight has donated a subscription to their .NET Training Library. I have created content for that library and am thrilled that an organization I am involved with is helping developers get back up to speed with current technology.

Project Phoenix is not a ‘free lunch.’ It supports the developers’ efforts so that they can gain from the work they do. I do recommend that you visit Arnie’s site to read all the details!

Here is the an example of one project that was funded:

Feed My Sheep: We are a community feeding program, that originally started as a 3 month summer project, one night a week we would provide a free meal for anyone who wanted to attend. We are in desperate need of a website in which we could post updates, have a calendar of volunteers and groups that will be serving each month and list special events.

Leave a comment

My WCF 4.0 Reference Card is up

Shortly after TechEd, my friends at Pluralsight put me in contact with to create a WCF 4.0 RefCard. The requirement for the card was to boil down the essential things one needs to have available in order to program against WCF 4.0 into 6 pages of content. WCF is huge, so the challenge was to only include the really important stuff. Please take a look at the card. I’d love to hear your feedback.

Leave a comment

Recommended Listening

As developers, we need our knowledge of our platform to have depth as well as breadth. Typically, we gain depth through projects we take on. For example, we might learn MVC by converting a WebForms application to ASP.NET MVC2. Acquisition of depth is almost passive. Once we commit to the big project, we get the depth simply by finishing the job. To acquire breadth, we do other things. Any developer with significant breadth does most of the following: read blogs, read magazines, read books, attend conferences, and listen to podcasts.

In the past few months, I found a hidden gem; I started listening to the Developer Smackdown. I’ll admit, I started listening because my area got a new Developer Evangelist, Clark Sell, and I just wanted to learn more about him. I’ve gone from stalking to the point where I look forward to the semi-weekly podcasts. During the course of an hour, Clark and his co-host, Mark Nichols, introduce you to the things that their guests are passionate about. The guests are almost all from the midwest region, so they are people that I have either met or can meet fairly easily. Clark and Mark are TFS Rangers, so ALM discussions are never far away on any topic. For example, they recently had Brian Hogan from Eau Claire on to talk about HTML5 and related topics (listen here). I increased my breadth fairly quickly by learning about HTML5 and CSS3. I was also able to add a trick to my web development toolbox: develop on FireFox first, then check for compatibility on IE since IE it is easier, in practice, to alter for IE. He also gave some more great advice: don’t worry about pixel perfect pages on IE, FireFox, Safari, etc. because the only people that compare pixel positions are web designers and developers. Everyone else uses only one browser. Just worry that things look right.

I’ve also picked up tricks from Travis Feirtag, Steven Murawski, and others. As an added bonus, Mark and Clark take this show seriously which means they’ve recently bought a ton of professional gear to make the show sound better.

What hidden gem podcasts do you know of in your markets?

Leave a comment

Azure ServiceBus now supports Silverlight/Flash!

The Azure ServiceBus Access Control Service was updated on July 1, 2010 with a very nice surprise: it has policy files in place for Silverlight and Flash! A week ago, I had written some code that redirected authentication requests and so on so that my Silverlight code could authenticate against the ACS. Today, I saw a post that the service had been updated. So, I went ahead and tried it out:

Silverlight: https://%5Byour service]

Flash: https://%5Byour service]

Note that both of these are policies that allow ANYONE to send messages to the ACS.

crossdomain.xml has this in the body:

   <allow-access-from domain="*" secure="true" />
   <allow-access-from domain="*" secure="false" />
   <allow-http-request-headers-from domain="*" headers="*" secure="true" />
   <allow-http-request-headers-from domain="*" headers="*" secure="false" />

I’d like to see options via the SDK or the admin UI that allow me to turn on global access or per website access. This is something I would change rarely, so the min-bar for me would be something on the Azure web site that allows me to manage the crossdomain.xml contents. I’ve already posted something to the forums and will be interested to see what happens next.

Leave a comment

I'm a Microsoft Regional Director!

If you are LinkedIn with me, you’ll see that I listed a new position: Microsoft Regional Director – Chicago. This is NOT a paid position with Microsoft. I noticed that other RDs I have as connections do list the RD role as current with Microsoft as the current employer. LinkedIn doesn’t have a mechanism to show that I’m connected to Microsoft as a ‘unpaid opinionated person.’

I’m pretty excited about this opportunity. In 1995 (the year I graduated college), I looked out at the technology landscape and noticed that software developers can do well if they pick a technology stack and learn it as deeply as possible. At that time, it looked like I should either learn Sun Unix, some embedded toolkit, or Microsoft Windows. Microsoft had more desktops and I wasn’t an electrical engineer, so that’s the direction I picked. Since then, I’ve written books on the technology, lots of articles, and even did a six year stint at Microsoft. I’m happy I chose this path. I’m also want to see the Microsoft community continue to thrive and do well. A large, happy, well-informed Microsoft community benefits everyone in it. Thanks to my being a really busy person in the Chicago area, the local Microsoft office nominated me for the Regional Director position and I accepted.

This means I’ve taken on more unpaid work- kind of par for the course for me. If you are in the Chicago/Milwaukee/Madison area and want a Regional Director type person to come in and talk to your company, run/architect/develop a project, or just speak at a user group, send me a message:

Leave a comment

The first in my PSOD series is out

I’ve spent the last few weeks working on some recordings for Pluralsight on Demand. I’ve been working on a course, .NET Distributed Systems Architecture. It was published this Friday. Please give it a listen and tell me what you think! 

Leave a comment

Azure Storage is a RESTful service

Today I had to build a demo for Azure and I noticed that I was following a tired old path where one demonstrates Azure storage services (Table/Queue/Blob) via a hosted application. My demo has two key points:

1. Look, there’s a picture that I uploaded!

2. Look, these processes can send messages via the queue!

The kicker was going to be that the messages are exchanged over the Internet, not the demo environment. I wanted a visible resource, an image of penguins, to be visible via a public URL. That was going to be the cool part.Then, I thought- “Well, the Azure SDK is just a bunch of libraries. The libraries should work fine in a console application, right?” Right! 

And guess what: the demo actually works pretty slick because I can demo the storage service in isolation. I don’t need to demo it with a deployed application. That helps me out, and gives me some ideas on how I can use Azure differently.

I started out with a little utility class that reads a connection string from a config file and returns a ready to use CloudStorageAccount instance.


public static class Utility
  private static CloudStorageAccount _account;

  public static CloudStorageAccount StorageAccount
      if (_account == null)
        _account = CloudStorageAccount.Parse(
      return _account;

The config is just the following (minus the line breaks in the ‘value’ value):

    <add key="storageAccount"
                AccountName=[your account name];
                AccountKey=[your account key]"/>

My scenario is this: I have a directory with images. I want to force those images to be uploaded to Azure blob storage. This needs to happen from the local machine. I was really surprised how easy this is to do. The Microsoft.WindowsAzure.StorageClient assembly has all the code you need to make this work. To upload the images and make them visible to the public, I just wrote the following:

static void Main()
  var client = Utility.StorageAccount.CreateCloudBlobClient();
  var dirInfo = new DirectoryInfo(Environment.CurrentDirectory);
  var cloudContainer = new CloudBlobContainer("friseton", client);
  var permissions = new BlobContainerPermissions
                        PublicAccess = BlobContainerPublicAccessType.Blob
  foreach (var fileInfo in dirInfo.EnumerateFiles("*.jpg"))
    var blobRef = cloudContainer.GetBlobReference(fileInfo.Name);

In this way, you can use Azure blob storage the same way you use Amazon’s S3. The queue can be used like the Simple Queue Service, and table can be accessed liked SimpleDB.

Yes, I understand that this has been possible for Azure all along. It finally clicked in my noggin that developing for Azure really can mean just picking and choosing the parts you want to use. You don’t need to go all in to use the service. Instead, just pick the parts that make sense and build apps!

For those that are curious, here is the queue demo too. It uses an object, Name, to send messages. This could be ANY object, I just picked something simple for demo purposes.

public class Name
  public string FirstName { get; set; }

  public string LastName { get; set; }

It is sent to the queue with this code:

static void Main()
  var client = Utility.StorageAccount.CreateCloudQueueClient();
  var cloudQueue = new CloudQueue(
    Utility.StorageAccount.QueueEndpoint + "friseton",
  var name = new Name {FirstName = "Scott", LastName = "Seely"};
  var stream = new MemoryStream();
  var writer = XmlDictionaryWriter.CreateBinaryWriter(stream);
  var ser = new DataContractSerializer(typeof (Name));
  ser.WriteObject(writer, name);
  var buffer = new byte[stream.Length];
  Array.Copy(stream.GetBuffer(), buffer, stream.Length);
  var message = new CloudQueueMessage(buffer);
  cloudQueue.AddMessage(message, TimeSpan.FromHours(1));

And read from the queue thusly:

static void Main()
  var client = Utility.StorageAccount.CreateCloudQueueClient();
  var cloudQueue = new CloudQueue(
    Utility.StorageAccount.QueueEndpoint + "friseton",
  var ser = new DataContractSerializer(typeof(Name));
  var timeToStop = DateTime.Now + TimeSpan.FromMinutes(2);
  while (DateTime.Now < timeToStop)
    if (cloudQueue.RetrieveApproximateMessageCount() > 0)
      var message = cloudQueue.GetMessage();
      var buffer = message.AsBytes;
      var writer = XmlDictionaryReader.CreateBinaryReader(buffer, 0,
        buffer.Length, XmlDictionaryReaderQuotas.Max);
      var name = ser.ReadObject(writer) as Name;
      if (name != null)
        Console.WriteLine("{0} {1} {2}", name.FirstName,
          name.LastName, message.InsertionTime);

And yes, the queue code also works from your local machine. The example above does require you to have the Azure SDK installed.

Leave a comment

Speaking at Chippewa Valley .NET Users' Group Tomorrow

I’ll be doing a beginner’s talk on WCF tomorrow night at the Chippewa Valley .NET Users’ Group. Details are here: I’m looking forward to meeting some new people!

Leave a comment