Bad UI Design – Get your steps in order

Wed, June 18, 2008, 05:20 PM under UserInterfaceDesign
I know there is a generic lesson for UI designers in the mini-rant below...

Recently I had to change the pin of a smartcard that I have which required a number of steps:

Step 1: Insert smartcard into your laptop reader.
Step 2: Run client tool XYZ and click on a button which will auto-populate a textbox.
Step 3: Take the textbox results of Step 1 and paste them on a separate textbox on a webpage
Step 4: Enter in a second textbox on the webpage, the smart card number
Note: this is a number that is never used for anything else and is in small print on the side of the smart card. So I had to remove the card to copy the info.
Step 5: Hit the button on the webpage and check your email
Step 6: wait for email. Read the email (which is also sent to a bunch of approvers) which gives you a string – copy it
Step 7: Paste the string into a second textbox in the client tool we run at step 2
Result: BOOM with a message along the lines of: "The two strings (challenge / response) are not pairs. Please ensure that you do not remove the card during the entire process."

Why couldn't they have started with that statement up front? Why don't they state that next to step 4 at least? Why after removing and reinserting the card, don't they detect and give you a warning that remainder steps are futile? Why don't they take step 4 and move it to Step 0?

"PLINQ" plus "Whose Session Is It Anyway" at NxtGenUG Fest08

Fri, June 6, 2008, 12:08 PM under Events
On 12th June at TVP in Reading you should not miss the NxtGenUG Fest08. I'll be making a short appearance to give a brief glimpse at Parallel LINQ (PLINQ). Laughs are also guaranteed as the day ends with the game show "Whose Session Is It anyway" that I am told I must also participate in – oh dear... Register now.

Thanks for attending my sessions at Tech Ed in Orlando

Fri, June 6, 2008, 12:04 PM under Events
For those that I met in Orlando, here are the resources:

1. Talking about the 2 sessions.
2. Sharing Assets.
3. Five Cool things.

Video Chat about Sharing code and cool new VS2008 features

Wed, June 4, 2008, 10:36 PM under Links
While at Tech Ed, I spent 13 minutes chatting with Richard Campbell about my two sessions. View the recording on this page (or download the wmv).

Sharing Assets Between the .NET Compact Framework and the .NET Framework

Wed, June 4, 2008, 10:02 PM under MobileAndEmbedded
Thank you for attending the developer session with the title of this blog post. Below are some resources for you.

- Download the slides and demos for this talk here.
- For my relevant blog posts, follow all the links (the hyperlinked numbers 1-9) from this blog post.
- Best of all, ignore all of the above, and just read my MSDN mag article which I link to from here.

Parallel Extensions June CTP is out

Mon, June 2, 2008, 04:13 AM under ParallelComputing | Links
Following the first ever drop last December, the latest preview is now available. Ed has the link and details here.

My sessions at Tech Ed North America

Thu, May 29, 2008, 06:33 AM under Events
I have 2 sessions at Tech Ed in Orlando this year. Add them to your schedule.

- Wednesday 4th June, 16:30-17:45, MBL308 in room S230 G
Sharing Assets between the.NET Compact Framework and the .NET Framework

- Friday 6th June, 13:00-14:15, TLA318 in room S320 C
5 Cool Things to Know and Use for Smart Client Development with VS2008 and .NET Framework v3.5

Also after my session on Wednesday, between 10:00 and 18:30, together with my 2 co-authors we will be signing copies of our book at the bookstore - brings yours along for instant devaluation :)

I'll be around all week (Sunday 1st to Sunday 8th), so if you are in the area between those dates and you want to catch up over a pint or 3, ping me.

Silverlight 2 Beta 1 Namespaces – Part 4 – the WPF subset

Wed, May 28, 2008, 12:00 PM under Silverlight
Following from Part 1, Part 2 and Part 3, in this last part of the exploration I'll focus on the UI layer and I'll have even more of a statistical hat on.

11. System.Windows.dll is yet another Silverlight assembly with no direct counterpart in the full framework, but with tons of stuff inside (as evidenced by its size on disc and by the 21 namespaces!) that makes it the 2nd largest assembly. You can think of it as the brick that gives Silverlight its WPF UI. Its namespaces come from various v2.0 and v3.0 desktop assemblies as listed below (and it is in my opinion a prime candidate for refactoring):

-System.Net namespace with WebClient plus 6 related classes comes from the desktop's System.dll (!)

- System.ComponentModel comes from System.dll (! again) and is basically the BackgroundWorker implementation.

- 5 of its namespaces (System.Windows.Controls.Primitives, System.Window.Data, System.Windows.Documents, System.Windows.Resources, System.Windows.Shapes) and the System.ComponentModel.DesignerProperties class map to the desktop's PresentationFramework.dll

- 3 of its namespaces (System.Collections.ObjectModel, System.Collections.Specialized, System.Threading) map to WindowsBase.dll.

- 2 of its namespaces (System.Windows.Ink, System.Windows.Media.Imaging) map to the desktop's PersentationCore.dll.

- System.Windows namespace has a total of 61 types, coming from homonymous namespaces in PresentationCore.dll (e.g. FontStyle, RoutedEventHandler) and PresentationFramework.dll (e.g. Application, FrameworkElement) and WindowsBase.dll (e.g. DependencyProperty, Point) and also introduces some new types (e.g. AssemblyPart, ErrorType).

- System.Windows.Markup namespace with 2 types from WindowsBase.dll, 2 from PresentationFramework.dll and 1 from PresentationCore.dll.

- System.Windows.Media namespace which maps to PresentationCore.dll except for Matrix class from WindowsBase.dll and 5 new Silverlight types (MediaElementState, TimelineMarkerCollection plus 2 relatives and VideoBrush).

- System.Windows.Input largely maps to PresentationCore.dll, except for 2 classes (Key and ModifierKeys) from WindowsBase.dll and 1 class (KeyboardNavigationMode) from PresentationFramework.dll. There is also one new class in there: StylusInfo.

- System.Windows.Controls namespace has 24 types that come from PresentationFramework.dll (same namespace name of course). It also has 2 types (MultiScaleImage, MultiScaleSubImage) that make up the DeepZoom feature. It also has 3 types (2 from System.Windows.Forms.dll plus 1 brand new) that make up the OpenFileDialog feature.

- System.IO.IsolatedStorage.ApplicationSettings class has no counterpart in the desktop world and was touched upon here (scroll to the bottom).

- System.Windows.Interop namespace with 3 classes (Content, Settings and SilverlightHost) that is all new in Silverlight framework (even though that namespace name exists in various other WPF assemblies).


12. and 13. System.Windows.Controls.dll and System.Windows.Controls.Extended.dll
The overwhelming majority of the Silverlight controls reside in the System.Windows.Controls.dll assembly. The Extended.dll adds the Calendar, DatePicker, Slider and WatermarkedTextBox.


14. System.Windows.Controls.Data.dll
This adds a control not available at present in WPF: the Silverlight DataGrid. For all things DataGrid-related visit Scott's blog.

BackgroundWorker

Tue, May 27, 2008, 08:36 PM under dotNET | Silverlight
A cool class that was introduced in .NET Framework v2.0 is the BackgroundWorker. If you do any kind of UI development I encourage you to learn about this class (e.g. by following the links below), which makes it easy to execute long running operations on a separate thread, supporting cancellation, progress reporting and marshalling results back to the UI thread.


Back in 2004 I described what the class looks like (inc. links to MSDN) when I implemented it for the .NET Compact Framework v1.0/v2.0 (and for .NET Framework v1.1): BackgroundWorker. I also provided sample code to demonstrate the usage.

An added incentive to learn about it is that Silverlight 2 includes a fully interface-compatible version of BackgroundWorker. A good way to learn about it is by porting to Silverlight the desktop PI sample from my previous blog post and follow what the code does... have fun!

SideShow Managed Components v1.0

Tue, May 27, 2008, 03:25 PM under Links
Back in 2006 when Windows Vista was released I got very excited about the SideShow feature (the auxiliary display support). I got so excited that I wrote a series of long blog posts. Read bottom up my SideShow category.

I just got word that the team finally released the managed bits:
+ Windows SideShow Managed API 1.0 SDK.
+ Windows SideShow Managed Runtime 1.0.

I haven't played with the final release of the API, but I doubt it is that different to the Beta version that I used to record this SideShow screencast (in January 2007). If you spot any differences, let me know.