Developing Silverlight Applications That Don't Suck

 
Developing Silverlight Applications That Don't Suck

A 5-Day Training Class

Detailed Syllabus

Morning 1: Introduction

Lecture: Introduction of students and structure of class. Quick look at problems of current web user interface implementations and need for rich Internet applications.  Goals of Silverlight – cross-platform integration, ease of deployment and maintenance, security, resolution and size independence, hardware acceleration, rich composition and customization, separation of appearance from behavior, convenient and widespread data binding. Structure of a Silverlight application, description of the browser plug-in. Generation of a Silverlight project in Visual Studio, examination of the XAML and other files produced. Instantiation of Silverlight objects via XAML elements, setting of object properties via XAML attributes, mapping of XAML namespaces onto .NET namespaces. Use of the .XAP file.

Lab: Generate and set up VS or Expression Blend projects for students' own Silverlight development projects. Examination of basic structure and XAML utility applications.

Afternoon 1: Fundamental Structure of a Silverlight Application

Lecture: Examination of sample programs that accompany the textbook. Detecting presence of Silverlight, downloading and installing it when necessary, strategies for convincing user to consent to downloading it. Examination of the Silverlight browser object.  Security properties of Silverlight, operations that are and are not permitted. Subset of .NET CLR features that are available to Silverlight programs. Running inside and outside of the browser host. Startup and shutdown events of the application. Examination of element tree using a viewer application.

Lab: Examine element tree of students' prototype or production applications

Morning 2: Controls

Lecture: Introduction to Silverlight Controls; content, items, and text controls. Use of an arbitrary object as content in a content or item control. Classes of buttons; other content controls, such as label and tooltip. Containers with header. Examination of the ContainerControl class, classes derived from it such as ListBox and ComboBox. Concept of a Selector. Customizing items contained in an ContainerControl. ListView and Tab controls. Menus and Toolbars. Text controls. Example showing same combination of properties converted into a style and referenced from the individual buttons via its key.

Lab: Examine choices and select controls for students' prototype or production applications.  

Afternoon 2: Layout

Lecture: Problems of laying out controls for a wide and changing set of display resolutions. Need for layout containers with different properties. Examination of Canvas, StackPanel,  and Grid classes. Examination of options for holding child controls. More detailed examination of the Grid class, as it is the most versatile and most widely used. Specifying numbers of rows and columns, sizing and spanning rows and columns, automatic sizing behavior.  Using splitter to allow manual sizing of grid cells. Options for clipping child controls. Scrolling and scaling in layout containers. Automatic application of styles to controls via omitting key, “implicit style”, requiring exact match. Adding property and data triggers to styles, combining trigger conditions. Concept of complete replacement of control appearance, use of a template. Use of triggers in templates. Scoping of styles and templates.

Lab: Examination of layout options for students' prototype or production applications. Select layout of students' choice, work with options of that layout.

 Morning 3:  Data Binding

Lecture: Design philosophy and goals of Silverlight data binding. Specifying the source of data binding. Concept of a binding object, examination of the Binding class. Using a Binding in XAML, specifying Path property. Binding to other XAML properties, specifying the RelativeSource. General case of binding to any property of any .NET object. Need for notification and change to display when data to which a control is bound changes. Examination of the dependency property structure of Silverlight. Notification callback for change in a property. Use of the DependencyProperty and ObservableProperty class. Use of DataContext as default source of data for binding. Implementing the INotifyPropertyChanged interface, use of the ObservableCollection class. Binding to ListBoxes and ComboBoxes, managing the SelectedItem property.

 Lab: Explore and discuss the options for data binding in students' prototype or production applications. Implement the most promising option.

Afternoon 3: Graphics

Lecture: Principles of graphics in Silverlight, comparison of bitmap versus vector images. Rendering of graphic images; retained versus immediate graphics modes. Drawing shapes and lines, fill brushes, outline pens, paths. Transforms and their rules, scaling and translation. Clipping and opacity.

Lab: Examine graphical challenges of students’ prototype or production applications. Implement the most promising options under your instructor’s guidance.

Morning 4: Using Silverlight for Good and Not Evil

Lecture: Putting the power of Silverlight into the hands of developers who are unschooled in the art of user interface design is like giving liquor and Corvette keys to teenage boys. It's fun for them, temporarily, but the end results aren't pretty. “The first time they see it, they will think it is cute. The eleventh time they see it, they will think about killing you,“ writes etiquette columnist Miss Manners. Users don't give a flying fish about their applications in and of themselves. Never have; never will. They only care about accomplishing the tasks that they bought the software to get done, so that they can get on with eating and making love and living their lives. Forget about color gradients and button radii. Learn how to use Silverlight's power to accomplish good things that your users actually care about, not useless nonsense that does nothing but titillate the rococo vanity of socially misfit geeks.

We will examine the Family.Show WPF application, often cited as a paragon of good WPF design. We will study its use of three separate WPF features: color gradients, motion, and re-looking of controls. We will see cases in which the app uses each of these features well, quickly and easily improving the user experience far beyond anything Windows Forms could do. And we’ll also see different parts of the very same app using the very same WPF features to degrade the user experience, in once case inflicting genuine physical, not just mental, pain on its user.  We will discuss the underlying principles that cause e

Lab: Examine your proposed designs or your existing products in light of the examples in this lecture. Identify usages of advanced graphical features that help the user and those that do not. Propose strategies for converting the latter into the former.

Afternoon 4: Writing User Stories

Lecture: Storytelling is the main way in which the human species communicates. It is likewise the best way way in which the interaction of a user with a program is discussed and specified. We will discuss building a user interface from a collection of user stories. We will define a user story, discussing what they are and are not. We’ll look at the choices for the length and details of a user story, and derive principles for handling stories that  are too long or too short.  We’ll examine some examples of good and bad user stories. We’ll examine and work with different ways of tracking stories – index cards versus programs, advantages and disadvantages of each. Once we know what good stories are, we’ll discuss ways of gathering the information we need to write good ones. We’ll discuss the sorts of information you can elicit from direct interaction with users, such as interviews, and the types that you can’t get directly from them but can only get from observing them in action.  We will examine the construction of users’ goals and constraints, what the users think they are and what they really are. Finally, we’ll discuss extracting information from participants in the process who are not actual users – their managers, for example, or problem domain experts or regulatory personnel.

Lab: Write three separate user stories for the design of your product. Expand and document them as much as permitted by the available time.

Morning 5: Testing on Live Animals

Lecture: You never know how well anything works until you test it. Somehow this principle often gets lost when it comes to the user experience. What is obvious to a developer who uses an application all day every day is opaque to a casual user, or even a non-casual user who doesn’t understand (or want to understand) a program’s internal workings.  User interfaces need to be tested early and often so their efficacy, or lack therefore, can be determined.

We’ll discuss the timing of user interface testing, learn why waiting until the beta (or even alpha) phase is never enough. We’ll consider the frequency of testing iteration versus the number of users; why more tests with fewer users in each are better than fewer tests with more users.  We’ll address the issues and difficulties of recruiting the test subjects, and the pitfalls of Jakob Nielsen’s ideas on “hallway usability testing”. We’ll see how important is the exact wording of the tasks that you set for users and the data that you put in front of them. And because the user interface will evolve quickly as data becomes available, we’ll discuss ways of generating prototype user interfaces quickly.  Finally, we’ll discuss the art and science of making changes to the user interface based on what you learn during your testing, and strategies for handling the resistance that inevitably arises.

Lab: Perform a quick usability test on your company’s existing or proposed products. Discuss the information that you collect as a result, the lessons that it teaches, and the changes that you would make to your product as a result.

Afternoon 5: Instrumentation For Knowing Thy User

Lecture: The most important principle of user experience design is “Know Thy User, for He Is Not Thee.” However, it is very difficult to know exactly what users think of your application – what they find easy to use, what’s hard, what makes sense to them and what doesn’t. If you ask them, they don’t know, or can’t remember, or don’t want to admit they can’t use your application, or don’t want to insult you. Even finding users to ask is difficult, and current techniques such as focus groups almost always produce unrepresentative results.

The only way to know for sure is to instrument your application so that it reports user experiences over many sessions.  This talk will discuss ways in which this can be done and the design decisions that need to be made to accomplish it successfully. User experience tracking is different from other kinds of program instrumentation – it has to be very light, so that it doesn’t degrade performance at all.  Which sorts of events should you record? How do you convince users to opt in for data collection? How do you send and store the data, and how do you analyze it? A sample user experience tracking framework will be demonstrated. The silent majority has a lot to say, if you know how to listen to them.

Lab: Examine a working application containing a user instrumentation framework. Follow the flow of information from instrumented application to database to designer. Discuss how you would instrument your own applications.