Your SlideShare is downloading. ×
0
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

DODN2009 - Jump Start Silverlight

1,792

Published on

Session for beginners that covers the basics of Microsoft Silverlight for developers.

Session for beginners that covers the basics of Microsoft Silverlight for developers.

Published in: Technology, Business
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
1,792
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
40
Comments
1
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 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.
  • .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
  • The usual suspectsCanvas, Panel, StackPanel, Grid Button, Calendar, Checkbox, Datagrid, DateTimePicker, GridSplitter, HyperLink, ListBox, Popup, Radio, Slider, Toggle, Tooltip,
  • 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…
  • Other interesting HTML integration scenarios:Persistent linksFwd/Back Integration
  • Simple type marshalling only in the AlphaComplex type support on the way
  • We saw how the platform is helping address this but a full solution requires role-specific tooling.
  • 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..
  • Transcript

    • 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
    • 4. What is Silverlight?
    • 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
    • 7. Development Tools
    • 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
      &lt;asp:xaml&gt;
      &lt;asp:media&gt;
      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
      &lt;asp:xaml&gt;
      Ruby
      Python
      Generics
      Collections
      &lt;asp:media&gt;
      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
    • 12. XAML Primer
    • 13. XAML
      C#
      VB.NET
      &lt;Button Width=&quot;100&quot;&gt; OK
      &lt;Button.Background&gt;
      LightBlue
      &lt;/Button.Background&gt;
      &lt;/Button&gt;
      Button b1 = new Button();
      b1.Content = &quot;OK&quot;;
      b1.Background = new SolidColorBrush(Colors.LightBlue);
      b1.Width = 100;
      Dim b1 As New Button
      b1.Content = &quot;OK&quot;
      b1.Background = New _SolidColorBrush(Colors.LightBlue)
      b1.Width = 100
      Declarative Programming Through XAML
      Extensible Application Markup Language
      • Toolable, declarative markup
      • 14. Code and content are separate
      • 15. Compatible with Windows Presentation Foundation
    • Control Libraries
    • 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
    • 17. Data Binding
    • 18. Databinding
      Two way data binding from User interface to business objects
      Notification via INotifyPropertyChanged
      DataContext is inherited via Visual Tree
      From XAML
      &lt;TextBlockText=&quot;{Binding Nasdaq.Points, Mode=OneWay}&quot;/&gt;
      From code
      Binding binding = new Binding(&quot;Nasdaq.Points&quot;);
      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]
      }
      &lt;DataTemplate x:Key=&quot;carTemplate&quot;&gt;
      &lt;Border BorderBrush=&quot;Blue&quot; BorderThickness=&quot;2&quot; Background=&quot;LightGray&quot;
      Margin=&quot;10&quot; Padding=&quot;15,15,15,5&quot;&gt;
      &lt;StackPanel&gt;
      &lt;Image HorizontalAlignment=&quot;Center&quot; Source=&quot;{Binding Path=Image}&quot; /&gt;
      &lt;Border HorizontalAlignment=&quot;Center&quot; BorderBrush=&quot;Navy&quot;
      Background=&quot;#DDF“ BorderThickness=&quot;1&quot; Margin=&quot;10&quot; Padding=&quot;3&quot;&gt;
      &lt;TextBlockFontSize=&quot;18&quot; TextContent=&quot;{Binding Path=Model}&quot; /&gt;
      &lt;/Border&gt;
      &lt;/StackPanel&gt;
      &lt;/Border&gt;
      &lt;/DataTemplate&gt;
    • 20. Advanced Features
    • 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(&quot;http://www.microsoft.com&quot;);
      String server = HtmlPage.DocumentUri.Host;
      Hookup events, call methods, or access properties
      HtmlElementmyButton =
      HtmlPage.Document.GetElementByID(&quot;myButtonID&quot;);
      myButton.AttachEvent(&quot;onclick&quot;, 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 (&quot;EntryPoint&quot;, this);
      3.- Access the managed object from script
      var control = document.getElementById(&quot;SilverlightControl&quot;);
      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
    • 32. Designer + DeveloperExperience
    • 33. Designer/Developer Collaboration
      =
    • 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!
    • 37. Networking
    • 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&lt;SocketAsyncEventArgs&gt;(OnConnectCompleted);
      socket = new Socket(family, SocketType.Stream,
      ProtocolType.Tcp);
      if (!socket.ConnectAsync(connectArgs))
      OnConnectCompleted(socket, connectArgs);
      }
    • 41. Cross-domain support
      &lt;?xmlversion=&quot;1.0&quot;?&gt;
      &lt;!DOCTYPEcross-domain-policy SYSTEM
      &quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&quot;&gt;
      &lt;cross-domain-policy&gt;
      &lt;allow-access-fromdomain=&quot;*&quot; /&gt;
      &lt;/cross-domain-policy&gt;
      2 formats:
      Flash policy file
      Silverlight policy file
      Cross-domain.xml
      &lt;?xmlversion=&quot;1.0&quot;?&gt;
      &lt;access-policy&gt;
      &lt;cross-domain-access&gt;
      &lt;policy&gt;
      &lt;allow-from&gt;
      &lt;domainuri=&quot;http://customers.shop.com”/&gt;&quot;
      &lt;domainuri=&quot;http://partner.com/app.xap&quot;/&gt;
      &lt;/allow-from&gt;
      &lt;grant-to&gt;
      &lt;grantpath=&quot;/sales/serialnumbers.xml&quot; /&gt;
      &lt;grantpath=&quot;/partners&quot;include-subpaths=&quot;false&quot;/&gt;
      &lt;/grant-to&gt;
      &lt;/policy&gt;
      &lt;/cross-domain-access&gt;
      &lt;/access-policy&gt;
      clientaccesspolicy.xml

    ×