Introduction to Silverlight BiTWISE June 24, 2011
About Angela Ward Independent consultant since mid-90s on Microsoft platforms OODB, WinForms, XML, .NET Business Analyst, QA Test Lead
Presentation Overview What is Silverlight? How does it relate to other client-side technologies? How important is it? Silverlight app development walk-through
What is Silverlight? One word definition: Flash Browser plug-in: cross-browser, cross-platform Use case today: Animated ads, Video Use case tomorrow: Applications (Flex) Benefits: Adds functionality + write-once-run-everywhere Why Silverlight not Flash? More words: Flash + .NET More words: WPF-subset + .NET-subset
This is a big deal Once-every-20-years event Existing client-side web technology has reached the peak of its life-cycle Fresh start of a new client GUI technology Web is where the action is The network is the computer
Comparing client platforms HTML / CSS / JavaScript / AJAX Desktop: Win16 Win32 WinForms WPF Silverlight Flash / Flex Web:
Competing technologies Desktop based “smart clients” WPF on high end 3D, Hardware acceleration WinForms: (Mature, proven) Web-based: ASP.NET - HTML + CSS ASP.NET - HTML + CSS + AJAX Adobe Flash / Flex Desktop-web hybrid (?): Adobe AIR
Demo – Yahoo Finance Charts
Demo – Picnik.com Photo Editor
Feature Details
WPF / Silverlight – Positives: Vector based vs. pixel based Scalable – Looks good at multiple resolutions XAML – Similar to HTML Declarative Designers and programmers work in parallel Rich customization is possible in a well-designed way
WPF - Negatives Windows only Requires 50 / 200 MB .NET 3.x runtime Steep learning curve
Early Versions of Silverlight 1.0 RTM in Sept. 2007 Code behind – JavaScript only 1.1 / 2.0 Alpha introduced in Spring 2007. Beta at MIX08 in March 2008. RTM maybe Q3-2008. Code behind - .NET languages C#, etc. Partial .NET class library
Silverlight - Positives Lightweight at 4-6 MB, quick download .NET based Write in C# or VB.NET Use familiar class libraries Rich state-of-the-art GUI Vector based All types of content handled uniformly Secure - sandboxed
Silverlight - Negatives Not quite here yet “ Pig in a poke” Sandboxing limits functionality Conflicting products within Microsoft?
Demo: Silverlight Airlines
Demo: MS Download Center
Demo: 3 rd  Party Control Vendor
Silverlight 5.0 Features: Won’t know details until August 2011 Controls: Data: Communications:
Silverlight 2.0 Features: Controls: Extensible control base classes Common controls: Textbox, Checkbox, Radiobutton, etc  TabControl, Slider, ScrollViewer, ProgressBar, etc Layout controls: Grid, StackPanel Data controls: DataGrid, etc
Silverlight 2.0 Features: Data: 2-way data binding More LINQ support: LINQ to XML
Silverlight 2.0 Features: Communications: REST, POX, RSS, and WS-* communication Cross domain network access Sockets
Feature Unknowns (?) Local client integration? Read and write local files? Read local mic and webcam? WCF? Depth of class libraries? Pay-for-play
Silverlight Development Walk-through
Silverlight Tools Expression  Blend : GUI builder Graphic designers Visual Studio 2008/2010: Includes a more limited GUI builder Programmers

Silverlight

  • 1.
    Introduction to SilverlightBiTWISE June 24, 2011
  • 2.
    About Angela WardIndependent consultant since mid-90s on Microsoft platforms OODB, WinForms, XML, .NET Business Analyst, QA Test Lead
  • 3.
    Presentation Overview Whatis Silverlight? How does it relate to other client-side technologies? How important is it? Silverlight app development walk-through
  • 4.
    What is Silverlight?One word definition: Flash Browser plug-in: cross-browser, cross-platform Use case today: Animated ads, Video Use case tomorrow: Applications (Flex) Benefits: Adds functionality + write-once-run-everywhere Why Silverlight not Flash? More words: Flash + .NET More words: WPF-subset + .NET-subset
  • 5.
    This is abig deal Once-every-20-years event Existing client-side web technology has reached the peak of its life-cycle Fresh start of a new client GUI technology Web is where the action is The network is the computer
  • 6.
    Comparing client platformsHTML / CSS / JavaScript / AJAX Desktop: Win16 Win32 WinForms WPF Silverlight Flash / Flex Web:
  • 7.
    Competing technologies Desktopbased “smart clients” WPF on high end 3D, Hardware acceleration WinForms: (Mature, proven) Web-based: ASP.NET - HTML + CSS ASP.NET - HTML + CSS + AJAX Adobe Flash / Flex Desktop-web hybrid (?): Adobe AIR
  • 8.
    Demo – YahooFinance Charts
  • 9.
  • 10.
  • 11.
    WPF / Silverlight– Positives: Vector based vs. pixel based Scalable – Looks good at multiple resolutions XAML – Similar to HTML Declarative Designers and programmers work in parallel Rich customization is possible in a well-designed way
  • 12.
    WPF - NegativesWindows only Requires 50 / 200 MB .NET 3.x runtime Steep learning curve
  • 13.
    Early Versions ofSilverlight 1.0 RTM in Sept. 2007 Code behind – JavaScript only 1.1 / 2.0 Alpha introduced in Spring 2007. Beta at MIX08 in March 2008. RTM maybe Q3-2008. Code behind - .NET languages C#, etc. Partial .NET class library
  • 14.
    Silverlight - PositivesLightweight at 4-6 MB, quick download .NET based Write in C# or VB.NET Use familiar class libraries Rich state-of-the-art GUI Vector based All types of content handled uniformly Secure - sandboxed
  • 15.
    Silverlight - NegativesNot quite here yet “ Pig in a poke” Sandboxing limits functionality Conflicting products within Microsoft?
  • 16.
  • 17.
  • 18.
    Demo: 3 rd Party Control Vendor
  • 19.
    Silverlight 5.0 Features:Won’t know details until August 2011 Controls: Data: Communications:
  • 20.
    Silverlight 2.0 Features:Controls: Extensible control base classes Common controls: Textbox, Checkbox, Radiobutton, etc TabControl, Slider, ScrollViewer, ProgressBar, etc Layout controls: Grid, StackPanel Data controls: DataGrid, etc
  • 21.
    Silverlight 2.0 Features:Data: 2-way data binding More LINQ support: LINQ to XML
  • 22.
    Silverlight 2.0 Features:Communications: REST, POX, RSS, and WS-* communication Cross domain network access Sockets
  • 23.
    Feature Unknowns (?)Local client integration? Read and write local files? Read local mic and webcam? WCF? Depth of class libraries? Pay-for-play
  • 24.
  • 25.
    Silverlight Tools Expression Blend : GUI builder Graphic designers Visual Studio 2008/2010: Includes a more limited GUI builder Programmers

Editor's Notes

  • #5 Flash: 8 million downloads per day (3 billion per year): Source: http://blogs.zdnet.com/Stewart/?p=691 YouTube and MSN Video (as of 2008-01) both use Flash video players and download the videos as *.FLV (Flash video) files.
  • #6 Similarities to the transition from character-mode DOS to the original 16-bit Windows.
  • #9 Yahoo Finance’s stock charting page has a beta version that uses Flash. Highly interactive. Nice animation. Pre-Flash version generates the charts on the server and downloads them as PNG files. Pre-Flash problems: Slow to update, wastes network bandwidth and server CPU cycles. http://finance.yahoo.com/charts/#chart1:symbol=adbe;range=my;compare=msft;indicator=split+dividend+volume;charttype=line;crosshair=on;logscale=off;source=undefined
  • #10 Picnik.com is an online photo-editor application implemented in Flash. The main pages are entirely Flash, no HTML. See: http://www.picnik.com/app
  • #12 Retained mode graphics system vs. WM_PAINT messages. Specify the shape of an object once and WPF/SL takes care of drawing it from then on. Move whole shape just by changing its origin coordinates. WPF gets hardware acceleration, SL does not. WPF and SL coordinates are floating point values not integers (Win32, WinForms, HTML): WPF coordinates are in double-precision floating point: http://msdn2.microsoft.com/en-us/library/ms742562.aspx SL coordinates are floating point like WPF, but in units of pixels not WPF’s DIPs: Nathan’s SL 1.0 book: p69.
  • #13 Full released .NET 3.5 redistributable is about 200MB (I test downloaded 2008-01). http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&displaylang=en Full released .NET 3.0 redistributable is about 50MB.
  • #14 V1.0 is only about 1.5MB in size on Windows. V1.1 alpha is about 4.5MB in size on Windows.
  • #17 Silverlight Airlines: v1.1 sample implemented with C# code-behind http://silverlight.net/samples/1.1/SilverlightAirlines/Run/default.html
  • #18 Beta interface to MS Download Center is done with Silverlight 1.0: http://www.microsoft.com/beta/downloads/Default.aspx
  • #19 Intersoft Solutions – Sirius control set for Silverlight http://sirius.intersoftpt.com/
  • #20 References: http://weblogs.asp.net/scottgu/archive/2007/11/29/net-web-product-roadmap-asp-net-silverlight-iis7.aspx Partial quote: “ WPF UI Framework : The current Silverlight Alpha release only includes basic controls support and a managed API for UI drawing.  The next public Silverlight preview will add support for the higher level features of the WPF UI framework.  These include: the extensible control framework model, layout manager support, two-way data-binding support, and control template and skinning support.  The WPF UI Framework features in Silverlight will be a compatible subset of the WPF UI Framework features in last week's .NET Framework 3.5 release. Rich Controls : Silverlight will deliver a rich set of controls that make building Rich Internet Applications much easier.  The next Silverlight preview release will add support for core form controls (textbox, checkbox, radiobutton, etc), built-in layout management controls (StackPanel, Grid, etc), common functionality controls (TabControl, Slider, ScrollViewer, ProgressBar, etc) and data manipulation controls (DataGrid, etc). Rich Networking Support : Silverlight will deliver rich networking support.  The next Silverlight preview release will add support for REST, POX, RSS, and WS* communication.  It will also add support for cross domain network access (so that Silverlight clients can access resources and data from any trusted source on the web). Rich Base Class Library Support : Silverlight will include a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc).  The next Silverlight preview release will also add built-in support for LINQ to XML and richer HTML DOM API integration.” http://blogs.msdn.com/tims/archive/2007/11/29/silverlight-1-1-is-now-silverlight-2-0.aspx#comments Partial quote: “ In the Silverlight 1.1 Alpha, the UI framework side was pretty limited. Although we had the likes of MediaElement, Path, TextBlock, etc., it was a small fraction of what WPF provides in this regard. We now have a extensible control framework, two-way data binding, templates, styles, all the standard controls (TextBox, ScrollBar, CheckBox, RadioButton etc.), multiple layout containers (Grid, StackPanel, Canvas). In short, if you're familiar with WPF today, you'll be right at home with Silverlight 2.0.”
  • #21 Most noticable thing missing from current SL 1.0 and 1.1: No pre-built controls! No mention of: TreeControl, Viewbox