View
1.622
Download
1
Embed Size (px)
DESCRIPTION
WPF & Silverlight Intro
Citation preview
WPF & Silverlight 2.0 IntroductionWPF & Silverlight 2.0 Introduction
Dave AllenISV Application ArchitectDeveloper and Platform GroupMicrosoft UK
AgendaAgenda
Windows Presentation FoundationXAMLSilverlight 2.0Primary differencesWPF or Silverlight?Deployment
The Windows Client PlatformThe Windows Client Platform
WPFSilverlight
Silverlight Mobile
.NET
XAMLDesktopWeb
Mobile
The user experienceThe user experience
Windows Presentation FoundationWindows Presentation Foundation
Now in it’s third release: 3.0, 3.5, 3.5 SP1Highly stable platform for rich client applicationsMany bug fixes and supplemental features
Browser control added in 3.5 SP1Performance optimizations – especially cold start-up
Some mixed messages on it’s initial releaseWinForms is dead, no further development – not true!Backtrack – WPF isn’t really suitable for LOB – was true!Tooling not good enough for RAD of LOB apps – was true!
WPF is moving into mainstream LOBWPF Toolkit available on codeplex includes:
DataGrid, Ribbon, Calendar/Date Picker, Visual State manager.
WPF 4.0 primary goal is LOB applications
Primary features of WPFPrimary features of WPF
Vector based graphics, resolution-independent DPI Composition engine – allows nesting of all controlsUnified programming model for 2D, 3D, and MediaDeclarative programming model with XAMLSupport different types of layoutHigh degree of control over stylingBuilt-in support for DataBindingDeploy through browser (XBAP)Interop with WinForms
DemoDemoWPF applications
WPF architectureWPF architecture
Property Engine
Input / Eventing System
.NET Framework 2.0
Desktop Windows Manager
Media Integration Layer
DirectX
Windows Vista Display Driver (LDDM)
Windows Media
Foundation
Composition Engine
Print Spooler
ManagedUnmanaged
Application Services
Deployment Services
Databinding
USER INTERFACE SERVICES
XAML
Accessibility
Property System
Input & Eventing
BASE SERVICES
DOCUMENT SERVICES
Packaging Services
XPS Documents
Animation
2D
3D
AudioImaging
Text
VideoEffects
Composition Engine
MEDIA INTEGRATION LAYER
Controls
Layout
Win
dow
s Pre
senta
tion F
oundati
on
WPF programming modelWPF programming model
Declarative programming with XAMLUI and code easy to separate1:1 matching between XAML and codeEasily toolable
<Button Width="100"> OK <Button.Background> LightBlue </Button.Background></Button>
XAMLButton b1 = new Button();b1.Content = "OK";b1.Background = new SolidColorBrush(Colors.LightBlue);b1.Width = 100;
C#Dim b1 As New Buttonb1.Content = "OK"b1.Background = New _ SolidColorBrush(Colors.LightBlue)b1.Width = 100
VB.NET
Designer-Developer CollaborationDesigner-Developer Collaboration
• Microsoft Tools for Designers & Developers
• Declarative Programming through XAML
Designers design
With XAML designers & developers can streamline their
collaborationDevelopers add business logic
DemoDemoXAML
Silverlight 2.0Silverlight 2.0
Browser plug-inCross-browser, cross-platforms, cross-device.NET Runtime allows authoring in C# and VB.NETKey Features
LINQNetworking
Web ServicesWeb ClientSockets
HTML DOM IntegrationIsolated StorageSafe File Open Dialog
Silverlight 2.0 architectureSilverlight 2.0 architecture
XAML
Integrated Networking
Stack
DOM Integration
InstallerJavaScript
Engine
Presentation Core
.NET for Silverlight
Inputs
KeyboardMouse
Ink
Media
WMV / VC1WMAMP3
Controls
LayoutEditing
UI Core
2D VectorsAnimation
Text
ImagesTransform
s
DRM
Media
Dynamic Languages
Ruby Python
BCL
Generics
Collections
Web Services
RESTRSS
SOAP
POXJSON
Data
LINQ LINQ-to-XML
WPF for SilverlightExtensible Controls
Common Language Runtime
ASP.NET AJAX Libs
<asp:xaml><asp:media>
Server Silverlight 1
Silverlight 2
DemoDemoSilverlight 2.0 – Anatomy
Differences between Silverlight & WPFDifferences between Silverlight & WPF
What’s commonXAML, CLR, C#, VB.NET
What’s not – most other thingsFull fidelity .NET in WPFSubset in Silverlight 2.0NamespacesNavigationControls, properties, methods, eventsSecurity modelData bindingLocalisationResources
Some things are different for a reasonIsolated storage, File Dialog, HTML DOM, etc.
DemoDemoSilverlight 2.0http://www.mscui.net/PatientJourneyDemonstrator/http://memorabilia.hardrock.com/
WPF and Silverlight applicationsWPF and Silverlight applications
The paradigm shiftWPF not a natural fit for a WinForms, VB6, MFC developer that has grown up on GDI/User32XAML mark-up language more familiar to Web developersVisual Studio 2008 and Expression Blend generate XAML
WPF/Silverlight/XBAP – too many options?Decision is much simpler than you thinkIf you develop and deploy WinForms applications today
WPF is the natural choice – full fidelity .NETIf you develop WinForms applications and deployment is a problem, then XBAP could be the answer
Restricted to browser sandbox – full fidelity .NETIf you target the browser today and are moving to RIA
Silverlight is the natural next step
WPF versus XBAP versus SilverlightWPF versus XBAP versus Silverlight
WPF applications are installed, MSI or ClickOnce
Full access to local machine, full-trust, full .NET FrameworkCan support any off-line capability you haveInteract with other applications.NET Framework can be packaged with your MSI
XBAPRequires full .NET Framework 3.x to be pre-installedIs a full WPF application apart from deployment mechanismDeployed and run in browser sandbox
Silverlight 2.0Completely separate .NET runtime, no binary compatibilityDeployed through a Web page and interacts with Web pageRequires Silverlight 2.0 browser plug-in
.NET Client profile.NET Client profile
Full .NET 3.5 SP1 Framework now 231Mb!Subset of the full .NET Framework 3.5 SP1
Just 26Mb in totalTargets Windows XP SP2Includes client specific assemblies, such as WPF, WCF, WinForms, ClickOnce, XML, LINQ, System.Data, etc.Does not include ASP.NET, WF, and other server-side assemblies.
Target through App.config and Deployment.xml
Customizable deployment UIConfigurable through Visual Studio
DemoDemo.NET Client Profile
ResourcesResources
http://msdn.microsoft.com/en-gb/netframework/aa663326.aspxhttp://windowsclient.net/wpf/http://www.microsoft.com/silverlight/http://silverlight.net/default.aspxhttp://msdn.microsoft.com/en-us/library/cc656912.aspxhttp://blogs.windowsclient.net/trickster92/archive/2008/05/21/introducing-the-net-framework-client-profile.aspx