SlideShare a Scribd company logo
1 of 39
Clint Edmonson Architect Evangelist Microsoft Email:    clinted@microsoft.com Web:     http://www.notsotrivial.net Twitter: @clinted JumpStart: Silverlight
Agenda What is Silverlight? Anatomy of a Silverlight Application XAML Primer Control Libraries Data Binding Development Tools Advanced Features Designer + Developer Experience
What is Silverlight?
Silverlight Experience Rich Internet Applications Cross platform,     cross-browser,     cross device     plug-in Fast, seamless installation Vector based layout and animation engine Productive design & development environments
Refactored subset of .NET & WPF
Development Tools
Development Tools XamlPad XamlPadX Kaxaml Silverlight Spy Expression Blend See my and Denny’s sessions later today for more! Visual Studio 2008 + Silverlight SDK
Anatomy of a Silverlight Application
Silverlight works with any server Only requirement is to serve up XAML, assemblies etc. Leverage JavaScript to improve experience ASP.NET AJAX adds further integration to the experience <asp:xaml> <asp:media> More coming… Silverlight Component (XAML, .NET) AJAX Control (Script) ASP.NET AJAX Server Control Silverlight on the Server
Silverlight Architecture .NET for Silverlight Server Data WPF for Silverlight Inputs Media LINQ LINQ-to-XML Extensible Controls Keyboard WMV / VC1 Web Services ASP.NET AJAX Mouse WMA REST RSS SOAP BCL Dynamic Languages POX JSON Ink MP3 <asp:xaml> Ruby Python Generics Collections <asp:media> Silverlight Common Language Runtime XAML UI Core Controls DRM 2D Vectors Images Layout Media Animation Transforms Editing Text Presentation Core Integrated Networking Stack DOM Integration JavaScript Engine Installer Browser Host
XAML Primer
XAML C# VB.NET <Button Width="100"> OK   <Button.Background> LightBlue   </Button.Background> </Button> Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; Dim b1 As New Button b1.Content = "OK" b1.Background = New _SolidColorBrush(Colors.LightBlue) b1.Width = 100 Declarative Programming Through XAML Extensible Application Markup Language ,[object Object]
Code and content are separate
Compatible with Windows Presentation Foundation,[object Object]
Controls 60 Native Controls Open Source Toolkit Rich third party ecosystem for domain specific controls  Canvas, Grid, & StackPanel will become your new best friends
Data Binding
Databinding	 Two way data binding from User interface to business objects  Notification via INotifyPropertyChanged DataContext is inherited via Visual Tree From XAML  	<TextBlockText="{Binding Nasdaq.Points, Mode=OneWay}"/> From code  Binding binding = new Binding("Nasdaq.Points"); binding.Mode = BindingMode.OneWay; TextBlocktb = new TextBlock(); tb.SetBinding(TextBlock.TextProperty, binding);
Data Templates DataTemplate class Car {   string Image {get;set}   string Model {get;set] } <DataTemplate x:Key="carTemplate">   <Border BorderBrush="Blue" BorderThickness="2" Background="LightGray"           Margin="10" Padding="15,15,15,5">     <StackPanel>       <Image HorizontalAlignment="Center" Source="{Binding Path=Image}" />       <Border HorizontalAlignment="Center" BorderBrush="Navy"               Background="#DDF“ BorderThickness="1" Margin="10" Padding="3">         <TextBlockFontSize="18" TextContent="{Binding Path=Model}" />       </Border>     </StackPanel>   </Border> </DataTemplate>
Advanced Features
Flexible User Experience Options Seamless installation & auto-update Change download progress look & feel Full screen mode Out of Browser Experience Start menu & desktop shortcuts Internet connection detection
Styling Resource definition templates to define look & feel
Templating  Replace the ‘parts’ that define the look of a control to create a completely different look, but behavior is the same.
Isolated Storage Stream based access to a private file/directory structure Patterned after .NET Framework IsolatedStorage classes Read and write string or binary data Store is per application XAP Application code to request size increase User prompt to accept quota increase Quotas fall into predetermined size slots Code must initiate increase size call from within user input/event
OpenFileDialog, SaveFileDialog Provides native OS experience Sandboxed API returns safe filename and readable stream Support for multiple files
HTML/AJAX and .NET integration webpage HTML Silverlight .NET language Javascript webpage HTML HTML  + Silverlight
Access the HTML DOM from Managed Code HTML access available in new namespace   usingSystem.Windows.Browser; Static HtmlPage class provides entry point  HtmlPage.Navigate("http://www.microsoft.com"); String server = HtmlPage.DocumentUri.Host; Hookup events, call methods, or access properties HtmlElementmyButton = HtmlPage.Document.GetElementByID("myButtonID"); myButton.AttachEvent("onclick", new EventHandler(this.myButtonClicked)); privatevoidmyButtonClicked(object sender, EventArgs e)   { ... }
Access Managed Code from JavaScript 1.- Mark a property, method or event as [Scriptable] [ScriptableMember] publicvoidSearch(stringName) { ... } 2.- Register a scriptable object HtmlPage.RegisterScriptableObject ("EntryPoint", this); 3.- Access the managed object from script var control = document.getElementById("SilverlightControl"); control.Content.EntryPoint.Search(input.value);
Streaming Media Experience Cost effective, high quality video for all major browsers Based on WMA and WMV ecosystem Media processing tools provided for live and on-demand publishing Supports HD video encoding Scales gracefully to lower end hardware Digital Rights Management support
DeepZoom Navigates images of any size and resolution optimizing network bandwidth and download size.  Seamless transitions as you zoom and pan.
Easy Line of Business Apps Cost effective, high quality video for all major browsers Navigation Framework RIA Data Services
Designer + DeveloperExperience
Designer/Developer Collaboration =
Tooling Desktop Server, Services Server                           Win7 Media & RIA XAML Designer Look, behavior, brand,and emotional connection Developer Function, deployment, data,security, operational integrity
Next Steps… Community Site: http://silverlight.net Main Product Site: http://www.microsoft.com/silverlight MSDN Center: http://msdn.microsoft.com/silverlight Online Forums: http://silverlight.net/forums Online SDK: http://msdn2.microsoft.com/bb188266.aspx Top Silverlight Blogs Tim Sneath: http://blogs.msdn.com/tims Mike Harsh: http://blogs.msdn.com/mharsh Joe Stegman: http://blogs.msdn.com/jstegman Laurence Moroney: http://blogs.msdn.com/webnext Ernie Booth: http://blogs.msdn.com/ebooth Follow @MSExpression on Twitter
Clint Edmonson Architect Evangelist Microsoft Email:    clinted@microsoft.com Web:     http://www.notsotrivial.net Twitter: @clinted Thank you!
Networking
Networking  Asynchronous HTTP requests GET/POST  Access to most headers, cookies,  Uses browser networking stack  Caching, authentication, proxy  , compression
Web Services SOAP 1.1  Basic profile A few restrictions (e.g. SOAP Faults not supported) Asynchronous invocation Follows cross-domain policy restrictions Generated proxies support data binding

More Related Content

What's hot

Introduction To ASP.Net MVC
Introduction To ASP.Net MVCIntroduction To ASP.Net MVC
Introduction To ASP.Net MVC
Joe Wilson
 

What's hot (20)

Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003
 
Designer & Developer Work Flow for Flex Builder
Designer & Developer Work Flow for Flex BuilderDesigner & Developer Work Flow for Flex Builder
Designer & Developer Work Flow for Flex Builder
 
Create Nokia WRT Widget App
Create Nokia WRT Widget AppCreate Nokia WRT Widget App
Create Nokia WRT Widget App
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
Introduction To ASP.Net MVC
Introduction To ASP.Net MVCIntroduction To ASP.Net MVC
Introduction To ASP.Net MVC
 
Best Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and TricksBest Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and Tricks
 
How to implement sso using o auth in golang application
How to implement sso using o auth in golang applicationHow to implement sso using o auth in golang application
How to implement sso using o auth in golang application
 
Mobile web apps in pure Java
Mobile web apps in pure JavaMobile web apps in pure Java
Mobile web apps in pure Java
 
Intro to asp.net mvc 4 with visual studio
Intro to asp.net mvc 4 with visual studioIntro to asp.net mvc 4 with visual studio
Intro to asp.net mvc 4 with visual studio
 
Ajax
AjaxAjax
Ajax
 
Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...
Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...
Mobile app development using PhoneGap - A comprehensive walkthrough - Touch T...
 
Portfolio
PortfolioPortfolio
Portfolio
 
Html5 Future of WEB
Html5 Future of WEBHtml5 Future of WEB
Html5 Future of WEB
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
Vaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionVaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 edition
 

Similar to DODN2009 - Jump Start Silverlight

Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and Silverlight
Glen Gordon
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
Thomas Conté
 
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
NH .Net Code Camp 2010 - An Introduction to Silverlight DevelopmentNH .Net Code Camp 2010 - An Introduction to Silverlight Development
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
John Garland
 

Similar to DODN2009 - Jump Start Silverlight (20)

php
phpphp
php
 
MTaulty_DevWeek_Silverlight
MTaulty_DevWeek_SilverlightMTaulty_DevWeek_Silverlight
MTaulty_DevWeek_Silverlight
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4
 
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
Introdução ao Microsoft Silverlight 2.0 - Campus Party Brasil 2009
 
Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and Silverlight
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
 
Building a Twitter App with Silverlight 3 - Part 1
Building a Twitter App with Silverlight 3 - Part 1Building a Twitter App with Silverlight 3 - Part 1
Building a Twitter App with Silverlight 3 - Part 1
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
.NET Drop 4
.NET Drop 4.NET Drop 4
.NET Drop 4
 
Decoding the Web
Decoding the WebDecoding the Web
Decoding the Web
 
Daniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days OcDaniel Egan Msdn Tech Days Oc
Daniel Egan Msdn Tech Days Oc
 
XCS110_All_Slides.pdf
XCS110_All_Slides.pdfXCS110_All_Slides.pdf
XCS110_All_Slides.pdf
 
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
NH .Net Code Camp 2010 - An Introduction to Silverlight DevelopmentNH .Net Code Camp 2010 - An Introduction to Silverlight Development
NH .Net Code Camp 2010 - An Introduction to Silverlight Development
 
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
 
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
 
Flex In30 Mins
Flex In30 MinsFlex In30 Mins
Flex In30 Mins
 

More from Clint Edmonson

More from Clint Edmonson (20)

New Product Concept Design.pptx
New Product Concept Design.pptxNew Product Concept Design.pptx
New Product Concept Design.pptx
 
Lean & Agile Essentials
Lean & Agile EssentialsLean & Agile Essentials
Lean & Agile Essentials
 
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
 
Flow, the Universe and Everything
Flow, the Universe and EverythingFlow, the Universe and Everything
Flow, the Universe and Everything
 
Application architecture jumpstart
Application architecture jumpstartApplication architecture jumpstart
Application architecture jumpstart
 
Code smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software OdorsCode smells and Other Malodorous Software Odors
Code smells and Other Malodorous Software Odors
 
State of agile 2016
State of agile 2016State of agile 2016
State of agile 2016
 
Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015Lean & Agile DevOps with VSTS and TFS 2015
Lean & Agile DevOps with VSTS and TFS 2015
 
Application Architecture Jumpstart
Application Architecture JumpstartApplication Architecture Jumpstart
Application Architecture Jumpstart
 
Agile Metrics That Matter
Agile Metrics That MatterAgile Metrics That Matter
Agile Metrics That Matter
 
Advanced oop laws, principles, idioms
Advanced oop laws, principles, idiomsAdvanced oop laws, principles, idioms
Advanced oop laws, principles, idioms
 
Application architecture jumpstart
Application architecture jumpstartApplication architecture jumpstart
Application architecture jumpstart
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Windows 8 - The JavaScript Story
Windows 8 - The JavaScript StoryWindows 8 - The JavaScript Story
Windows 8 - The JavaScript Story
 
Windows Azure Jumpstart
Windows Azure JumpstartWindows Azure Jumpstart
Windows Azure Jumpstart
 
Introduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual MachinesIntroduction to Windows Azure Virtual Machines
Introduction to Windows Azure Virtual Machines
 
Peering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to MasterPeering through the Clouds - Cloud Architectures You Need to Master
Peering through the Clouds - Cloud Architectures You Need to Master
 
Architecting Scalable Applications in the Cloud
Architecting Scalable Applications in the CloudArchitecting Scalable Applications in the Cloud
Architecting Scalable Applications in the Cloud
 
Windows Azure jumpstart
Windows Azure jumpstartWindows Azure jumpstart
Windows Azure jumpstart
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

DODN2009 - Jump Start Silverlight

  • 1. Clint Edmonson Architect Evangelist Microsoft Email: clinted@microsoft.com Web: http://www.notsotrivial.net Twitter: @clinted JumpStart: Silverlight
  • 2.
  • 3. Agenda What is Silverlight? Anatomy of a Silverlight Application XAML Primer Control Libraries Data Binding Development Tools Advanced Features Designer + Developer Experience
  • 5. Silverlight Experience Rich Internet Applications Cross platform, cross-browser, cross device plug-in Fast, seamless installation Vector based layout and animation engine Productive design & development environments
  • 6. Refactored subset of .NET & WPF
  • 8. Development Tools XamlPad XamlPadX Kaxaml Silverlight Spy Expression Blend See my and Denny’s sessions later today for more! Visual Studio 2008 + Silverlight SDK
  • 9. Anatomy of a Silverlight Application
  • 10. Silverlight works with any server Only requirement is to serve up XAML, assemblies etc. Leverage JavaScript to improve experience ASP.NET AJAX adds further integration to the experience <asp:xaml> <asp:media> More coming… Silverlight Component (XAML, .NET) AJAX Control (Script) ASP.NET AJAX Server Control Silverlight on the Server
  • 11. Silverlight Architecture .NET for Silverlight Server Data WPF for Silverlight Inputs Media LINQ LINQ-to-XML Extensible Controls Keyboard WMV / VC1 Web Services ASP.NET AJAX Mouse WMA REST RSS SOAP BCL Dynamic Languages POX JSON Ink MP3 <asp:xaml> Ruby Python Generics Collections <asp:media> Silverlight Common Language Runtime XAML UI Core Controls DRM 2D Vectors Images Layout Media Animation Transforms Editing Text Presentation Core Integrated Networking Stack DOM Integration JavaScript Engine Installer Browser Host
  • 13.
  • 14. Code and content are separate
  • 15.
  • 16. Controls 60 Native Controls Open Source Toolkit Rich third party ecosystem for domain specific controls Canvas, Grid, & StackPanel will become your new best friends
  • 18. Databinding Two way data binding from User interface to business objects Notification via INotifyPropertyChanged DataContext is inherited via Visual Tree From XAML <TextBlockText="{Binding Nasdaq.Points, Mode=OneWay}"/> From code Binding binding = new Binding("Nasdaq.Points"); binding.Mode = BindingMode.OneWay; TextBlocktb = new TextBlock(); tb.SetBinding(TextBlock.TextProperty, binding);
  • 19. Data Templates DataTemplate class Car { string Image {get;set} string Model {get;set] } <DataTemplate x:Key="carTemplate"> <Border BorderBrush="Blue" BorderThickness="2" Background="LightGray" Margin="10" Padding="15,15,15,5"> <StackPanel> <Image HorizontalAlignment="Center" Source="{Binding Path=Image}" /> <Border HorizontalAlignment="Center" BorderBrush="Navy" Background="#DDF“ BorderThickness="1" Margin="10" Padding="3"> <TextBlockFontSize="18" TextContent="{Binding Path=Model}" /> </Border> </StackPanel> </Border> </DataTemplate>
  • 21. Flexible User Experience Options Seamless installation & auto-update Change download progress look & feel Full screen mode Out of Browser Experience Start menu & desktop shortcuts Internet connection detection
  • 22. Styling Resource definition templates to define look & feel
  • 23. Templating Replace the ‘parts’ that define the look of a control to create a completely different look, but behavior is the same.
  • 24. Isolated Storage Stream based access to a private file/directory structure Patterned after .NET Framework IsolatedStorage classes Read and write string or binary data Store is per application XAP Application code to request size increase User prompt to accept quota increase Quotas fall into predetermined size slots Code must initiate increase size call from within user input/event
  • 25. OpenFileDialog, SaveFileDialog Provides native OS experience Sandboxed API returns safe filename and readable stream Support for multiple files
  • 26. HTML/AJAX and .NET integration webpage HTML Silverlight .NET language Javascript webpage HTML HTML + Silverlight
  • 27. Access the HTML DOM from Managed Code HTML access available in new namespace usingSystem.Windows.Browser; Static HtmlPage class provides entry point HtmlPage.Navigate("http://www.microsoft.com"); String server = HtmlPage.DocumentUri.Host; Hookup events, call methods, or access properties HtmlElementmyButton = HtmlPage.Document.GetElementByID("myButtonID"); myButton.AttachEvent("onclick", new EventHandler(this.myButtonClicked)); privatevoidmyButtonClicked(object sender, EventArgs e) { ... }
  • 28. Access Managed Code from JavaScript 1.- Mark a property, method or event as [Scriptable] [ScriptableMember] publicvoidSearch(stringName) { ... } 2.- Register a scriptable object HtmlPage.RegisterScriptableObject ("EntryPoint", this); 3.- Access the managed object from script var control = document.getElementById("SilverlightControl"); control.Content.EntryPoint.Search(input.value);
  • 29. Streaming Media Experience Cost effective, high quality video for all major browsers Based on WMA and WMV ecosystem Media processing tools provided for live and on-demand publishing Supports HD video encoding Scales gracefully to lower end hardware Digital Rights Management support
  • 30. DeepZoom Navigates images of any size and resolution optimizing network bandwidth and download size. Seamless transitions as you zoom and pan.
  • 31. Easy Line of Business Apps Cost effective, high quality video for all major browsers Navigation Framework RIA Data Services
  • 34. Tooling Desktop Server, Services Server Win7 Media & RIA XAML Designer Look, behavior, brand,and emotional connection Developer Function, deployment, data,security, operational integrity
  • 35. Next Steps… Community Site: http://silverlight.net Main Product Site: http://www.microsoft.com/silverlight MSDN Center: http://msdn.microsoft.com/silverlight Online Forums: http://silverlight.net/forums Online SDK: http://msdn2.microsoft.com/bb188266.aspx Top Silverlight Blogs Tim Sneath: http://blogs.msdn.com/tims Mike Harsh: http://blogs.msdn.com/mharsh Joe Stegman: http://blogs.msdn.com/jstegman Laurence Moroney: http://blogs.msdn.com/webnext Ernie Booth: http://blogs.msdn.com/ebooth Follow @MSExpression on Twitter
  • 36. Clint Edmonson Architect Evangelist Microsoft Email: clinted@microsoft.com Web: http://www.notsotrivial.net Twitter: @clinted Thank you!
  • 38. Networking Asynchronous HTTP requests GET/POST Access to most headers, cookies, Uses browser networking stack Caching, authentication, proxy , compression
  • 39. Web Services SOAP 1.1 Basic profile A few restrictions (e.g. SOAP Faults not supported) Asynchronous invocation Follows cross-domain policy restrictions Generated proxies support data binding
  • 40. Sockets TCP only Asynchronous API No explicit bind and no listen/accept support Restricted ports (4502-4534) Cross Domain based on provisioning server void Connect(AddressFamily family) { SocketAsyncEventArgsconnectArgs = new SocketAsyncEventArgs(); connectArgs.RemoteEndPoint = new DnsEndPoint( Application.Current.Host.Source.Host, 4502); connectArgs.Completed += new EventHandler<SocketAsyncEventArgs>(OnConnectCompleted); socket = new Socket(family, SocketType.Stream, ProtocolType.Tcp); if (!socket.ConnectAsync(connectArgs)) OnConnectCompleted(socket, connectArgs); }
  • 41. Cross-domain support <?xmlversion="1.0"?> <!DOCTYPEcross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-fromdomain="*" /> </cross-domain-policy> 2 formats: Flash policy file Silverlight policy file Cross-domain.xml <?xmlversion="1.0"?> <access-policy> <cross-domain-access> <policy> <allow-from> <domainuri="http://customers.shop.com”/>" <domainuri="http://partner.com/app.xap"/> </allow-from> <grant-to> <grantpath="/sales/serialnumbers.xml" /> <grantpath="/partners"include-subpaths="false"/> </grant-to> </policy> </cross-domain-access> </access-policy> clientaccesspolicy.xml

Editor's Notes

  1. Set context!!!! We will briefly discuss what is silverlight.. Why you should care and why we are excited about the benefitsSilverlight provided to <vertical> like you. We will focus a lot on the HOW !!! We will walk through features and hopefully give you a good overview of the technology and the platform inside Silverlight.
  2. .NET for Silverlight is a factored subset of full .NETDesktop ~50 MB (Windows only)Silverlight + .NET Alpha ~ 4 MB (cross platform)How do we get it so small ?? Discuss a few of these as examples, don’t get too caught up on any On UI side: no Windows Forms, No 3D, No FlowLayout, etc. No workflow, no asp .net Web services server-side functionality… No ADO .NET ( but you get LINQ) Significant refactoring, e.g. File IO might not have all the overloads, but still way to get the job done.. Additional pieces of .NET available in a pay-for-play model…Same core development FrameworkThe shared apis & technologies are the same The tools are the sameHighly compatibleMinimal changes needed to move from Silverlight to DesktopHowever, not binary compatible by default
  3. The usual suspectsCanvas, Panel, StackPanel, Grid Button, Calendar, Checkbox, Datagrid, DateTimePicker, GridSplitter, HyperLink, ListBox, Popup, Radio, Slider, Toggle, Tooltip,
  4. DataTemplate is one of my favorite features.. Because it really showcases how Silverlight was built with data in mind from the ground up.. With a data template I can create a mapping between a specified CLR type or XML Xpath to some visuals…
  5. Other interesting HTML integration scenarios:Persistent linksFwd/Back Integration
  6. Simple type marshalling only in the AlphaComplex type support on the way
  7. We saw how the platform is helping address this but a full solution requires role-specific tooling.
  8. Web Client is used for downloading streams and strings We HttpWebRequest has more control over HTTP GET & POST headers ….The headers we don’t let you change are the same headers the browser does not let you override..