Day 2 - Fear of Intimacy Edition

Technical content of this issue - 4 out of 5

A Different Kind of PDC

This year's PDC will only have about a thousand attendees, down from what must be about 5000 at the LA convention center. Naturally people are asking why, and in typical Microsoft fashion they have a disciplined message right down to the exact word. This year's word appears to be "intimate." When discussing the new location on the web this year, they claim it was because they wanted to give attendees a more "intimate" experiece.  I asked a Microsoft employee who gave me directions to the opening reception how many people they expected this year and he replied 1000 - because they wanted to make it more "intimate."  OK, this is such an odd choice of words that I think I'm going to specifically count how many times I hear it this week. If I hear it as much as I think, I will include a tally in each newsletter - I'll call it the "Intimate (en)Counter." I will only count official references, not the number of times I gratuitously use the word in this year's edition.

Opening Reception

The Reception actually occurred on Day 0 after we went to press, it is reprinted here from later editions

The first official event of this year's conference was a reception on PDC Eve, along with registration. It is here that we get a foreshadowing of how Microsoft is going to handle a pretty sizable crowd without the logistics of a large convention center. I was not encouraged. First, the Microsoft campus is pretty large, so the web site had a link to Building 92 on Bing to get directions. Unfortunately the directions on Bing were wrong. Once I found the right entrance and parked, then I came out of the elevator to an outdoor plaza - no signs. This is when I had my intimate encounter with the Microsoft employee who gave me directions - turns out the sign was around corner in back of the elevators where it couldn't be seen. He got me to the reception, where I found a huge line of people waiting to check in. There are 1000 attendees this year - and 4 people checking them all in. The line spiraled around the small room - no ropes, just one poor security guard trying to direct traffic. The first half hour of the reception was spent standing in line. Then I get to the front and they are out of XL t-shirts, so they have to give me an L. I almost never wear swag T-Shirts, so normally I wouldn't care - but this year was loooking forward to receiving the intimate apparel.

This Year's Keynote Address

This year's keynote session started out with Steve Ballmer. Have you ever noticed that Steve has essentially one speaking style - shouting? Seems like he's always excited about something and really bellowing about it. Must be interesting around the Ballmer household when the kids are trying to sleep. (since this will be posted on our web site, I'm assuming that any chance of my ever working for Microsoft is now gone).

According to Steve Ballmer, this is the biggest PDC ever. That seemed like a strange statement as we sat in the intimate gathering of attendees, but then he explained that he was referring to the live feed to different sites all over the world. At that point the video screen showed cut-ins from several other locations where people had gathered to watch the proceedings. Ballmer said they've brought the same level of technology that they used when they webcast the Olympics and March Madness.

The content started off with the usual keynote standards about what an exciting time this is, this is the start of a new age, led by Microsoft technologies, blah blah blah. Sorry, I've been to quite a few of these - I think I could do the first 15 minutes of the keynote myself. He did list some interesting stats about Windows 7: In the last 12 months they've sold 240 million Windows 7 licenses, during that time there were 350 million PCs sold and 88% of businesses are moving to Windows 7. I'm sure some others are running Linux, perhaps the rest are Windows XP holdouts.


Looks like Microsoft is embracing HTML 5 in a big way in IE 9. They displayed quite a few rave reviews of IE 9, including one from IDG that said "IE9 has Google Chrome on the run!" (That should set off a flood of emails). Then they started to show us some demos.

The demo was essentially an IE 9 browser with gradually increasing amounts of video effects being added without killing performance. Part of this is because of the hardware accelerated HTML 5 built into IE 9. To prove that it was all web standard HTML 5, they brought up the same page in Google Chrome. It looked the same, but performance was noticeably worse - whereas IE9 was able to maintain 60 frames a second, Google Chrome topped out a 46 fps. More info on the demos and the IE9 preview download can be found at

Windows Phone

At this point Ballmer came back out and the topic switched to the Windows Phone. These are already available overseas and are about to be introduced here in the states. The introduction will be accompanied by a huge marketing campaign - which was clear when they showed one of their new commercials - which you've seen if you're watching the World Series. The phone is getting great reviews in many places, like the New York Times and the Wall Street Journal, but it has also gotten a few reviews that, in Ballmer's words, "have pointed out that we still have an opportunity." He then announced that every attendee would receive a Windows Phone.

To demo the Windows Phone, they brought out Scott Guthrie. It seems that Scott Guthrie has become the Don Box of recent PDC's. He's always prominently working on the latest and coolest consumer product - last year Silverlight 4, this year the Windows Phone. He showed several Windows Phone demos, including Kindle on the phone. Now I'm still trying to warm to reading a book on the reasonably sized Kindle device, I can't imagine reading an entire book on a phone - it just seems kind of silly. I guess my kids will laugh at me in the future.

Then he started talking about developing for the phone. There is a Visual Studio Express for the Windows Phone that is free to download. It includes a nice wizard for creating Phone apps, very reminiscent of the AppWizard that allowed all of us to write our first C++ app in the 90's - it gets you started. He then demoed a profiler that analyzes performance on the phone, so you can optimize your phone apps - it was very cool.


Bob Muglia then came out and talked about Azure. Most of it was more of the same, but there were some interesting new features that I will just list out-

  • Much more sophisticated Admin portal
  • Remote desktop access to your worker process - makes it look like a regular server
  • The ability to upload a virtual PC image-sounds similar to Amazon's structure
  • They will be selling the technology to run Azure on premises, an Enterprise cloud.
  • Integrated authentication with Live ID, Yahoo, Google, Facebook and your corporate AD (more on this in a later session)

Then they discussed Team Foundation Server being moved to Azure and being offered as a service. Not sure why, but this really resonated with me - a small company just starting out can have the sophisticated development methodology and management that TFS provides, but doesn't need to worry about TFS management nor a footprint within the company. This is a great example of Software as a Service.

This wouldn't be a PDC without a Don Box sighting, and they brought him out next to code on stage. Long time readers know that I am a huge Don Box fan from way back, but with Scott Guthrie taking on the role of Tech Rock Star du jour, it kind of seemed like Don's time may have passed and he's brought out for old times sake. Rather than having the star power excitement of the past, it felt more like watching an Eagles reunion concert. Some of this may be because Don's focus has always been architecture and low level technologies, like COM, SOAP, WF, etc., whereas this PDC seems more front-end/consumer oriented. Next PDC may have some huge arch announcement and Don will be back at the top of the bill.

Your Opportunity for Fame!

Last night we parked for the reception in what I was told was the largest underground parking garage in the world. So after the reception I'm walking around this giant garage trying to find my rented light blue Hyundai with Washington plates. Free BPN shout-out to the first person to identify the quote "looking for my rent-a-car, was the Cordoba blue or red?"

LINQ, Take Two

Realizing the LINQ to Everything Dream

First, I gotta talk about the hall. Sloped seating, with table space, power and network connections at each seat - this is an awesome hall (plus we're allowed to eat in here).

I know I joke about the journalistic integrity of this newsletter, but I do make an effort to ensure that the technology contents are accurate and often I will leave out items I don't understand rather than risk getting them wrong. With that in mind, here is my writeup of this session:

Seriously,this was a very deep session. The first clue was when the speaker slipped up and dropped my first PDC f-bomb when introducing the session as a brain-no-no. Uh-oh, I may be in over my head...but  was able to understand a few nuggets and will relate them here.

First, LINQ is not just a query language, it is really a Monad, or a way of defining a constructor that represents computations instead of data and allows the developer to chain together a pipeline of actions - I include this fun fact for the enjoyment of GW in MD. The reason that they call it a query language is that LINQ made a much better acronym.

Asynchronoous Data Access

He talked about a new library for composing async and event based programs using what he called "Observable Collections." Reactive Extenstions (Rx) allows you to create asynchronous LINQ queries.

LINQ as used currently depends on IQueryable and IEnumerable, interfaces where your app goes out and gets data from the environment to use in its operation. Rx defines new interfaces IQbservable an IQbserver where you implement event handlers and the data is pushed to your app from the enterprise when it is available. These interfaces are available in .NET 4.

For the next couple items it was unclear whether he was talking about technology already available, planned technology in the future or just theory about what's possible. First, it sounds like they are looking at technology where the expression tree is sent directly to the data source and letting the data source figure out how to implement it. He showed a quick example where a LINQ expression was converted to a JSON representation.

Finally he talke a little about the Microsoft Solver foundation. This is a problem solving library where you can define various rules, priorities and constraints and the solver foundation finds an optimal solution. For instance, he listed an example where crude oil was available from 2 countries at different prices and different qualities and in different maximum amounts and the problem was to calculate the most cost effective way to buy the oil. First he showed how all the constraints are defined when using the foundation directly through the API, then he showed how it might look if there was a LINQ front end put in front of the solver. Then (and this is why I'm writing about this) he showed another demo that he had written that solved Sudoku puzzles by using all the seed numbers as constraints in a LINQ expression and backing it up with the Solver foundation. Sudoku - I understand that!

If you're a wizard at LINQ and know IEnumerable and IQueryable backwards and forwards, you might want to give this PG-13 talk a try at the PDC web site.

Code First Development with Entity Framework

I'm a big Entity Framework fan, but up until now it has always been database first, then generated code second. That's pretty good, but as a developer I think in code more than in data. This session discussed a new feature that's currently in CTP that allows defining the domain in code first and automatically generating the database after that.

The framework makes assumptions about certain conventions that your app will follow in mapping classes to data. If they don't meet your needs, these conventions can be overridden through two avenues, as we will see in the demo-

  • Data Annotation Attributes
  • Something called the Fluent API

The session demonstrated the concepts by writing a sample app called Chirp that had a remarkable similarity to Twitter. One very interesting aspect of the session is that the Program Manager was on the keyboard typing all the code and the developer was doing all the talking.  That immediately raises the concern that this is more a wizard, created by God so salespeople could code, than an actual technology for serious development.  I'll let you judge for yourself.

The first step was to create the MVC models in the domain, in this simple case that's User and Chirp. These are Plain Old C# Objects (POCO's) with a one to many relationship between them. Code First development is enabled by then including a class in the app derived from the DBContext object - this class contains a collection of each of the models in the domain (Users and Chirps). They then added an implementation to the default MVC Index page for users, compiled and boom! The data schema is created automatically. They gave a list of databases that this supports, and I couldn't help but notice they were all in the SQL Server family of products - Oracle was noticeably absent. It included SQL Azure, so that was pretty cool.

Now they started honing the the app. First, the User Name field defaulted to 4000 characters - probably a little long. By adding an attribute to the Name property on the POCO object they set a min and max length (3 and 20 characters respectively - I guess people named Ed need not apply). MVC also recognizes this attribute to create user input validations as well.

Next they created a new kind of chirp that included an image. This new chirp was derived from the original chirp class. The default convention for Entity Framework is to implement this with a single table that is a union of all attributes and includes a column indicating the individual row type. They then used the Fluent API to instruct the framework to implement the twho Chirp types with two different tables instead.

Finally they set up a many-to-many relationship between users with Followers and Follows properties. The relationship tables were interpreted and configured by the framework. This is actually pretty cool stuff.  CTP 5 of this technology is imminent and the RTM will be available 1Q11.

Creating Custom OData Services

Inside Some of the Top Data Services

First a little review from last year. OData is web protocol for for accessing data in an application in a RESTful way, defining both query and update functionality. It's an open specification created and released to the wild by Microsoft. A great source for more information is

You'd think that an entire session about sharing data through a RESTful web protocol would be pretty boring - I actually had a second cup of coffee before coming in. This was proved wrong in this case by the presenter, Pablo Castro, who was the best presenter I saw all day. His frequent quips, including the laugh out loud line below, got more audible laughter than any other session. I know that the PDC should not be an evening at the Improv, but I don't want to be at a CPA convention either. (OK, OK - the CPA's should not bother emailing, I'm not going to print your complaints).

When you are the consumer of a new technology you don't want to jump all the way in then look behind for everyone else and say "oops"

To kick off the talk, Pablo (anybody funny gets first name treatment in this newsletter) gave a quick overview of the acceptance of OData at the moment. There are several places that offer up data in OData format, here are the ones he listed-

  • Netflix - Currently has their entire catalog available, will soon be adding the ability to read and update a user's queue.
  • Twitpic - Access to tweeted pictures
  • Windows Live - access to Microsoft's social network (does anybody really use this social network? I haven't seen a major motion picture about it...)
  • EBay - auction info is exposed through OData (running in Azure)
  • SAP is adding an OData interface for its data
  • Microsoft Dynamics is shipping OData
  • Microsoft's Data Market (formerly Dallas) exposes all data through OData. Check out the kinds of data available for free and for a fee at
  • Facebook Insights - I believe this social network has some market share...

At this point he went into various methods of exposing your data through OData. First he mentioned building your own OData implementation - in short, that's a terrible idea and you don't want to do it.

Next option was to use a framework that's already written. Currently the following are available here-

  • Windows Communication Framework - the WCF includes Microsoft's implementation for .NET
  • Odata on Rails - a Ruby implementation
  • odata4j - a Java implementation

One thing he stressed is that you should start small - begin with just exposing rows in atom format. As needs become clear you can iteratively add queries, update, etc.

The third option is to utilize OData as a service. In this scenario you upload your data to the Microsoft Data Marketplace and let them handle all the technology.  Again, this sounds like a great idea for a company just getting started - focus on your business not your IT infrastructure.

Lessons Learned from Moving TFS to the Cloud

Earlier in this edition I told you about TFS being put in the cloud as a service. In this session, the team that did that migration spoke about the challenges and solutions they discovered during the migration.

Their first step was to migrate the database. There were several SQL Azure challenges that they listed - the ones that stuck out to me were-

  • Latency issues in their office in North Carolina made the time to set up the database very slow since it is a very chatty process.
  • SQL Azure has a maximum data size of 50GB - since 40% of the storage in the TFS database is blobs, they moved all blobs to Azure storage which doesn't have the 50 GB limit. It does have a 250 GB limit, so they will still need an additional solution in the future, but 250 GB is fine for now. Azure storage has the additional benefit of being 60x cheaper than SQL Azure data.
  • Open XML is not available on the web (yet) - They used it to send arrays of parameters to the database. To get around this they use the XML data type instead of OpenXML.

Porting the database to SQL Azure took 2 developers 1 month.

Next they went to work on porting the server program to Azure. Here are some of the issues they hit when porting the code-

  • Deployment is completely different - you can't use MSI's, so they had to convert them all to zip files and manifests
  • Event Logging does not exist - No eventlog, no System.Diagnostics.Trace, etc. They had to write adapters to put that info in the Windows Azure logging facility, plus client side code to pull it down.
  • There was no GAC access - First they decided to copy every assembly to every location. This was huge and prone to error. Now the remote admin mode allows assemblies to be put in the GAC again.  They did not move to this and the speaker was not clear as to why.
  • No Registry - They replaced the registry with an XML file in the manefest.

The concept of writing a service is actually simpler in Azure than in Windows - you merely need to implement a class derived from RoleEntryPoint (just 3 methods). Moving the C# code to Azure took one developer 1 month.

Identity Management was originally a big problem for the team, but got easier while they were working on the problem. They originally started trying to write LiveID support themselves. Writing this support proved to be very difficult (this is Microsoft talking here). During development Microsoft introduced App Fabric Access Control Service which made the task significantly easier. This service hides all the plumbing behind LiveID as well as other authentication services (Google, Facebook, Yahoo, etc.) and made identity management very easy. They also showed how integration with your on premise Active Directory authentication can be achieved through adding a simple instruction to your config file.

The key thing about this Identity management service is that the user goes to the authenticating site to provide credentials.  The site then provides a token to the user which is presented to the Azure framework - Azure does not get involved in the authentication process.  Since the TFS client is a rich client rather than a browser app, it's a bit strange on first login when the TFS client pops up a browser window to login.

Letters! We Get Letters!

SC from NJ protests - Please don't mock the only president to be born in NJ, Snooky is running next year - there will be enough at that time to mock." Ed. note - I believe SC is referring to the Grover Cleveland Rest Stop mention in yesterday's edition

Dude! I would never mock not only the only President to be born in NJ, but also the only one to have a Sesame Street character names after him (unless you count all the appearances of the leter "W" on the show). I can't speak to Snooky candidacy, but I do know that Bruce Springsteen was doing well in the polls until he realized that President was a pay cut from his job as the Boss (he then determined that he wasn't "Born to Run") - Ed.

If you have anything you want to say, any technical questions or anything comment that gives me the opportunity to make a witty retort, send your mail to


Tomorrow is already the last day of the conference - be sure to read to see if I have enough nerve to write about this intimate encounter ending too quickly.

Union Rep, Biff's PDC Newsletter