Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey,...

23
Discover, Master, Influence Slide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    218
  • download

    0

Transcript of Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey,...

Discover, Master, Influence Slide 1

Introducing SilverlightPaul Stovell

Alpha Ape, Lead Code Monkey, Readify

Discover, Master, Influence Slide 2

Discover, Master, Influence

Was that a flash?

Slide 3

Discover, Master, Influence

No, it was just a silver light...

Slide 4

Discover, Master, Influence

Should WPF be gold heavy?

Slide 5

Discover, Master, Influence

What is Silverlight?

Silverlight is WPF!• With less features• Lives in your web browser• Cross platform• Cross browser• Has a nice installer – it’s a 4 MB download

Slide 6

Discover, Master, Influence

What is Silverlight?

Two releases:• Silverlight 1.0– You still have to use JavaScript– Not as many features– Good for video

• Silverlight 2.0 (still in Beta 2)– You can use C# or VB.NET– You get lots of the .NET Framework– More features– Also does video

Slide 7

Discover, Master, Influence

What is Silverlight?

WPF XBAP’s vs. Silverlight• XBAPs are WPF applications

– That live in a browser– That are sandboxed– That can do anything WPF can do– That require the full .NET Framework– That aren’t cross-platform, and only work in IE and Firefox

• Silverlight– Also lives in a browser

• But can interact with the HTML– Also has a sandbox– Doesn’t have access to the full .NET Framework– Has a much larger marketing team

Slide 8

Discover, Master, Influence

What is Silverlight?

Synergy versus Compatibility

Slide 9

Discover, Master, Influence

Developing with Silverlight 2.0

(beta 2)

Slide 10

Discover, Master, Influence

Developing with Silverlight

Agenda:• Layout• Styles and resources• Animation• Video and media• Binding• Web Services• HTML Interop

Slide 11

Discover, Master, Influence

Developing with Silverlight

Getting started - prerequisites1. Install the Silverlight Tools for Visual Studio 2008

(silverlight_chainer.exe – 84 MB)2. Install Blend (2.5, June preview – 33 MB)

Slide 12

Discover, Master, Influence

Developing with Silverlight

Layout – what’s the same?• Panels: Grid, Canvas, StackPanel• Margins• Width, Height, Min/Max

Layout – what’s different?• Missing UniformGrid, DockPanel and WrapPanel

Slide 13

Discover, Master, Influence

Developing with Silverlight

Styles and Resources – what’s the same?• Styles, templates, App.xaml

Styles and Resources – what’s different?• No event, property or data triggers• Invented “states” instead• Resources can’t be merged into App.xaml• No style inheritance (BasedOn=)• “Write-once”

Slide 14

Discover, Master, Influence

Developing with Silverlight

Animation– what’s the same?• Grid, Canvas

Animation – what’s different?• Nothing

Slide 15

Discover, Master, Influence

Developing with Silverlight

Video and media – what’s the same?• Most primitives (brushes, pens, etc. same)• <MediaElement /> element for embedding video

Video and media – what’s different?• No DrawingBrush or VisualBrush• No BitmapEffects (blur, drop shadow, etc.)• No layout transform

Slide 16

Discover, Master, Influence

Developing with Silverlight

Binding – what’s the same?• Binding extension• DataContext• DataTemplates (though TargetType not supported)

Binding – what’s different?• No data triggers• No IDataErrorInfo• No element binding• No type descriptors

Slide 17

Discover, Master, Influence

Developing with Silverlight

Web Services• HttpWebRequest/WCF clients – HTTP and HTTPS only

– Cross-domain calls allowed via CrossDomain.xml– Add Service Reference

• Sockets– TCP stream sockets only– Cross domain in beta 2

Slide 18

Discover, Master, Influence

Developing with Silverlight

HTML Interop• System.Windows.Browser• HtmlPage.Document.GetElementById(...)• HtmlPage.RegisterScriptableObject(...)• [ScriptableMember]

Slide 19

Discover, Master, Influence

Developing with Silverlight

Sandbox considerations• Policy-based cross-domain calls (crossdomain.xml)• File I/O limited to isolated storage and

OpenFileDialog• No private reflection• No native method calls• No full-trust option

Slide 20

Discover, Master, Influence

Developing with Silverlight

Extra services• Deep Zoom• Live Silverlight Streaming services

http://dev.live.com/silverlight/

Slide 21

Discover, Master, Influence

Summary

Silverlight:– Lets you write .NET code in the browser– Lets you write .NET code in the browser– Lets you build richer user experiences than possible

in HTML– Aims for synergy, not binary compatibility– Has a way cooler icon than WPF

Remains to be seen: Will it reach Flash adoption levels?

Slide 22

Discover, Master, Influence Slide 23

A Readify Developer Network sessionBy Paul Stovell, Senior Developer, Readify

Email Address: [email protected] Website: www.readify.net/rdn