• mwinkle.blog

    Usability Testing the WF Designer vNext (or, Yelling at Customers)

    • 13 Comments

    One of the things that my team is working on is the next version of the workflow designer.  In order to help us get real feedback, we engaged with our usability teams to design and execute a usability study. 

    For details on what the test looks like (when we did them 3 years ago for the first version of the WF designer, see this great channel9 video).  The setup is still the same (one way glass mirror, cameras tracking the face, screen, posture of the subject), the only difference is the software, we're busy testing out some new concepts to make workflow development much more productive.  At this stage of the lifecycle, we're really experimenting with some different designer metaphors, and a usability test is a great way to get real feedback.

    One thing I've always tried to do since I came to Microsoft is being sucked into the Redmond bubble.  The symptoms of placement inside said bubble are a gradual removal from the reality that everyday developers face.  When I came to the company two years ago, I was chock full of great thoughts and ideas from the outside, and much less tolerant of the "well, that's just how it works" defense. 

    Slowly, though, as you start to get deep into thinking about a problem, and tightly focusing on that problem, those concerns start to fade away, as you look to optimize the experience you are providing.  Sitting in on the usability labs yesterday was a great reminder to me of how easily one can slip into the bubble.  Our test subject was working with a workflow in the designer and had a peculiar style of working with the property window in VS.  Now, when I use VS, I use the property grid in one way.  I have it docked, and I have the dock set to automatically hide.  I have known some developers who prefer the Apple / photoshop style where the property pane floats.  The customer's way of working with the property grid was that he had it floating, but he would close it after every interaction.  This required him to do one of two things in order to display the grid again, either go to the View menu, or (and what his style of work was) right clicking on an element and selecting properties.

    The prototype we were doing the usability testing with, however, does not have that feature wired up, in fact, it currently doesn't displaimagey the properties item in the context menu at all.  Not because we have an evil, nefarious plan to remove the properties item inconsistently throughout our designer, but rather because no one gave it any thought when we put the prototype together as we had other UI elements we wanted to focus on. 

    This became a serious problem for our customer, as the way he expected to work was completely interrupted.  At one point, we asked him to dock the property window so we could continue with the test.  This is the most fascinating part of the study to me, and that was watching him work to dock the property grid in the left panel.  I've become so used to the docking behavior in VS (see screenshot below), that it didn't even occur to me that this might present a problem for the user.  Instead, we watched for 3 minutes or so as he attempted to figure out how to move the window, and then try to process the feedback that the UX elements give.  About 60 seconds in or so, the property grid was about at a similar location to the screenshot, with just a centimeter or two's distance away from being in "the right place".  Watching his face, we saw him look slightly confused and then move it elsewhere.  Two more times he came back to that same spot, just far enough away to not get the feedback that might help him in the right direction.  It was at this point, the spontaneous yelling started among the observers in the room.  Something that has become so obvious to us, something we have internalized and accepted as "just the way the world," was becoming crystal clear to us how much difficulty this was causing.  The yelling was things like "Move up, move up" "no, wait, over, over" "oh, you almost, almost, no...." trying to will the customer through the soundproof wall what we wanted him to do.

    This situation repeated itself time and time again with different UI elements, and it was very, very educational to see the way different users manage their workspace and interact with a tool that I've become so familiar with that I forget to see the forest for the trees.  I also realized, that although I had worked with a lot of customers and other developers, very rarely had I paid attention to how they work, rather than simply their work. 

    Now, here's where I open up the real can of worms.  We're looking to make usability improvements in the WF designer.  Are there any that really bother you?  What can we do to make you a more productive WF developer? 

  • mwinkle.blog

    Proving a Point with LINQ (or, the Longest Type Names in the .NET Framework)

    • 1 Comments

    I will often take a few moments during a presentation to get a chuckle by bringing up the SharedConnectionWorkflowCommitWorkBatchService.  Due to the sheer length of the type name, it's sure to bring a smile or two in one of my otherwise snore-inducing presentation.

    The other day, while reviewing a deck for a colleague I brought up that he should mention this type, and that it usually gets a laugh from a developer audience.  He then asked, "Is that really the longest type name in the framework?"  My response, "Well, I'm not really sure, I bet you could do some LINQ magic in order to figure it out." 

    Well, sitting on the bus this morning with some traffic time to spare (and needing to work on my LINQ skills a bit), put together some code.  My goal was to go through all of the types, calculate their length and figure out which one was the longest named type.  You can replicate this, create a new console application, right click to add references, and select all the references you want to add into this comparison.  I added all of the system.* assemblies, PresentationFramework, PresentationCore and WindowBase.  You could do even more by selecting everything in the reference dialog.

    The thing that appeals to me about LINQ is really that i can just write a query, I don't have to worry about looping through a number of times.  I also like the fact I can develop by refining, that is, I can get a collection back, tweak the query to shape it, take that new collection and query against that.

    Let's first look at what I started with:

    var orderedTypeListing =
           (from assembly in AppDomain.CurrentDomain.GetAssemblies()
            select assembly.GetExportedTypes());

    This ends up returning an object of type IEnumerable<List<Type>>, which doesn't quite get me to what I want.

    I use the Aggregate extension method to operate on this and create an entire list of all the types contained (think of this as flattening the tree by one level, or only returning the leaf nodes in the tree).  With the Aggregate method, I need to provide the operation to do the accumulation.

    var orderedTypeListing =
       (from assembly in AppDomain.CurrentDomain.GetAssemblies()
         select assembly.GetExportedTypes()).Aggregate(
               (x, y) =>
               { return x.Union(y).ToArray(); }
            )

    The only weirdness here is that I have to use ToArray(); since Aggregate returns T[], rather than IEnumerable<T>.

    Now I add a little bit of code to do some ordering.  I like the ordering syntax since I just provide a way to get the value I want to sort by.  Remember to use OrderByDescending in order to get the right ordering.

    Our query near looks like this:

    var orderedTypeListing =
       (from assembly in AppDomain.CurrentDomain.GetAssemblies()
         select assembly.GetExportedTypes()).Aggregate(
               (x, y) =>
               { return x.Union(y).ToArray(); }
            ).OrderByDescending(
                (x) =>
                { return x.Name.Length; }
            );

    So this returns a list, ordered by the length of the name.

    I could just grab the first one off the list, and I'd be done, but I'd like to see the 100 longest names, just in case I'm wrong about our friend SharedConnectionWorkflowCommitWorkBatchService.   To do this, I'll say I want to take 100 off the top of the list and print those out. 

    int count = 1;
    orderedTypeListing.Take(100).ToList().ForEach
    (
        x => 
        Console.WriteLine("{0}: {1}, {3} ({2})", 
        count++, 
        x.Name.Length, 
        x.Assembly.FullName.Split(",".ToCharArray())[1], 
        x.Name)
        );

    This will pretty print the top 100 longest names (these are at the bottom of the post).

    Next, i thought, I'd really like to see a histogram of the sizes.  To do that, I need to group by data.  The Group() extension method, just like the order method, allows me to pass in the value by which I want to group (and that can be computed, say a hash).  It also returns an IGrouping that lets me see the key (in my case, the size of the key) and the IEnumerable itself.

    var groupedTypeListing = orderedTypeListing.GroupBy(
        t => 
        { return t.Name.Length; }
        );
    groupedTypeListing.ToList().ForEach(
        x => 
            Console.WriteLine("{0} : {1}", x.Key, x.Count())
            );

    Finally, I thought I'd see just how many types were included in each version of the framework, and prove that I can group by anything, including manipulating the string on the assembly's full name.

    var groupedVersionListing = orderedTypeListing.GroupBy(
        t => 
        { return t.Assembly.FullName.Split(",".ToCharArray())[1]; }
        );
    groupedVersionListing.ToList().ForEach(
        x => 
            Console.WriteLine("{0} : {1}", x.Key, x.Count()
            )
    );

    This has now let me retrieve a lot of interesting data (interesting at least to me :-) ) that I was able to write with a pretty simple query syntax and do some somewhat sophisticated things (grouping, etc).

    It turns out that our friend SharedConnectionWorkflowCommitWorkBatchService is only number 16 on my list.  The real honor goes to:

     

    AttachedPropertyBrowsableWhenAttributePresentAttribute, with 53 characters.

     

     

    Histogram of Type Name Sizes

    image

     

    Top 100 Longest Type Names

    Rank Length Name Version
    1 54  AttachedPropertyBrowsableWhenAttributePresentAttribute   v3.0
    2 53  ListViewVirtualItemsSelectionRangeChangedEventHandler   v2.0
    3 52  ServiceModelEnhancedConfigurationElementCollection`1   v3.0
    4 50  DataGridViewCellContextMenuStripNeededEventHandler   v2.0
    5 50  ListViewVirtualItemsSelectionRangeChangedEventArgs   v2.0
    6 49  DataGridViewRowContextMenuStripNeededEventHandler   v2.0
    7 49  WorkflowServiceAttributesDynamicPropertyValidator   v3.5
    8 48  DataGridViewColumnDividerDoubleClickEventHandler   v2.0
    9 47  DataGridViewCellContextMenuStripNeededEventArgs   v2.0
    10 47  DataGridViewCellStyleContentChangedEventHandler   v2.0
    11 47  ReadOnlyActiveDirectorySchemaPropertyCollection   v2.0
    12 47  ExtendedWorkflowRuntimeServiceElementCollection   v3.5
    13 46  IDataGridColumnStyleEditingNotificationService   v2.0
    14 46  DataGridViewRowContextMenuStripNeededEventArgs   v2.0
    15 46  UpdateProgressAssociatedUpdatePanelIDConverter   v3.5
    16
    46
     SharedConnectionWorkflowCommitWorkBatchService 
     v3.0
    17 46  DispatcherUnhandledExceptionFilterEventHandler   v3.0
    18 45  DataGridViewColumnDividerDoubleClickEventArgs   v2.0
    19 45  DataGridViewCellToolTipTextNeededEventHandler   v2.0
    20 45  DataGridViewEditingControlShowingEventHandler   v2.0
    21 45  DataGridViewRowDividerDoubleClickEventHandler   v2.0
    22 45  NamedServiceModelExtensionCollectionElement`1   v3.0
    23 45  StandardBindingOptionalReliableSessionElement   v3.0
    24 45  X509CertificateTrustedIssuerElementCollection   v3.0
    25 45  X509ScopedServiceCertificateElementCollection   v3.0
    26 45  InitiatorServiceModelSecurityTokenRequirement   v3.0
    27 45  RecipientServiceModelSecurityTokenRequirement   v3.0
    28 45  DataContractSerializerMessageContractImporter   v3.0
    29 45  ClientWindowsAuthenticationMembershipProvider   v3.5
    30 45  IClientFormsAuthenticationCredentialsProvider   v3.5
    31 45  AttachedPropertyBrowsableForChildrenAttribute   v3.0
    32 44  DataGridViewCellStyleContentChangedEventArgs   v2.0
    33 44  DataGridViewColumnDesignTimeVisibleAttribute   v2.0
    34 44  CodeParameterDeclarationExpressionCollection   v2.0
    35 44  ReadOnlyActiveDirectorySchemaClassCollection   v2.0
    36 44  ServiceModelConfigurationElementCollection`1   v3.0
    37 44  UseManagedPresentationBindingElementImporter   v3.0
    38 44  WS2007FederationHttpBindingCollectionElement   v3.0
    39 43  KeyContainerPermissionAccessEntryCollection   v2.0
    40 43  KeyContainerPermissionAccessEntryEnumerator   v2.0
    41 43  DataGridViewAutoSizeColumnsModeEventHandler   v2.0
    42 43  DataGridViewCellErrorTextNeededEventHandler   v2.0
    43 43  DataGridViewRowHeightInfoNeededEventHandler   v2.0
    44 43  DataGridViewRowHeightInfoPushedEventHandler   v2.0
    45 43  PerformanceCounterPermissionEntryCollection   v2.0
    46 43  TypeUniqueIdentifierSchemaImporterExtension   v2.0
    47 43  IRemoteArgumentDictionaryEnumeratorContract   v2.0
    48 43  ForeignKeyReferenceAlreadyHasValueException   v3.5
    49 43  SecurityPackageContextConnectionInformation   v2.0
    50 43  PrintSystemObjectPropertiesChangedEventArgs   v3.0
    51 43  IssuedTokenClientBehaviorsElementCollection   v3.0
    52 43  IssuedTokenParametersEndpointAddressElement   v3.0
    53 43  X509ServiceCertificateAuthenticationElement   v3.0
    54 43  TransportConfigurationTypeElementCollection   v3.0
    55 43  ClientFormsAuthenticationMembershipProvider   v3.5
    56 43  ServiceDescriptionFormatExtensionCollection   v2.0
    57 43  DispatcherUnhandledExceptionFilterEventArgs   v3.0
    58 42  DataGridViewCellToolTipTextNeededEventArgs   v2.0
    59 42  DataGridViewEditingControlShowingEventArgs   v2.0
    60 42  DataGridViewAutoSizeColumnModeEventHandler   v2.0
    61 42  DataGridViewColumnStateChangedEventHandler   v2.0
    62 42  DataGridViewRowErrorTextNeededEventHandler   v2.0
    63 42  DataGridViewRowDividerDoubleClickEventArgs   v2.0
    64 42  ToolStripItemDesignerAvailabilityAttribute   v2.0
    65 42  EdmRelationshipNavigationPropertyAttribute   v3.5
    66 42  BehaviorServiceAdornerCollectionEnumerator   v2.0
    67 42  DirectoryServicesPermissionEntryCollection   v2.0
    68 42  ForestTrustRelationshipCollisionCollection   v2.0
    69 42  X509ClientCertificateAuthenticationElement   v3.0
    70 42  ServiceControllerPermissionEntryCollection   v2.0
    71 42  DatabaseNotEnabledForNotificationException   v2.0
    72 42  DesignTimeResourceProviderFactoryAttribute   v2.0
    73 41  CryptographicUnexpectedOperationException   v2.0
    74 41  DataGridPreferredColumnWidthTypeConverter   v2.0
    75 41  IDesignTimeResourceProviderFactoryService   v2.0
    76 41  SiteMapDesignerHierarchicalDataSourceView   v2.0
    77 41  WindowsUserNameSecurityTokenAuthenticator   v3.0
    78 41  PrintSystemObjectPropertyChangedEventArgs   v3.0
    79 41  ConnectionOrientedTransportBindingElement   v3.0
    80 41  SecurityContextSecurityTokenAuthenticator   v3.0
    81 41  SecureConversationSecurityTokenParameters   v3.0
    82 41  X509CertificateInitiatorServiceCredential   v3.0
    83 41  X509CertificateRecipientServiceCredential   v3.0
    84 41  RecordDescriptionToTypeReferenceConverter   v3.0
    85 41  BlobMessageEncodingBindingElementImporter   v3.0
    86 41  DistributedTransactionPermissionAttribute   v2.0
    87 41  CompositeActivityDesignerLayoutSerializer   v3.0
    88 41  SqlPersistenceWorkflowInstanceDescription   v3.0
    89 41  AttachedPropertyBrowsableForTypeAttribute   v3.0
    90 40  DataGridViewAutoSizeColumnsModeEventArgs   v2.0
    91 40  DataGridViewCellErrorTextNeededEventArgs   v2.0
    92 40  DataGridViewCellStateChangedEventHandler   v2.0
    93 40  DataGridViewRowHeightInfoNeededEventArgs   v2.0
    94 40  DataGridViewRowHeightInfoPushedEventArgs   v2.0
    95 40  ListViewItemSelectionChangedEventHandler   v2.0
    96 40  DesignerSerializationVisibilityAttribute   v2.0
    97 40  TypeSmallDateTimeSchemaImporterExtension   v2.0
    98 40  SchemaImporterExtensionElementCollection   v2.0
    99 40  ProtectedConfigurationProviderCollection   v2.0
    100 40  DirectoryAttributeModificationCollection   v2.0
  • mwinkle.blog

    TechEd 2008

    • 1 Comments

    TechEd Developer kicks off next week in Orlando, the first time the US group has tried the European model of separate dev and IT pro weeks.  I've grown to like the model in Europe a little better, because I think both attendees and speakers benefit from the greater focus within their specialized areas.  The people who it hurts are obviously those who fall squarely into both camps, but at the US events, I have not run into many of those.

    The conference agenda is getting busy for folks who like to stay on top of Microsoft technologies (or who like to speak at these events), with MIX in the spring, PDC in the fall, and TechEd in the summer, and that's just the US centric Microsoft "general" conferences.  I'm intentionally excluding the Office Developer Conference, international conferences, and those that are not directly put on by Microsoft, such as VS Live.

    Why am I going next week?  In short, it's to give a session talking about advanced WF+WCF integration, but more importantly to escape the Redmond bubble and find out what's actually happening to real customers in the real world.  Those interactions become more and more valuable as we work to build tools to help those customers build applications.  A few of the sessions I'd be interested in as an attendee:

     

    SOA209 The Road to “Oslo”: The Microsoft Services and Modeling Platform

    Thursday, June 5 1:00 PM - 2:15 PM, S220 A 

    Speaker(s): David Chappell

    Microsoft’s “Oslo” project aims at creating a unified platform for model-based, service-oriented applications. This new approach will affect the next versions of several products and technologies, including the Microsoft .NET Framework, Microsoft Visual Studio, Microsoft BizTalk Server, Microsoft System Center, and more. Although many details of “Oslo” won’t be public until later in 2008, this session provides an overview of what Microsoft has revealed so far. Along with a description of the problems it addresses, the session includes a look at several new “Oslo” technologies, including a general-purpose modeling language, role-specific modeling tools, a shared model repository, and a distributed service bus.

    Why? This is the first time we'll be saying more about what's going on in Oslo.  David's a fantastic speaker and the approach he will take with this presentation will take a lot of what we've said so far and tie it together.

     

    SOA302 Framework and Microsoft BizTalk Best Practices with an Eye Toward "Oslo"

    Wednesday, June 4 4:30 PM - 5:45 PM, S210 B 

    Speaker(s): Jon Flanders

    Microsoft has announced "Oslo", the code-name for a wave of technology affecting the Microsoft .NET Framework, Microsoft BizTalk Server, and the idea of building service-oriented systems using Microsoft technologies. In this session we discuss what we know so far about these technologies, and how to think about what you are currently doing with Windows Communication Framework/Windows Workflow Foundation and BizTalk Server to best prepare for the future.

    Why? David's talk is more about the ideas, Jon's talk is more about the tech.  If you code WF, WCF, or BizTalk solutions today, this will be a great talk to understand how to make your apps ready to take advantage of the new features coming in Oslo

    SOA305 Getting Workflows Running and Talking in Your Applications

    Friday, June 6 1:00 PM - 2:15 PM, S320 E 

    Speaker(s): Brian Noyes

    Once you understand the basics of Windows Workflow Foundation (WF) and can put together a workflow using the built-in activities, you will need to know how to get that workflow running in a variety of hosting environments and communicate between the workflow and the host application or the outside world. This session gives you a solid foundation to get started with these techniques. Gain a better understanding of how workflows exist in a hosting process and how to control the hosting services. Learn about the various forms of communication that can exist between a running workflow and the hosting application as well as with outside Web and WCF Services. Also, learn about the persistence and tracking features of WF.

    Why? Brian's talk will focus on how to get workflows communicating, something that's neccessary in any WF app.  I'll follow on this talk with an advanced look at WC+WCF integration in .NET 3.5

    SOA403 Building Federated Solutions on the Internet Service Bus

    Thursday, June 5 10:15 AM - 11:30 AM, S220 C (DEV) 

    Speaker(s): Clemens Vasters

    Using the code-name "BizTalk Services," Microsoft is building a set of "cloud" technologies that are developed and operated by Microsoft as a logical extension to the .NET Framework and the Microsoft SOA technologies. They aim to enable corporate software developers and ISVs building solutions that require broad, cross-organizational identity management, the ability to safely and securely traverse NATs and Firewalls to enable bi-directional communication, Internet-scale publish/subscribe services, broad interoperability, and services orchestration. In short, these technologies are expanding the reach of the ESB pattern to the Internet—that’s why we call it "Internet Service Bus." In this session, Clemens takes you along on a "lots of code" tour through an exemplary solution built using these technologies.

    Why? Get on the bus, baby!  This team is doing some very cool stuff in the cloud, and the infrastructure that is being provided is something that enables you to focus on the cool stuff your app does, not the bizarre intricacies of network traversal or identity management implementation details.

    TLA304 The Nine Essential Power Tools for Every Developer: Extending Microsoft Visual Studio to Enhance the Microsoft Office Development Experience

    Wednesday, June 4 8:30 AM - 9:45 AM, S320 E 

    Speaker(s): John Durant

    Check out the first release of Visual Studio Power Tools, a set of free tools that enhance the design-time or runtime capabilities of Office development in Visual Studio 2008 Professional.This session includes demos of all the tools, such as the Office Interop API Extensions library which brings optional and named parameters to Microsoft Visual C#, the Ribbon IDs Tool Window, and the SharePoint Workflow Package Generator. Come check them out and find out how you can start using them today

    Why?  John is a great speaker, he once appeared at a talk I set up wearing Heelys and wheeled around the audience blasting through technical details.  At 8:30 am, this talk is a great way to start your Wednesday.

    TLA317 Busy .NET Developer's Guide to Microsoft F#

    Speaker(s): Luke Hoban, Ted Neward

    F#, Microsoft's new functional language for the Microsoft .NET platform, makes it easy—as in, half the total lines of code easy—to create business objects for .NET applications that can be used from any other .NET language, like Microsoft Visual C#, Visual Basic, or Visual C++/CLI. In this presentation, we look at how to do this in F#, the advantages of doing so, and how doing this simplifies your life as a .NET developer.

    Why? Luke gave this talk in Israel where it was well received.  The addition of functional programming into the VS family of languages is a huge win for developers.  This talk will help you think about programs from a functional perspective, and show you how to do it.

  • mwinkle.blog

    PDC, 2008

    • 1 Comments

    The site went live last night, check it out and I hope to see you there.

    A few of the sessions that caught my eye.

    Windows 7: Optimizing for Energy Efficiency and Battery Life

    A single application can reduce mobile battery life by up to 30%. Windows 7 provides advances for building energy-efficient applications. In this session we will discuss how to leverage new Windows infrastructure to reduce application power consumption and efficiently schedule background tasks and services.

    Windows 7: Touch Computing

    In Windows 7, innovative touch and gesture support will enable more direct and natural interaction in your applications. This session will highlight the new multi-touch gesture APIs and explain how you can leverage them in your applications.

    Windows Mobile: Location, Location, Location

    Mobile location based services are the next "big thing", and this session will review the tools and technologies Windows Mobile makes available to developers wanting to integrate location into their applications. Location acquisition, services integration, mapping and visualization, and best practices will be discussed.

    Live Platform: Mesh Services Architecture Deep Dive

    You've heard about Microsoft's new software+services platform Live Mesh, combining the world of the web and the world of digital devices. Come take a look under the hood and learn about the underlying service architecture behind this mass-scale cloud service and client platform. We'll look at services such as FeedSync-based synchronization, accounts and security services, P2P communications, pub-sub infrastructure, and the Mesh Operating Environment (MOE).

    Architecture of the Building Block Services

    Dive into the architecture that links many of the building block services and lets ISVs and businesses deliver compelling solutions. Learn how to compose these services to create applications in the cloud and connect them with on-premises systems. In this session we'll cover the next generation of messaging, data, identity, and directory services, and how they help developers.

     

    oh, and this one...

    Advanced Workflow Services

    This session covers significant enhancements in Windows Communication Foundation (WCF) and Workflow Foundation (WF) to deal with the ever increasing complexity of communication patterns. Learn how to use WCF to correlate messages to service instances using transport, context, and application payloads. We'll show you how to use the new WF messaging activities to model rich protocols and how to use WCF as a rich default host for your workflows and expand the reach of WF with features like distributed compensation. See how service definition in XAML completes the union of WF and WCF with a unified authoring experience that dramatically simplifies configuration and is fully integrated w/ IIS activation and deployment.

    We'll probably have a few other things to talk about with WF as well ;-)

Page 1 of 1 (4 items)