Top Banner
Discover, Master, Influence Slide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify
23

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

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence Slide 1

Introducing SilverlightPaul Stovell

Alpha Ape, Lead Code Monkey, Readify

Page 2: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence Slide 2

Page 3: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Was that a flash?

Slide 3

Page 4: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

No, it was just a silver light...

Slide 4

Page 5: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Should WPF be gold heavy?

Slide 5

Page 6: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 7: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 8: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 9: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

What is Silverlight?

Synergy versus Compatibility

Slide 9

Page 10: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Developing with Silverlight 2.0

(beta 2)

Slide 10

Page 11: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Developing with Silverlight

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

Slide 11

Page 12: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 13: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 14: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 15: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Developing with Silverlight

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

Animation – what’s different?• Nothing

Slide 15

Page 16: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 17: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 18: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 19: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Developing with Silverlight

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

Slide 19

Page 20: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 21: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence

Developing with Silverlight

Extra services• Deep Zoom• Live Silverlight Streaming services

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

Slide 21

Page 22: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

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

Page 23: Discover, Master, InfluenceSlide 1 Introducing Silverlight Paul Stovell Alpha Ape, Lead Code Monkey, Readify.

Discover, Master, Influence Slide 23

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

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