lessons learned: designer/developer productivity in windows presentation foundation

48

Upload: goodfriday

Post on 02-Jun-2015

1.053 views

Category:

Technology


1 download

DESCRIPTION

Join the IdentityMine team for an in-depth discussion around lessons learned on Windows Presentation Foundation (WPF) designer/developer workflow and productivity. They look at several real world WPF applications they have built and show you how to help maximize productivity across the entire team from Graphic Designer to Interactive Designer to Developer. Also, get a sneak peek at several of IdentityMine's forthcoming Blendablesâ„¢ Brand WPF Control products and take the opportunity to participate in an open Q&A session with the team

TRANSCRIPT

Page 1: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation
Page 2: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Lessons Learned: Designer/Developer Productivity in Windows Presentation FoundationJonathan Russ and Josh WagonerIdentityMine, Inc.

Page 3: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

IdentityMineWho are we?

User Experience Design and Development

WPF

We love software

Page 4: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

IdentityMineWhat have we done?

Page 5: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Lessons Learned

Real world application design and development has taught us a lot…

And we like to share.

Page 6: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Workflow

Design Develop

Integrate

Page 7: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Designer

True Graphics Designer

Microsoft Expression Design, Adobe Illustrator, Macromedia Fireworks, 3D Modeling Tools

Owns the design assets

Page 8: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Developer

Software Engineer

Microsoft Visual Studio 2005

Owns the code

Page 9: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Integrator

Part Designer, Part Developer. Coordinator.

Microsoft Expression Blend, Microsoft Visual Studio 2005

Owns the XAML

Page 10: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

The DynaViz App

Jonathan RussDirector of R & D

4½ years – WPF 13 years – Software18 years – Industry26 years – Hobbyist

36 years – Coexisting

Page 11: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Microsoft Dynamics Sure Step Business Modeler

demo

a.k.a., Dynamics Visualization Applicationa.k.a., DynaViz

Page 12: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Object Lifetime

Event handlers keep objects alive

WPF registers a Changed handler for DPs of type Freezable

Set to null prior to releasing the object

MyRect.Fill = null;

MyRect = null;

Page 13: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Object Lifetime (continued…)

There’s Strength in Weakness

Follow the weak event pattern

Use weak references

Page 14: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Object Lifetime (still living…)

Cache and Re-use Objects

Page 15: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Working with Images

Cache Images

Page 16: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Working with Images (continued…)

Decode images to their required sizes

BitmapImage.DecodePixelWidth BitmapImage.DecodePixelHeight

Page 17: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Keyboard Access

Use Commands

KeyBinding

Best if stored in a common location

Page 18: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Keyboard Navigation

Focusability

Focusable PropertyIsTabStop Property

Page 19: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Keyboard Navigation (continued…)

Visual Cues

FocusVisualStyle Property

Page 20: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Keyboard Navigation (continued…)

Control Behaviors

IsMouseOver PropertyIsKeyboardFocusWithin Property

Page 21: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Keyboard Navigation (continued…)

Tracking Focus

Snoop FocusManager

Page 22: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Blendables™ in DynaViz(from the Essentials Mix)

ChromelessWindow

ElementSnapshot

DragAndDrop

OSChecker

Zoombox

Page 23: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Blendables™ in DynaViz(from future mixes)

TreeGraph

RadialPanel

ForceDirectedRadialPanel

CommandTextBox

EditModeTextBlock

ImageCache

Page 24: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Taking XAML Farther

demo

SimpleBinding and EvalBinding(available in all Blendables™ mixes)

Page 25: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Accruent Data Visualization

Real Estate Performance Management

Optimize the impact of real estate on company performance

Page 26: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Accruent

demo

Page 27: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Areas of Interest

Development Workflow

WPF 3D

Real-world Data Sources

Page 28: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Team

Designers: 1

Integrators: 1

Developers: 1-2

Page 29: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Workflow

Designer: Comps. 3D Models.

Integrator: Styles. Templates. 2D Animations. Design Integration.

Developer: Controls. 3D Interaction Code. Intergration of Data Services. Code Behinds.

Page 30: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Workflow Challanges

Feature differences between WPF 2D and 3D

Less Designer and Integrator input than other WPF projects

Page 31: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

WPF 3D

Building 3D applications with WPF can be much easier than other technologies, but…

It's still hard.

Page 32: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Developers: Understand 3D

Make sure you have a good understand of 3D concepts and terminology.

If you don't have the knowledge now, don't be afraid of 3D. Read a book.

Page 33: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Designers and 3D

Designers should be familiar with 3D Modeling tools.

ElectricRain's Zam3D

Workflow: Export developer friendly models.

Page 34: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Users and 3D

Most users are not familiar with navigating 3D UI

Contrained movement to allow users easily acclimate to the environment

2D UI to allow user to control 3D world

Page 35: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Developing 3D Interaction

Input Events… or lack thereof

Hit Testing in 3D

Page 36: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

ModelVisual3D

ModelVisual3D is the most functional class in 3D

Most similar to the 2D Visual class

No support for Styles, Templates, Routed Events.

Page 37: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Input Events

3D models do not raise events as 2D controls do

No MouseEnter, No MouseExit, No MouseButtonDown, etc.

Page 38: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Hit testing in 3D

A UIElement is needed to raise input events. This could be the Viewport3D itself or an element on

top of the Viewport3D

VisualTreeHelper provides support for hit testing into 3D

Models intersected by hit test are returned

Page 39: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Improving Hit Testing Dev Experience

We created a hit manager class that handles all hit testing

Hit manager dispatches events to the models hit

Now we could add event handlers directly to the models when the model is added to scene for a more productive and consistent development

model

Page 40: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

No ItemsControl in 3D

Data in the Accruent application cried out for ItemsControl functionality.

List of data objects are returned from most service calls.

We leveraged the Blendables™ Brand ItemsContainer3D and Carousel3D controls

Page 41: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Carousel3D

demo

Building a data bound video carousel entirely in markup.

Page 42: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

2D on 3D

3DTools project on codeplex.com

Source released by Microsoft with controls enabling interactive 2D content on 3D

The Interactive3DDecorator is the control that sits on top of the Viewport3D in the Accruent

application

Page 43: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Performance

Avoid TileBrushes whenever possible in your 3D scene

When a model with a TileBrush in its material is not visible remove it form the scene

RenderOptions.CachingHint attached property

Page 44: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Data

Real world data sources can be slow

Waiting on data can freeze ambient animations and result in a poor user experience

Page 45: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Dispatcher

Dispatcher.Invoke

Dispatcher.BeginInvoke

Do processing on background threads and update dependency properties

Page 46: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

IdentityMine Team

Q & A

Page 47: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

Please fill out your eval

evaluation

Page 48: Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,

it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.