Upload
sampetruda
View
709
Download
0
Tags:
Embed Size (px)
Citation preview
Introduction to SilverlightIntroduction to Silverlight
By Alan CobbBy Alan Cobb2008-Jan-102008-Jan-10
Sacramento, CASacramento, CA
www.alancobb.comwww.alancobb.com
About Alan CobbAbout Alan Cobb
Independent consultant since mid-80s on Independent consultant since mid-80s on Microsoft platformsMicrosoft platforms
C#, WinForms, WPF, .NETC#, WinForms, WPF, .NET
One of directors of the SacDotNet U.G.One of directors of the SacDotNet U.G.
http://www.alancobb.comhttp://www.alancobb.com
Presentation OverviewPresentation Overview
What is Silverlight?What is Silverlight?
How does it relate to other client-side How does it relate to other client-side technologies?technologies?
How important is it?How important is it?
Silverlight app development walk-throughSilverlight app development walk-through
What is Silverlight?What is Silverlight?
One word definition: FlashOne word definition: Flash Browser plug-in: cross-browser, cross-platformBrowser plug-in: cross-browser, cross-platform Use case today: Animated ads, VideoUse case today: Animated ads, Video Use case tomorrow: Applications (Flex)Use case tomorrow: Applications (Flex) Benefits: Adds functionality + write-once-run-everywhereBenefits: Adds functionality + write-once-run-everywhere
Why Silverlight not Flash?Why Silverlight not Flash?
More words: Flash + .NETMore words: Flash + .NET
More words: WPF-subset + .NET-subsetMore words: WPF-subset + .NET-subset
This is a big dealThis is a big deal
Once-every-20-years eventOnce-every-20-years event
Existing client-side web technology has Existing client-side web technology has reached the peak of its life-cyclereached the peak of its life-cycle
Fresh start of a new client GUI technologyFresh start of a new client GUI technology
Web is where the action isWeb is where the action is The network is the computerThe network is the computer
Comparing client platformsComparing client platforms
HTML / CSS / JavaScript / AJAX
Desktop:
Win16Win32WinForms
WPF Silverlight Flash /Flex
Web:
Competing technologiesCompeting technologies
Desktop based “smart clients”Desktop based “smart clients” WPF on high endWPF on high end
3D, Hardware acceleration3D, Hardware acceleration WinForms: (Mature, proven)WinForms: (Mature, proven)
Web-based:Web-based: ASP.NET - HTML + CSSASP.NET - HTML + CSS ASP.NET - HTML + CSS + AJAXASP.NET - HTML + CSS + AJAX Adobe Flash / FlexAdobe Flash / Flex
Desktop-web hybrid (?):Desktop-web hybrid (?): Adobe AIRAdobe AIR
Demo – Yahoo Finance Charts Demo – Yahoo Finance Charts
Demo – Picnik.com Photo Editor Demo – Picnik.com Photo Editor
Feature DetailsFeature Details
WPF / Silverlight – Positives:WPF / Silverlight – Positives:
Vector based vs. pixel basedVector based vs. pixel based Scalable – Looks good at multiple resolutionsScalable – Looks good at multiple resolutions
XAML – Similar to HTMLXAML – Similar to HTML DeclarativeDeclarative Designers and programmers work in parallelDesigners and programmers work in parallel
Rich customization is possible in a well-Rich customization is possible in a well-designed waydesigned way
WPF - NegativesWPF - Negatives
Windows onlyWindows only
Requires 50 / 200 MB .NET 3.x runtimeRequires 50 / 200 MB .NET 3.x runtime
Steep learning curveSteep learning curve
Versions of SilverlightVersions of Silverlight
1.01.0 RTM in Sept. 2007RTM in Sept. 2007 Code behind – JavaScript onlyCode behind – JavaScript only
1.1 / 2.01.1 / 2.0 Alpha introduced in Spring 2007.Alpha introduced in Spring 2007. Beta at MIX08 in March 2008.Beta at MIX08 in March 2008. RTM maybe Q3-2008.RTM maybe Q3-2008. Code behind - .NET languages C#, etc.Code behind - .NET languages C#, etc. Partial .NET class libraryPartial .NET class library
Silverlight - PositivesSilverlight - Positives
Lightweight at 4-6 MB, quick downloadLightweight at 4-6 MB, quick download
.NET based.NET based Write in C# or VB.NETWrite in C# or VB.NET Use familiar class librariesUse familiar class libraries
Rich state-of-the-art GUIRich state-of-the-art GUI Vector basedVector based All types of content handled uniformlyAll types of content handled uniformly
Secure - sandboxedSecure - sandboxed
Silverlight - NegativesSilverlight - Negatives
Not quite here yetNot quite here yet ““Pig in a poke”Pig in a poke”
Sandboxing limits functionalitySandboxing limits functionality
Conflicting products within Microsoft?Conflicting products within Microsoft?
Demo: Silverlight Airlines Demo: Silverlight Airlines
Demo: MS Download Center Demo: MS Download Center
Demo: 3Demo: 3rdrd Party Control Vendor Party Control Vendor
Silverlight 2.0 Features:Silverlight 2.0 Features:
Won’t know details until March 2008Won’t know details until March 2008
Controls:Controls:
Data:Data:
Communications:Communications:
Silverlight 2.0 Features:Silverlight 2.0 Features:
Controls:Controls: Extensible control base classesExtensible control base classes Common controls:Common controls:
Textbox, Checkbox, Radiobutton, etc Textbox, Checkbox, Radiobutton, etc
TabControl, Slider, ScrollViewer, ProgressBar, etcTabControl, Slider, ScrollViewer, ProgressBar, etc Layout controls:Layout controls:
Grid, StackPanelGrid, StackPanel Data controls:Data controls:
DataGrid, etcDataGrid, etc
Silverlight 2.0 Features:Silverlight 2.0 Features:
Data:Data: 2-way data binding2-way data binding More LINQ support: LINQ to XMLMore LINQ support: LINQ to XML
Silverlight 2.0 Features:Silverlight 2.0 Features:
Communications:Communications: REST, POX, RSS, and WS-* communicationREST, POX, RSS, and WS-* communication Cross domain network accessCross domain network access SocketsSockets
Feature Unknowns (?)Feature Unknowns (?)
Local client integration?Local client integration? Read and write local files?Read and write local files? Read local mic and webcam?Read local mic and webcam?
WCF?WCF?
Depth of class libraries?Depth of class libraries? Pay-for-playPay-for-play
SilverlightSilverlightDevelopmentDevelopmentWalk-throughWalk-through
Silverlight ToolsSilverlight Tools
Expression Expression BlendBlend:: GUI builderGUI builder Graphic designersGraphic designers
Visual Studio 2008:Visual Studio 2008: Includes a more limited GUI builderIncludes a more limited GUI builder ProgrammersProgrammers