Silverlight Training


Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Silverlight Training

  1. 1. Microsoft .Net Framework 3.x
  2. 2. Agenda <ul><li>Introduction to .Net 3.0 (along with 3.5) </li></ul><ul><li>What's new in .Net 3.0 – A developer perspective </li></ul><ul><ul><li>Introduction to XAML </li></ul></ul><ul><li>The WPF, WCF, WF and Cardspace </li></ul><ul><li>Silverlight </li></ul><ul><li>Demos / Hands on </li></ul><ul><li>Questions and Answers </li></ul>
  3. 3. <ul><li>.Net 3.0: </li></ul><ul><ul><li>Net combines the power of the .NET Framework 2.0 with new technologies for building applications that have visually compelling user experiences, seamless communication across technology boundaries, and the ability to support a wide range of business processes. </li></ul></ul><ul><ul><li>NET Framework 3.0 is a superset of the .NET Framework, designed to expose the new functionality in Windows Vista® to the developer through managed classes. </li></ul></ul>Overview to .Net 3.0 Windows Vista (Longhorn) is tightly integrated with .net 3.0 framework. The Look and feel of Vista is enhanced using the WPF.
  4. 4. What's new in .Net 3.0 – A developer perspective <ul><li>Programming model for Windows </li></ul><ul><li>.NET Framework 3.0 consists of these basic components: </li></ul><ul><ul><li>.NET Framework 2.0 </li></ul></ul><ul><ul><li>Microsoft® Windows® Presentation Foundation (formerly Avalon) </li></ul></ul><ul><ul><li>Microsoft® Windows® Communication Foundation (formerly Indigo) </li></ul></ul><ul><ul><li>Microsoft® Windows® Workflow Foundation </li></ul></ul><ul><ul><li>Windows CardSpace® (formerly code named &quot;Infocard&quot;) </li></ul></ul>
  5. 5. XAML <ul><li>One great benefit of XAML is that it helps to separate design and development, which actually helps to improve collaboration and efficiency between designers and software developers. As the XAML markup for an application's UI remains separate from the remainder of application logic, a designer's exact layout can be saved in XAML and combined with the application without affecting the development process. </li></ul><ul><li>Easily toolable, declarative markup </li></ul><ul><li>Code and content are separate </li></ul><ul><li>Can be rendered in the browser / standalone application </li></ul><ul><li>XPS – XML Paper Specification. Microsoft has integrated XPS-based technologies into the 2007 Microsoft Office system and the Microsoft Windows Vista operating system, but XPS itself is platform independent, openly published, and available royalty-free. </li></ul>
  6. 6. XAML <Button Width=&quot;100&quot;> OK <Button.Background> LightBlue </Button.Background> </Button> XAML Button b1 = new Button(); b1.Content = &quot;OK&quot;; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = 100; C# Dim b1 As New Button b1.Content = &quot;OK&quot; b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100 VB.NET
  7. 7. Extensible Application Markup Language Introduction to XAML <ul><li>Microsoft Tools for Designers & Developers </li></ul><ul><li>Declarative Programming through XAML </li></ul><ul><li>Third Party Tools (e.g. Aurora by Mobiform, ZAM 3D by Electric Rain) </li></ul>Designers design <ul><ul><li>With XAML designers & developers can streamline their collaboration </li></ul></ul>Developers add business logic
  8. 8. Silverlight <ul><li>Silverlight is a new cross-browser, cross-platform implementation of the .NET Framework for building and delivering the next generation of media experiences and rich interactive applications (RIA) for the Web. Silverlight unifies the capabilities of the server, the Web, and the desktop, of managed code and dynamic languages, of declarative and traditional programming, and the power of Windows Presentation Foundation (WPF). </li></ul><ul><li>Silverlight enables following features: </li></ul><ul><li>It is a cross-browser, cross-platform technology. It runs in all popular Web browsers, including Microsoft Internet Explorer, Flock, Mozilla Firefox, Apple Safari, and Opera, and on Microsoft Windows and Apple Mac OS X. </li></ul><ul><li>It provides a consistent experience no matter where it runs. </li></ul><ul><li>It is supported by a very small download that installs in seconds. </li></ul><ul><li>It streams video and audio. It scales video quality to everything from mobile devices to desktop browser s . </li></ul><ul><li>It includes compelling graphics that users can manipulate—drag, turn, zoom—directly in the browser. </li></ul><ul><li>It reads data and updates the display, but it doesn't interrupt the user by refreshing the whole page. </li></ul>
  9. 9. <ul><li>Compelling Cross-Platform User Experiences </li></ul><ul><li>Immersive media experiences & RIA </li></ul><ul><li>Seamless, fast installation for end users </li></ul><ul><li>Consistent experiences on Mac / Windows </li></ul><ul><li>Flexible programming model with collaborative tools </li></ul><ul><li>Integration with Web technologies </li></ul><ul><li>Based on the .NET Framework </li></ul><ul><li>Role specific tools for designers / developers </li></ul><ul><li>Efficient, lower cost delivery, and more capable media </li></ul><ul><li>HD to Mobile w/ SMPTE VC-1 </li></ul><ul><li>Broad media ecosystem </li></ul><ul><li>Tools for live and on-demand publishing </li></ul>
  10. 11. <ul><li>Highly productive development framework </li></ul><ul><ul><li>Multi-language support </li></ul></ul><ul><ul><li>Latest developer innovations (e.g. LINQ) </li></ul></ul><ul><ul><li>AJAX integration </li></ul></ul><ul><li>Great tools </li></ul><ul><ul><li>Visual Studio </li></ul></ul><ul><ul><li>Expression Studio </li></ul></ul><ul><li>Cross-platform & cross-browser plugin </li></ul><ul><ul><li>Works with Safari, Firefox and Internet Explorer </li></ul></ul><ul><ul><li>Mac OS X and Windows </li></ul></ul><ul><ul><li>Any web server </li></ul></ul><ul><ul><li>Fast, easy install process </li></ul></ul>
  11. 12. <ul><li>2D Graphics </li></ul><ul><ul><li>Standard shapes, masking and clipping </li></ul></ul><ul><ul><li>Transformations: skew, rotate, scale, translate, matrix </li></ul></ul><ul><li>Animation Basics </li></ul><ul><ul><li>Animations change properties over time </li></ul></ul><ul><ul><li>Support linear, discrete and spline animation </li></ul></ul><ul><ul><li>Animatable property types: </li></ul></ul><ul><ul><ul><li>Double, Color, Point </li></ul></ul></ul><ul><li>Animations and graphics are defined using XAML </li></ul><ul><li>Media Features </li></ul><ul><ul><li>Video: WMV V7, V8, V9, VC-1 </li></ul></ul><ul><ul><li>Audio: WMA V7, V8, V9 (standard), MP3 </li></ul></ul><ul><ul><li>Multiple options for deploying media </li></ul></ul><ul><ul><ul><li>HTTP progressive download </li></ul></ul></ul><ul><ul><ul><li>Integration with Windows Media Server </li></ul></ul></ul><ul><ul><li>Extensive WMV ecosystem </li></ul></ul>
  12. 13. Silverlight JavaScript <ul><li>Silverlight XAML elements are scriptable via the browser script engine (JavaScript) </li></ul><ul><li>Scriptable objects are obtained via findName </li></ul><ul><ul><li>Scriptable objects (elements) can be controlled via properties and methods </li></ul></ul><ul><ul><li>Models JavaScript and HTML DOM interaction </li></ul></ul><ul><ul><li>findName is equivalent to document.getElementById() </li></ul></ul><ul><ul><li>Supports tree walking via children collection </li></ul></ul><ul><li>Position set using &quot;Canvas.Top&quot; and &quot;Canvas.Left&quot; </li></ul><ul><ul><li>Size can be scaled or set via Height/Width </li></ul></ul>
  13. 14. Silverlight <ul><li>How Silverlight offers features: </li></ul><ul><li>WPF and XAML . Silverlight includes Windows Presentation Foundation (WPF) technology, which greatly extends the elements in the browser for creating UI. WPF lets you create graphics, animation, media, and other rich client features, extending browser-based UI beyond what is available with HTML alone. Extensible Application Markup Language (XAML) provides a declarative m arkup syntax for creating WPF elements. </li></ul><ul><li>Extensions to JavaScript . Silverlight provides extensions to the universal browser scripting language that provide powerful control over the browser UI, including the ability to work with WPF elements. </li></ul><ul><li>Cross-browser, cross-platform support . Silverlight runs the same on all popular browsers (on any platform). You can design and develop your application without having to worry about which browser or platform your users have. </li></ul><ul><li>Integration with existing applications . Silverlight integrates seamlessly with existing JavaScript and ASP.NET AJAX code to complement functionality already created. </li></ul><ul><li>Access to the .NET Framework programming model and to associated tools . Silverlight-based applications may be created using dynamic languages such as Managed JScript and IronPython as well as languages such as C# and Visual Basic. D evelopment tools such as Visual Studio can be leveraged to create Silverlight-based applications. </li></ul>
  14. 15. Silverlight <ul><li>LINQ . Silverlight includes language-integrated query (LINQ), which enables data access using intuitive native syntax and strongly typed objects in .NET Framework languages. </li></ul><ul><li>S erver-based resources in ASP.NET can be created to use the AJAX capabilities of ASP.NET to interact with server-based resources without interrupting the user. </li></ul>
  15. 16. Silverlight XAML Browser Host Integrated Networking Stack DOM Integration Installer JavaScript Engine Presentation Core .NET for Silverlight Inputs Keyboard Mouse Ink Media WMV / VC1 WMA MP3 Controls Layout Editing UI Core 2D Vectors Animation Text Images Transforms DRM Media Dynamic Languages Ruby Python BCL Generics Collections Web Services REST RSS SOAP POX JSON Data LINQ LINQ-to-XML WPF for Silverlight Extensible Controls Common Language Runtime ASP.NET AJAX Libs <asp:xaml> <asp:media> Server Silverlight 1.0 Silverlight 1.1 Legend
  16. 17. Silverlight
  17. 18. <ul><li>Creating a custom control </li></ul><ul><ul><li>Derive from System.Windows.Controls.Control </li></ul></ul><ul><ul><li>Define the look of the control in XAML </li></ul></ul><ul><ul><li>Call InitializeFromXaml(xaml) to build the initial content </li></ul></ul><ul><ul><li>Store the return value to manipulate children </li></ul></ul><ul><li>Accessing a custom control from XAML </li></ul><ul><ul><li>Namespace declaration locates the control </li></ul></ul><ul><ul><li>Use it like a regular control </li></ul></ul>xmlns:local=&quot;clr-namespace:SilverlightApp;assembly=ClientBin/AppBinary.dll <local:myCustomControl PropertyX=&quot;10&quot; FooEvent=&quot;OnFooEvent&quot; />
  18. 19. <ul><li>Browser based headers/cookies passed with request </li></ul><ul><li>Restricted to same domain access in the Alpha </li></ul><ul><ul><li>Cross-domain coming </li></ul></ul>Make the HTTP Request Process the response Uri dataLocation = new Uri(&quot; http://localhost/trafficdata.xml &quot;); BrowserHttpWebRequest request = new BrowserHttpWebRequest(dataLocation); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); StreamReader responseReader = new StreamReader(response.GetResponseStream()); string RawResponse = responseReader.ReadToEnd();
  19. 20. <ul><li>Core XML reading & writing capabilities in the alpha </li></ul><ul><li>RAD XLINQ support coming </li></ul>Initialize the reader Find a node and read its value XmlReader xr = XmlReader.Create( new StringReader(RawResponse)); xr.ReadToFollowing(&quot; Item &quot;); string playerNodeText = xr.Value; string playerNameAttribute = xr.GetAttribute(&quot; Name &quot;);
  20. 21. <ul><li>Visual Studio-based Proxy Generator enables strongly typed access </li></ul><ul><li>ASP.NET JSON services supported in the Alpha </li></ul><ul><li>WCF and SOAP will be supported in future releases </li></ul>Server-based web service Call the Web Service from the client [WebMethod] public List<Transaction> GetTransactionList() { ... } proxy = new BankProxy(); transactionList = proxy.GetTransactionList ().ToList();
  21. 22. HTML access available in new namespace Static HtmlPage class provides entry point Hookup events, call methods, or access properties using System.Windows.Browser; HtmlPage.Navigate(&quot; &quot;); String server = HtmlPage.DocumentUri.Host; HtmlElement myButton = HtmlPage.Document.GetElementByID(&quot; myButtonID &quot;); myButton.AttachEvent(&quot; onclick &quot;, new EventHandler( this .myButtonClicked)); private void myButtonClicked( object sender, EventArgs e) { ... }
  22. 23. Mark a property, method or event as [Scriptable] Register a scriptable object Access the managed object from script [Scriptable] public void Search( string Name) { ... } WebApplication.Current.RegisterScriptableObject (&quot; EntryPoint &quot;, this ); var control = document.getElementById(&quot; SilverlightControl &quot;); control.Content.EntryPoint.Search(input.value);
  23. 24. Silverlight <ul><li>Silverlight RIA – Light up my web </li></ul><ul><li>Silverlight and ASP .NET , AJAX </li></ul>
  24. 25. References <ul><li> </li></ul><ul><li> </li></ul><ul><li>Community Site: </li></ul><ul><li>Main Product Site: </li></ul><ul><li>MSDN Center: </li></ul><ul><li>Online Forums: </li></ul><ul><li>Online SDK: </li></ul><ul><li>Silverlight Blogs </li></ul><ul><ul><li>Tim Sneath: </li></ul></ul><ul><ul><li>Laurence Moroney: </li></ul></ul><ul><ul><li>Adam Kinney: http:// </li></ul></ul><ul><ul><li>Jesse Liberty: http:// / </li></ul></ul><ul><ul><li>Tim Heuer: http:// </li></ul></ul><ul><ul><li>Dave Campbell: http:// / </li></ul></ul><ul><li>Email: </li></ul>
  25. 26. Questions and Answers