22
WPF & Silverlight 2.0 Introduction Dave Allen ISV Application Architect Developer and Platform Group Microsoft UK

WPF & Silverlight Intro

  • View
    1.622

  • Download
    1

Embed Size (px)

DESCRIPTION

WPF & Silverlight Intro

Citation preview

Page 1: WPF & Silverlight Intro

WPF & Silverlight 2.0 IntroductionWPF & Silverlight 2.0 Introduction

Dave AllenISV Application ArchitectDeveloper and Platform GroupMicrosoft UK

Page 2: WPF & Silverlight Intro

AgendaAgenda

Windows Presentation FoundationXAMLSilverlight 2.0Primary differencesWPF or Silverlight?Deployment

Page 3: WPF & Silverlight Intro

The Windows Client PlatformThe Windows Client Platform

WPFSilverlight

Silverlight Mobile

.NET

XAMLDesktopWeb

Mobile

Page 4: WPF & Silverlight Intro

The user experienceThe user experience

Page 5: WPF & Silverlight Intro

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

Page 6: WPF & Silverlight Intro

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

Page 7: WPF & Silverlight Intro

DemoDemoWPF applications

Page 8: WPF & Silverlight Intro

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

Page 9: WPF & Silverlight Intro

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

Page 10: WPF & Silverlight Intro

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

Page 11: WPF & Silverlight Intro

DemoDemoXAML

Page 12: WPF & Silverlight Intro

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

Page 13: WPF & Silverlight Intro

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

Page 14: WPF & Silverlight Intro

DemoDemoSilverlight 2.0 – Anatomy

Page 15: WPF & Silverlight Intro

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.

Page 16: WPF & Silverlight Intro

DemoDemoSilverlight 2.0http://www.mscui.net/PatientJourneyDemonstrator/http://memorabilia.hardrock.com/

Page 17: WPF & Silverlight Intro

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

Page 18: WPF & Silverlight Intro

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

Page 19: WPF & Silverlight Intro

.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

Page 20: WPF & Silverlight Intro

DemoDemo.NET Client Profile

Page 22: WPF & Silverlight Intro