Archive for August, 2012

Windows 8 DevCamp – Charlotte

August 31, 2012 Leave a comment

I am excited to be presenting September 8, here in Charlotte for the Windows 8 DevCamp!  It is going to jam packed with great content and information to get you up to speed for delivering excellent apps to the Windows app store.  Here is a quick snippet of what we are going to cover:

Windows 8 Overview and the Windows Store

Haven’t seen Windows 8 or know what it takes to get an app in the Windows Store? We’ll cover that here. Drink your coffee because this first session will dive quickly into Windows 8, the platform, the changes, and the Windows Store, allowing you to monetize applications in a number of ways from in app purchases to subscriptions to trials.

Cookbook I: Design Templates and Style

In this session, we’ll talk about the design principles for Windows Store applications — controls, color, typography, and general guidelines to follow to deliver the best user experiences. We’ll also dive into the development choices and tooling support available. We’ll begin with the built in templates and show how we can quickly scaffold a data-driven application called the Contoso Cookbook.

Cookbook II: Data, Contacts, and Settings

You’ve seen the Cookbook. But, how do we leverage data? How do we expose our data to allow users to search and share from the app? We’ll explore these options in this session, from storing data, retrieving data via a web service using an in app purchase, to implementing search and sharing contracts, we’ll look at the code that makes this possible. We’ll also show how to store data locally, as well as roam preferences that can follow a user automatically as they log in to different devices.

Cookbook III: Application Bar, Tiles and Notifications

We’ve got the Cookbook well under way; now it’s time to add some polish. We’ll look at using the app bar for common tasks, and spend time talking about leveraging “live tiles” to create an up-to-date, engaging tile for your application. We’ll also look at using Notifications, and how applications can run either background agents for various tasks, or be notified from a remote service using the Windows Notification Service.

Hands On: [Your App Here]

Now it’s your time. We’ll work in breakouts and 1:1 as necessary to get the tools and environment set up and provide guidance for building out your app. Have an app already underway? We can test, review and provide feedback against store certification requirements. As time permits, we’ll cover additional features, and talk further about the certification process. And if your app isn’t quite ready yet, that’s fine! We’re here to give you the kickstart to building your app, and we’ll be here to make sure it’s done by October 26th.

Be sure to register now as space is limited!  Look forward to seeing you there and having some great Windows 8 sessions!

Error trying to install SQL Server 2012 Express

August 30, 2012 Leave a comment

I ran into the following problem when trying to get my Windows 8 install configured to use SQL Server 2012 Express installed.  I got the following exception:

An error has occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly ‘System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies. The System cannot find the file specified.

I did a quick search and found several forum posts, here and here, on the subject but nothing helped at first.  It wasn’t until I reached the bottom of the posts that the following was included as a step to get past this exception:

Delete the “C:\Users\{Username}\AppData\Local\Microsoft_Corporation\” folder (Replace {Username} with your username)

I checked the rest of the pre-requisites required and they were already satisfied.  I am not sure as to why this worked for me but if you run into a problem like this, you may want to try this.

Hope this helps….

Upgrading Windows 8 HTML5 code from RP to RTM

August 27, 2012 1 comment

If you have played with any code targeted for Windows 8 Release Preview (RP) and you want it to run using the RTM version, you run into the following error:

Could not find SDK “Microsoft.WinJS.1.0.RC, Version=1.0”.

The solution to this error is actually very simple.  You need to do two things in order to get your code to work:

  • You will need to replace the WinJS reference to the 1.0 version.  First remove the old reference that is shown below:


Next add the RTM version reference as shown below:


  • Next you will need to globally changes all your JavaScript references in your HTML files as shown below:


As you can see your references are now adjusted correctly:


Now if you find some examples that haven’t been converted to Windows 8 RTM, you can still get them to work.

Hope this helps….

Windows can’t activate right now

August 26, 2012 13 comments

I upgraded one of my laptops last weekend to Windows 8 RTM and I have been running into a problem with activating it.  Here are the errors that I was running into:

Windows can’t activate right now

If you go the Control Panel and try to activate this way you will receive another error:

DNS request not supported by name server

I did a little searching and came up with some good solutions.  I am not sure why I am getting this error but I have no problem fixing it with such a slick solution that I found here.  It is unfortunate that the activation wizard doesn’t allow you to change your key but at least this solution works.  The following are the steps required to get your Windows 8 RTM version activated:

  • Type Windows+R to bring up the Run dialog.
  • Type “Slui 3” and hit enter.
  • Enter your new key. (If valid you get: “Your product key works!”)
  • Click the Activate button.

This should get your version of Windows 8 working and remove the water-mark from the lower right of your monitor.

Hope this helps….

Categories: English Tags: ,

MVVM Survival Guid for Enterprise Architectures in Silverlight and WPF

August 24, 2012 1 comment

I finished just reading this book and I thought I would do a review while it is still fresh in my head.  I believe the book has good content and is a great reference for building application architectures using Silverlight or WPF.

Chapter 1 takes us through the various Presentation Patterns.  We first are introduced with a brute force monolithic approach and then look at MVC and MVP while evaluating any issues or concerns.  Its primary focus is to demonstrate the power of these patterns and enforce separation of concern (SoC).

Chapter 2 introduces us to MVVM and the benefits it offers do to Silverlight and WPF’s rich data binding.  The user is presented with strategies for sharing code between both Silverlight and WPF.  I was surprised that there is no mention of Prism or Caliburn.Micro or any other framework besides MVVM Light.  I think that MVVM Light is a great framework but I don’t agree that Microsoft leaves you without any direction as was mentioned in the book when they have an excellent guidance using Prism.

Chapter 3 uses the Northwind database as the primary data storage throughout the book.  It uses Entity Framework and also introduces Unit Tests for testing.  We are exposed to a new pattern, “Service Locator Pattern” and how it interacts with View and ViewModel.

Chapter 4 goes a step further with our Northwind database and discusses services and persistence ignorance.  It basically follows the best practices as established by Martin Fowler with regards to using a “Service Layer” to remove tight coupling.  Transaction Script, Domain-Driven Design, and Service-Oriented Architecture and presented in this chapter as well.  We then look at persistence ignorance and custom models and the pros and cons for each.

Chapter 5 is all about Commands and User Input dealing with the Northwind database.  It does a good job of demonstrating the commanding API supported in both Silverlight and WPF.  It also deals with InputBindings such as KeyBinding and MouseBinding.  We then discuss attached behaviors.  I did not see any true behaviors or actions that are also supported by both Silverilght and WPF.  Neither did I see any examples of EventAggregation which is very important when trying to communicated across projects or classes.

Chapter 6 handles hierarchical view models and inversion of control.  We are presented with master/detail scenarios and also take a look at the ObservableCollection<> object.  With IoC, we are presented again the Service Locator pattern.  Next we are presented with StructureMap.  I am again surprised in that we are not presented with Unity or MEF as these two come straight from Microsoft.  I would also like to have seen others like Ninject but we are at least presented with IoC best practices.  I do like that they introduce the Single Responsibility Principle (SRP) and give the reader a good idea of how it works works and how to use it.

Chapter 7 is all about dialogs and MVVM.  Dialogs can be a tricky part of an application architecture in that it is easy to break all the hard work we established by using MVVM.  We are presented three options for using dialogs:  Dialog Service, Mediators, and Attached behaviors.  With dialog services, we are presented with data templates and the flexibility they provide as well as some common conventions to give us one of my favorite patterns, convention over configuration.  With mediators, we are finally introduced Event Aggregation and Messaging.  Finally with attached behaviors we see a way to controls dialogs via XAML.

Chapter 8 this chapter is a nice surprise in that it discusses Windows Work Flow and building MVVM applications.  We discuss several patterns in this chapter, “Unity of Work” and “Memento“.  Next we are shown how these patterns are supported and implemented using WF and how they support handling application flow.

Chapter 9 is all about validation and error handling.  IDataErrorInfo, INotifyDataErrorInfo, and ValidationSummary are a few of the objects presented in this chapter.  We also discuss the Enterprise Library Validation Application Block and how it interacts with both WPF and Silverilght.

Chapter 10 talks about using non MVVM third party controls.  It deals with strategies for incorporating controls such as the WebBrowser control and still achieve rich data binding using MVVM with these controls.  We look again at the power of attached behaviors and a technique such as exposing a binding reflector to help with our data binding.  Another technique is to use the adapter pattern and leverage inheritance to expose and surface the functionality we want to support MVVM as well.

Chapter 11 focus on MVVM and application performance.  For WPF applications, we look asynchronous bindings.  Another area of performance concerns with controls is the concept of virtualization and paging.  Not a lot is addressed here but at least the concepts are presented.  The BackgroundWorker object is presented to facilitate work being done on a separate thread.

Appendix A claims to evaluate other MVVM libraries but I only see a list and not much discussion as to the power or differences among them.

Appendix B is titled “Bindings at a Glance” but I really only see a glossary of terms and now real good examples of bindings or real-world examples.

All in all, this seems to be a good book.  It doesn’t answer all the questions but it does present you with enough information to give you a good direction as to where you need to go when building out your own architectures.

Windows 8 Keyboard shortcuts

August 24, 2012 Leave a comment

I am excited about Windows 8 and the opportunities for building compelling applications using the Modern UI style but one thing that I really want is a comprehensive list of keyboard shortcuts to help make me more efficient while keeping my hands on the keyboard since I spend my days programming.  The following is a list of keyboard shortcuts that work against the RTM version of Windows 8:

  • Win : switch between the Start screen and the last-running Metro app
  • Win + C : displays the “Charms”: the Settings, Devices, Share and Search options
  • Win + D : launches the desktop
  • Win + E : launches Explorer
  • Win + F : opens the File Search pane
  • Win + H : opens the Share pane
  • Win + I : opens Settings
  • Win + K : opens the Devices pane
  • Win + L : locks your PC
  • Win + M : minimizes the current Explorer or Internet Explorer window (works in the full-screen Metro IE, too)
  • Win + O : toggles device orientation lock on and off
  • Win + P : switch your display to a second display or projector
  • Win + Q : open the App Search pane
  • Win + R : opens the Run box
  • Win + U : open the Ease of Access Center
  • Win + V : cycle through toasts (notifications)
  • Win + W : search your system settings (type POWER for links to all power-related options, say)
  • Win + X : displays a text menu of useful Windows tools and applets
  • Win + Z : displays the right-click context menu when in a full-screen Metro app
  • Win + + : launch Magnifier and zoom in
  • Win + – : zoom out
  • Win + , : Aero peek at the desktop
  • Win + Enter : launch Narrator
  • Win + PgUp : Move the current Metro screen to the left-hand monitor
  • Win + PgDn : Move the current Metro screen to the right-hand monitor
  • Win + PrtSc : capture the current screen and save it to your Pictures folder
  • Win + Tab : switch between running Metro apps
  • Alt + F4: Closes the currently running app

Another nice feature is that while you are on the Metro screen and you start typing, it will automatically bring up the Apps Search screen with whatever content you have typed.

Categories: English Tags:

Window 8 DevCamp – Raleigh

August 20, 2012 Leave a comment

I had a great time presenting in Raleigh for the Windows 8 DevCamp!

As promised, I wanted to post a couple of references that you might find helpful in developing Windows 8 applications:

Also, I have uploaded the port of the XNA Platformer game for Windows 8 in HTML here.  This version targets the Windows 8 RTM.

I had a great time and hope you all enjoyed it as well…