Gone Fishin’

June 1st, 2010

As you may have noticed it’s been a little quiet around these parts lately. The silence has been the result of the arrival of daughter number three a little over three weeks ago. For the past two months or so I’ve been spending a lot of time with my wife, who was on strict bedrest, and my two girls. I was able to do a number of things with them that I’m not typically able to do due to professional commitments. However, I did have to put a number of things on hold and scale back on several others Now that things are starting to stabilize I plan on getting back into my usual groove…in September. I plan on unplugging, as much as possible, for the months of June, July, and August. During this time there will be no blog posts, no tweets, or no status updates. I did this last year and came back feeling very energized and excited. I plan on using the time to plan out the next year or so, finish up a side project, and pursue some non-technical interests.

With that said, I do have some talks already scheduled for this summer/fall that I thought I’d make you aware of before I signoff:

June 19th - I’ll be giving two talks at the Kansas City Developers Conference. One talk will be on Windows Phone 7, the other will be on Git.

September 8th - I’ll be teaching a four hour Silverlight bootcamp at the Heartland Developers Conference. The cost is a mere $25 for a half day of Silverlight, including Windows Phone 7.

September - The date has yet to be finalized, but some time at the end of September I’ll be talking about Windows Phone 7 at the Minnesota Developers Conference.

October 12th - I’ll be presenting Git at the Twin Cities Developers Guild.

November 4th - I’ll be talking about the Managed Extensiblity Framework (MEF) at the Twin Cities .NET User Group.
See you after Labor Day!

adam Uncategorized

TCSLUG Slide Deck and Code

April 21st, 2010

I’ve uploaded the code and slide deck from my presentation at the Twin Cities Silverlight User Group. You can download the content here.

A couple of quick notes:

  1. The code includes the source for the TekPub media player I demo’d during the presentation.
  2. To build and run the code you need the following installed on your machine:
    1. Microsoft Visual Studio 2010 RC
    2. Windows Phone Developers Tools CTP

Enjoy!

adam wp7 , ,

Note to Self - Test Run Configuration Window Disappears

April 15th, 2010

{Every now and then I find that I have to do some kind of configuration magic to get my development environment working the way I want it to. I promptly forget it until I have to do it again 3-6 months later when I replace my machine. By then I have no idea what I did so I have to look it up again. The point of this Note to Self series is to remind me of exactly what I did so I don’t have to try to remember the name of some odd command line tool and the various parameters that go along with it.}

So, I’m a big fan of Test Drive Development (a.k.a. TDD). One of the big statistics I like to get out of TDD is code coverage, that is, what percentage of code is being covered by my unit tests. I’m well aware that 100% code coverage doesn’t mean your application is completely and thoroughly tested, but it gives you an idea of how much of your code is covered and where you need to write some more testes (in case you didn’t write them prior to writing your code - but you wouldn’t do that now would you?)

Anyway, I’m currently working on a project with a large suite of unit tests and I wanted to get the code coverage metrics for the project. Naturally, I fire up the solution in Visual Studio 2008, go to the Test menu, click Edit Test Run Configurations, and click Local Test Run. I then click Code Coverage to turn on code coverage for a given assembly and *POOF* the Local Test Run Configraution window just disappears. This has happened to me several times in the past after re-paving machines and then trying to turn on code coverage in a solution that contains a Silverlight project. To remedy the problem, download and install this hotfix and you should be good to go.

Hope this helps.

adam note to self , , , ,

Live @ MIX10

April 9th, 2010

While I was at MIX10 last month, I was interviewed by some various Microsoft folks. In these interviews I discussed building community around Microsoft’s cloud platform, specifically Windows Azure and Project Thor. The first interview with Social Wendy is up. You can view it below or check it out on Vimeo.

adam video , , , ,

It’s a Major Award!

April 7th, 2010

I arrived home this afternoon to find a Major Award sitting on my porch. From the looks of the markings on the box, it appeared to be Italian:

fragile

What could it be? What could it be? I was hoping for something like an in-home bowling alley, or maybe, just maybe, something more like this:

leglamp

To my disappointment it was neither. Instead it actually looks like this:

plaque

That’s right, Microsoft selected me as a 2010 MVP for client application development! Can you believe it? I’m still in shock. It’s quite an honor to be included in this group, an honor, quite frankly, I never dreamed of earning. The work (i.e. speaking, blogging, podcasts, screencasts, user groups, etc.) I did over the past year that earned me this award was done for purely selfish reasons, I actually enjoyed it! I had no intent of trying to earn this award. I just wanted to do the work I liked doing that actually helped the technology community. In all honesty that has been the most rewarding thing of all. This award from Microsoft is just icing on the cake.

I can’t accept an award without thanking a few folks:

  • Ann Marie, my wife, who puts up with my late nights and loads of stress.
  • The team at RBA Consulting. Without their support and backing this wouldn’t have happended.
  • Jeff Brand, a local Microsoft DPE, who had the hairbrained (that pun is for you Jeff) idea to nominate me for this award.

Thanks for all of your continued and ongoing support!

Let’s see what the next year brings.

adam mvp

Windows Phone 7 Series PowerPoint Template

March 26th, 2010

Next month I’ll be presenting at the Twin Cities Silverlight User Group on Windows Phone 7 Series and Silverlight. Here’s the session abstract:

At MIX10 there were a number of announcements and a lot of buzz around Windows Phone 7 and one of its development platforms, Silverlight. While it is undoubtedly tempting to download the CTP bits and start coding, it would be wise to take a step back and come to an understanding of the differences between developing in Silverlight for Windows Phone 7 and developing for traditional (i.e. browser hosted) Silverlight applications.In this session we’ll examine the differences and similarities between the two platforms as well as some other gotchas that come along with developing for Windows Phone 7.

Be sure to register for the event here.

In pulling materials together for the session I thought it’d be nice to have a PowerPoint presentation that had the look and feel of the Windows Phone 7 Series. After hacking around for about 15 minutes I came up with a template that I thought would work. The template consists of two layouts:

wp7_title

(Layout 1: title)

wp7_content

(Layout 2: content)

After creating the template I realized other people are probably throwing together presentations around Windows Phone 7 and they might like to use/modify this template. So I thought I’d just make it available to anyone interested.

Note: The template was created using PowerPoint 2010, and has not been tested for compatibility with PowerPoint 2007.

You can download the template here.

adam presentations, wp7

Introducing Silverlight 3.7!

March 16th, 2010

(Note: I typically don’t tweet my blog posts, but I did so with this one as I want to make sure those following the developments at MIX10 around Windows Phone 7 and Silverlight are aware of some key differences between the platforms.)

Tuesday at MIX10 there was a big release that went completely unannounced Silverlight 3.7 is now in CTP! That’s right 3.7! I can’t believe it! It’s amazing! It’s, uh, um, hey, wait a minute, isn’t the release candidate for Silverlight 4 in the wild?

No, I’m not losing it (well maybe I am, but that’s neither here nor there). In my last post I discussed one of the key shortcomings, in my opinion, of the WP7 platform, the lack of browser support for Silverlight. I pointed this out because my fear is that a lot of people are going to assume that WP7 supports browser hosted Silverlight since native apps can be written for with Silverlight. As a result, people may not be willing to adopt the WP7 platform quickly since they can’t leverage existing Silverlight assets. The goal of this post is to try and show a couple of different ways you can reuse code across both the “browser hosted” and “phone hosted” silverlight platforms.

First we’ll set up a solution with two projects, a Windows Phone application, and a Browser Hosted (Silverlight 4) application:

cxag_ss001_hosts

Next we’ll want to add a project that will contain code we want to reuse across the the two applications. In this case we’ll choose a Silverlight class library project that targets the Silverlight 4 runtime:

cxag_ss002_sl4

Next we’ll want to our two applications projects to reference the class library. Adding a reference to the Browser Hosted application works without problem. However, when we try to add the reference to our Windows Phone project we get the following error:

cxag_ss003_sl4_error

Let’s try the reverse. Let’s first add a Windows Phone class library project:

cxag_ss004_wp7

Now let’s add the project references. Adding the references to the Windows Phone application works as expected, but now the Browser Hosted applications gives us ethe following error:

cxag_ss005_wp7_error

So, what the heck is going on here? To find out we’re going to need to take a peek at the assemblies referenced by our Browser Hosted and Windows Phone application. The assemblies for the Browser Hosted application can be found in the following directory: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0. Let’s choose one assembly to look at. In this case we’ll use the System.Windows.dll. Here are the details of the assembly:

cxag_ss006_systemwindowsdll_sl4

The assemblies for our Windows Phone application can be found in the following directory: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone. If we take a look at the System.Windows.dll assembly in this directory we’ll see the following:

cxag_ss007_systemwindowsdll_wp7

See the difference? Windows Phone uses, what is, essentially, Silverlight 3.7, which is why we can’t add a reference to a Silverlight 4 class library. If you take a look at some of other assemblies in this directory, such as System.Core.dll, you’ll see something like this:

cxag_ss008_systemcoredll_wp7

These core assemblies are actually compiled for the .NET Compact Framework 3.7.10056.0. This is why we’re unable to add a reference to a Windows Phone assembly to our Browser Hosted project.

So, how can we share Silverlight code between our Windows Phone and Browser hosted applications? There are two approaches that initially come to my mind. (I have a third idea involving T4, but that needs to get flushed out yet). The first thing we could do is create a Silverlight 3 class library project:

cxag_ss009_sl3

All we need to do now is add the reference to our two application projects, which will work. However, I don’t like this approach as it’s least common denominator (LCD) programming. We’re actually holding the code in both applications back from full potential by using a lower version of Silverlight.

Another approach is to use linked files. In this case we’ll delete the Person.cs file from our CxAg.Shared.Phone project. We will then add the Person.cs file from the CxAg.Shared.Silverlight4 project to our CxAg.Shared.Phone project as a linked file. The result will look like this:

cxag_ss010_linkedfile

See that little arrow by the Person.cs file? It indicates that it isn’t actually a file, but, rather, a pointer to a file located somewhere else. In our case, it’s just a point to the Person.cs file in the CxAg.Shared.Silverlight4 project.

One thing you’ll want to keep in mind is how to handle code that compiles for one platform, but not for the other. An approach I’ve taken in similar scenarios looks something like this:

cxag_ss011_partialclass

I like to declare my shared classes as partials. These allows me to include platform specific code in each project (as separate, non-linked files) without breaking the build. In my opinion neither of these solutions are ideal, but they’re workable. As I mentioned earlier, I’m working on a third, T4 based solution, but that’s still in progress. Keep in mind too that we’re working with what is, for all respective, purposes a new development platform, so there are kinks to be worked out. I hope this gets you on your way to successful Silverlight 4/Winodws Pohne 7 development!

adam mix10, silverlight, wp7 , ,

Windows Phone 7 and Silverlight Support, A Word of Caution

March 16th, 2010

So, I was at Scott Guthrie’s keynote address at MIX10 yesterday and I walked away scratching my head. On the one hand all the announcements around Windows Phone 7 and its development platform we’re great. I was really glad to see that the tooling falls in line with Microsoft’s history of providing great, integrated tools for developers. I was also happy to see Microsoft breaking away from it’s usual routine and really, I mean, really focus on the user experience. Did they get the UX right? I don’t know. There are bits and pieces I find interesting and other pieces I simply wonder “What were they thinking”, but that’s an entirely different post. The lack of of true “Enterprisey” features other than support for Exchange and Office, also concerns me, but I’m sure those will come in time and with demand. Of course, there’s also the fact that apps don’t really run in the background. However, all of these things aren’t why I was scratching my head yesterday. I was wondering about the elephant in the room. I was wondering why nobody asked the obvisous question. If Windows Phone 7 uses Silverlight as a platform for building native app, will existing “Silverlight-enabled” websites work in the phone’s browser? It seems like such a simple question, one with an obvious answer. But the fact that none of yesterday’s presenters explicitly called it out had me concerned. After all I have some Silverlight apps running around on the interwebs and it would sure be nice if they just worked on Windows Phone 7. People have ripped on that fruit company in Cupertino for a long time for not supporting plug-ins (i.e. Flash or Silverlight) within their mobile broswer, so you think Microsoft would be ready to 1-up them by supporting their own technology (i.e. Silverlight) in the mobile browser of their shiny new device.

Since I didn’t get an answer, I thought I would download the developer bits and give a Silverlight enabled website a go in the WP7 emulator. What better site to use than Silverlight.net. Here’s how the site looks in the desktop version of IE8

slnet_ie8

Notice the area surrounded by red? This is a Silverlight component. Keep this in mind as you now look at the site in the emulator for WP7:

slnet_wp7

See that area in red? That’s where the Silverlight component should be! When I saw this I stepped away from desk thinking that this simply couldn’t be. So I created a Silverlight 4 RC app on my machine and tried to browse to it via the emulator. Same result. Still refusing to believe this, and thinking maybe it was just an emulator issue, I hunted down a Microsoft DPE last night to get confirmation. Unfortunately he confirmed my fears. Windows Phone 7 does not support Silverlight within the browser. Let me say that again so you can hear it:

WINDOWS PHONE 7 DOES NOT SUPPORT SILVERLIGHT IN THE BROWSER

I was very confused, and, quite honestly, viscerally angry about this. It seemed like such a no brainer, and I think it’s an initial assumption a lot, A LOT, of people are going to make. After all, there are a ton of Silverlight apps already deployed on the interwebs, and a number of people are going to assume that they’ll just work in the browser on WP7. After all, wouldn’t be in Microsoft’s best interest to say “You know all those existing Silverlight apps you have, they’ll work too!” I’m also suprised at the lack of support of Silverlight in the WP7 browser for another reason. One of the other things we’ve heard at MIX10 is that there’s not an intial way to distribute your apps outside of the app store/marketplace/whatever. This has raised the ire of a number of corporate developers. Allowing the WP7 browser to support Silverlight would seem to solve this problem. However, it would allow people to bypass the app store for deploying their apps, thus reducing a revenue stream for Microsoft. I’m not saying or event suggesting this is the reason WP7 does not support Silverlight in the browser. I’m sure there are techincal reasons, such as the IE browser on WP7 not supporting plug-ins.

With all of this said, you can reuse code across browser hosted and phone hosted applications. I’ll have an upcoming post on that shortly.

All in all, I think the WP7 platform has a lot of promise and potential, and I’m looking forward to working with it. I hope you are too!

adam mix10, silverlight, wp7 , ,

Upcoming Cloud Computing Events

March 10th, 2010

I just wanted to make you aware of the meetings planned for the Twin Cities Cloud Computing User Group for the next 4 months. These are some great topics and speakers that you’re not going to want to miss.

April 8, 2010
Dynamics CRM Online
Presented by Shikhar Agarwal, Sogeti
Register here

May 13, 2010
Custom Applications and SharePoint Online
Presented by Frank Shink, Magenic
Register here

June 10, 2010
SQL Azure
Presented by Mike Benkovich, Microsoft
Register here

July 8, 2010
Azure Storage
Presented by Brent Stineman, Sogeti
Register here

Hope to see you there!

adam Community, azure, cloud computing, sql azure , , ,

Version 1.1 of Thor is Released

February 22nd, 2010

I’m pleased to announce that version 1.1 of Thor has been released. Here’s a summary of what’s new in this release:

  • Specify whether or not to display the subject of appointments on a calendar
  • Specify whether or not to use a booking agent on a calendar by calendar basis
  • Specify whether or not a calendar requires authentication to view and/or book appointments
  • Specify whether or not to display a given timeframe for a calendar
  • Highlight the current time in a calendar
  • Only passwords are encrypted when persisted to storage
  • The logo for the website was changed from a .png to a .jpg to accommodate Windows Mobile
  • The provider assembly dropdown only displays assemblies that contains type that implement ICalendarProvider
  • The provider type dropdown only displays types that implement ICalendarProvider

You can dowload all the goodness here.

adam Community, azure, thor , ,