About the Author

John Bowen is a Lead Software Engineer with InterKnowlogy. In this role he both develops software and provides technical leadership for large scale projects with larger teams, usually in the areas of WPF, Silverlight and Surface. These include projects which have been the subject of Microsoft case studies and received awards for technology innovation. John is also a Microsoft MVP for Client Application Development and provides training for both clients and at community and Microsoft sponsored events across the U.S. John has been writing software since majoring in computer science at the University of Southern California and at Boston University where he graduated in 2001. He has also pursued an interest in computer graphics since high school, where he won awards for both still and motion graphics. Before joining InterKnowlogy he also worked creating software for the printing and health care industries and writing public facing web and ecommerce sites.

Using Fakes for easy unit test stubs and shims in VS11

There are a lot of different ways to do mocking in .NET unit tests, from writing your own mock interface implementations to fully built out commercial frameworks like TypeMock. The Moles Isolation framework from Microsoft Research offered some intriguing possibilities but as a research project has never had the same level of support as a full product. Now the Moles concepts and much of the usage syntax have shown up in the Visual Studio 11 beta renamed as Fakes.

The first step in using Fakes is to add a reference to the new Microsoft.QualityTools.Testing.Fakes assembly in your unit test project. Continue reading

Presentation Materials for NEVB User Group February

Thanks to everyone for coming and all the questions! It was great to get to introduce some more people to Windows 8 along the way too.

Downloads for Previews and CTPs can be found here: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Slides: Async 2012

Async Sample: Demo Code for VS 11 (VB) | Demo Code for VS 11 (C#) | Demo Code for Async CTP in VS 2010 (C#)

Metro Sample: Code for VS 11 (C#) Requires Windows 8 to open in VS

Presentation Materials for Fullerton Code Camp 2012

Additional downloads to try out the demo code:

Download the Visual Studio 11 Developer Preview: http://msdn.microsoft.com/en-US/vstudio/hh127353

Or get the Async CTP for 4.0 and Visual Studio 2010: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Windows 8 Developer Preview for all WinRT/Metro samples: http://msdn.microsoft.com/en-us/windows/apps/br229516

Easy Async with .NET 4.5: Slides

Code: .NET 4.5 Code (requires VS11 Preview) | Same Code for .NET 4 CTP

Windows 8 Metro Code (requires VS 11 on Windows 8 to build)

The Future of XAML: Slides

Code: Sample Metro App (requires VS 11 on Windows 8 to build) | Sample Silverlight 5 App (shows some things that either don’t work or change in Metro)

Visual Studio 11 Solution Upgrading

If you’re an early Visual Studio adopter like me you’ve probably gotten used to running into a similar problem every few years: upgrading your code. Although VS usually handles the job of converting files to work in the newer version, the big problem has usually been trying to go back to the old version. If you’re the only one working with the code that might not matter, but if you work on a team that has a mix of, for example, VS 2008 and VS 2010 Beta clients, the conversion process causes problems for one or the other.

Finally in VS 11 this problem is being addressed. The ultimate goal is to be able to open a VS 2010 solution in VS 11 with minimal conversion and applying no breaking changes to the project or solution files that would prevent it from still opening directly in 2010. There will of course be some restrictions, like not upgrading to .NET 4.5, but in general seems like a pretty reasonable goal.

To see how it’s working so far with the Developer Preview I tried upgrading a few of my own projects, including a 50+ project solution with lots of complications. The good news was that the upgrade process did succeed without preventing VS 2010 from opening the converted solutions that I tried. There were, however, some issues.
Continue reading

Presentation Materials for NE Code Camp 16

Thanks to everyone for coming!

To try out the code we looked at:

Download the Visual Studio 11 Developer Preview: http://msdn.microsoft.com/en-US/vstudio/hh127353

Or get the CTP for 4.0 and Visual Studio 2010: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Easy Async with .NET 4.5: Slides

Code: .NET 4.5 Code (requires VS11 Preview) | Same Code for .NET 4 CTP

Windows 8 Metro Code (requires VS 11 on Windows 8 to build)

Icons for Windows 8 Metro Application Buttons

To make it easier to use standard button icons, a new Segoe UI Symbol font has been added to Windows 8 that currently includes 25 icons. The available icons are listed below with their hex and base 10 values. The icons can be used from XAML like: <TextBlock Text=”&#57615;” FontFamily=”Segoe UI Symbol”/>

IconFontChart

Presentation Materials for San Diego Code Camp

Thanks to everyone for coming!

Harnessing XAML Templates: Slides | Code (WPF, SL4, SL5)

Easy Async with Async CTP: Slides | Code

Look at the AddingAsync section for the multi-step conversion from synchronous to async with cancellation and error handling that we didn’t have time to walk through.

Get the Async CTP at http://msdn.microsoft.com/en-us/vstudio/async.aspx

Presentation Materials for New Hampshire Code Camp 2011

Thanks to the organizers and to everyone for coming inside on a beautiful day!

Real World Reactive Extensions: Slides | Code

Rx Home: http://msdn.microsoft.com/en-us/data/gg577609

Reactive UI: http://www.reactiveui.net/

Harnessing XAML Templates to Power Your UI: Slides | Code (WPF, SL4, SL5 Beta)