Upload
candace-carson
View
217
Download
0
Embed Size (px)
Citation preview
DEV363Smart Client: Getting the Most out of Windows Forms and WPF
Brad Abrams Group Program Manager .NET Framework Team
http://blogs.msdn.com/brada
What we are going to talk about
• Presentation Technology Choices
• Key WinForms Strengths (and demo)
• Key WPF Strengths (and demo)
• WinForms\WPF Interop (and demo)
• Orcas Era Features (and demos)• Occasionally Connected Applications
• Application Services
• ClickOnce
Presentation Technology Choices
App Requirements 1. Leverage the client
OfflineResponsive
2. Offer compelling UXProvides operational Efficiency Business insight
3. Enable familiar developmentLow training costsLarge skill pool
JSP
Swing
Win32
ATL
WPF\E
“Atlas”
ASP.NET
FoxPro
VB6
MFC
WinForms & WPF
Flash
WinForms + WPF = Success!
Windows Forms• RAD
• Great Designer Support
• Huge Ecosystem
WPF• Powerful and Flexible
• Rich Data Visualization
• Media Integration
WinForms+WPF
• Productivity of WinForms
• Richness of WPF
• Seamlessly use together in the same app
Windows Forms Enables rapid development of powerful
smart client application
• Low cost to deliver client solutions
• Focus on business logic rather than glue
• Productivity-focused tools support
• Extensive set of common of controls
WinForms 2.0 in action
Windows Presentation FoundationA unified approach to UI, media
and documents to deliver unmatched UX
• Deliver Innovative User Interfaces
• Increase Developer-Designer Productivity
• Achieve Flexible Application Deployment
• Leverage Existing Code Base and Skills Set
WPF in action
WinForms and WPF Together
Windows Forms Application
HwnSourceHwnSource
ElementHostElementHost
AdapterAdapter
WPF ElementsWPF Elements
• Host WPF in Windows Forms applications
• A set of services provided to support co-existence scenarios
• Type conversions
• Focus management
• Keyboard management
• Extensible property mapping
• A hosted control model
• Ships with .NET Framework 3.0
• Design Time experience in VS-Orcas
Orcas Era
WPF / WinForms Interop: Runtime• Light up existing WindowsForms app with WPF
• Full interaction between technologies • Call events on controls of the opposite technology
• Data bind to the same data source
• Set control properties on the opposite technology
• End user can’t tell where WPF starts or ends• Tab order, focus, all work seamlessly
• Fonts, Background Colors, visibility all are picked up automatically
WPF / WinForms Interop: DesignTime • Drag-and-drop WPF UserControls
directly onto WindowsForms Forms and UserControls
• Live preview of the WPF hosted content at design-time
• Edit content using the best designer for the job• WindowsForms designer for Form
layout
• WPF UserControl editor for WPF content
Orcas Era
WinForms and WPF Together
Occasionally Connected Applications• Easily enable client apps to work on-line and offline
• Local relational database• Small (< 1.5 MB)
• Non impactful “install”
• Same data programming model • Single file, code free format (.sdf)• In-Proc with the hosting app Doesn’t run as a service
• Up to 4 gigabytes per database• Multi connections for background data operations• Simplified security with password and encryption• Query Processor w/Transaction
• Sync Engine• Proven, Lightweight, 2 Tier, Scalable Sync API (RDA)• Full Featured Merge Replication• Occasionally Connected Sync Framework
• Works great in WinForms and WPF
Orcas Era
OCS Sync Component Architecture
SyncAdapter
ServerSyncProvider
Sync Adapter commands
Data Forms
SyncAgent
Data Access
Work against local databaseOutlook Model
Sync keeps the local and remote stores in syncCan push changes directly or via services Builds on your ADO.NET knowledgeComponentized for your usage patterns
ClientSyncProvider
SyncTable
SyncGroup
DBCommand
SQL Server Compact Edition
Transport
ServiceServiceProxy
Taking the Expense App offline
Vista Support
• Existing applications work seamlessly on Vista • Applications auto upgraded to Vista look and feel
Vista Support …
• Auto upgrade for Common File Dialogs
• Windows Forms work seamlessly under UAC• UAC Shield Icon support
Application Level Services
• Easily enable client apps to leverage ASP.NET application services
• Authentication
• Role Management
• Profile
• On the server• WCF Exposure of ASP.NET 2.0 AppServices
• On the client• Simple client library
• Offline enabled
• Works great in WinForms and WPF
Orcas Era
AppServices
ClickOnce Improvements
• Firefox Support• Will work with Non IE Browsers Out of the Box• Plus Firefox plugin ready
• Corp deployment of ISV’s Applications• Application Manifests can now provide App Trust information
• XCopy publishing• Publish Location optional for Installed App
Orcas Era
ClickOnce
Summary
• WinForms and WPF: The best marriage for client apps
• WinForms offers easy of use
• WPF offers power and flexibility
• “Orcas” Offers much more!• Design time support for using WinForms and WPF together
• Framework occasionally connected applications
• Great Vista support
• Access to application level services on the client
• Seamless deployment with clickonce
How Do I Get Started?
• WinForms Information• Deploy Visual Studio 2005 Today!• Join the community: http://windowsforms.net
• WPF Information• Evaluate WPF• Check the site: http://wpf.netfx3.com/
• Check out SQL Server Compact Edition RC1• http://www.microsoft.com/sql/editions/compact
• Get ready for Orcas• Get the CTP: http://msdn.microsoft.com/vstudio/future/
• We’d love your [email protected]://blogs.msdn.com/brada
© 2006 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.
Vista Support
• Existing applications work seamlessly on Vista • Applications auto upgraded to Vista look and feel
Vista Support …
• Auto upgrade for Common File Dialogs
• Windows Forms work seamlessly under UAC• UAC Shield Icon support