• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Silverlight Training - Part 1
 

Silverlight Training - Part 1

on

  • 3,705 views

http://www.intertech.com/Courses/Course.aspx?CourseID=99428

http://www.intertech.com/Courses/Course.aspx?CourseID=99428

This presentation is from an Intertech Oxygen Blast on Silverlight.

Statistics

Views

Total Views
3,705
Views on SlideShare
3,699
Embed Views
6

Actions

Likes
1
Downloads
0
Comments
0

1 Embed 6

http://www.slideshare.net 6

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Silverlight Training - Part 1 Silverlight Training - Part 1 Presentation Transcript

    • Silverlight Overview Introducing Silverlight Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 1
    • Silverlight Overview • Understand the Role of Silverlight (SL) • Contrast the feature set of SL 1.0 to SL 2.0 • Examine the architecture of an SL 2.0 application • Overview SL 2.0 development tools • SL 2.0 Demo App (control styles, WCF integration, animation, grids of data!) • Know the role of the ASP.NET SL web controls • Wrap up. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 2
    • Silverlight Overview • .NET 3.0 introduced the Windows Presentation Foundation (WPF) API. • WPF is essentially a supercharged UI framework for building desktop applications. • WPF integrates graphics, animation services, a rich data binding layer, video / audio services and print-ready document functionality into a single unified programming model. • Using WPF, you are able to build extremely rich user interfaces. At its core, WPF is a desktop API geared at building highly interactive and media-rich GUIs. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 3
    • Silverlight Overview • WPF introduced the Extensible Application Markup Language (XAML). • XAML is an XML-based grammar which can be used to describe a tree of .NET objects (UI-based or otherwise). • At runtime, this markup is used to hydrate objects into memory. • Typically, a binary version of the markup (BAML) is embedded into the WPF application, rather than shipping loose XAML files. • XAML is very useful, in that you can describe complex UI elements via markup. • Animations, graphics, data binding operations, custom control templates, etc. • While XAML is optional, expressing the same function via C#/VB code would be very verbose. • Typically XAML is generated transparently via dedicated tools such as MS Blend, and to some extent, Visual Studio. • You’ll see XAML / MS Blend at work later in this chapter… Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 4
    • Silverlight Overview • WPF is ultimately an API for desktop development, however it also supports ‘XBAP development’. • XAML Browser Applications (XBAP) provide a way for a browser (Firebox or IE) to display the UI of a WPF application. • However, XBAPs are *not* ASP.NET applications and have no native web- awareness. • XBAPs are little more than a WPF application deployed from a web server, and hosted in a browser. • The benefit however, is that XBAPs provide a much richer UI than traditional HTML/script code. XBAP WPF applications make use of Page objects, rather than Window objects. The browser hosts the Page objects. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 5
    • Silverlight Overview • Silverlight is a web-centric programming model based on WPF technologies. • Unlike WPF, Silverlight allows you to build highly interactive web plug-ins. You would never use Silverlight to build a desktop application. • If required, a Silverlight app can take up the entire display area of the hosting browser, or simply take up a chunk of a larger web page. • Like WPF, Silverlight makes use of XAML and integrates a number of features (graphics, animations, data binding, etc) into a unified programming model. • Consider Silverlight to be Microsoft’s answer to Adobe Flash. • Silverlight is not limited to Microsoft-centric OSs / browsers. • Silverlight applications can run on multiple operating systems (currently Windows and Mac OS X and possibly other OSs in the future). • Silverlight plug-ins can be hosted by multiple browsers (IE, Safari, Opera, and Firefox). • Regardless of the OS / browser, the machine must download and install the free Silverlight runtime plug-in. • If users do not already have the plug-in, they are automatically prompted to install it when accessing a SL enabled web page. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 6
    • Silverlight Overview • The Silverlight web site (www.silverlight.net) provides numerous links to downloads: • The Silverlight runtime plug-in. • The Silverlight SDK and SDK documentation. • Silverlight project templates for Visual Studio 2008. • Numerous examples, white papers, tutorials, etc. Currently, SL 2.0 projects Are not native to VS 2008. You must manually download and Install SL 2.0 project support. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 7
    • Silverlight Overview • Currently, Silverlight is available in two versions, each of which supports a radically different feature set. • Silverlight 1.0 was a great first step, but it forced programmers to use script code to implement functionality, and lacks a full-fledged OOP API. • Silverlight 2.0 is a massive improvement, which ships with a subset of the CLR and .NET base class libraries. • In a nutshell, Silverlight 2.0 allows developers to build object- oriented, strongly-typed, web plug-ins. • SL 2.0 apps can be created using C#, VB, IronPython, etc. • SL 2.0 apps are constructed using the .NET type system (classes, interfaces, enums, delegates, structures, generic types, etc.) Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 8
    • Silverlight Overview • In a nutshell, the biggest advantage of version 2.0 is deep integration of the .NET platform. • SL 2.0 provides a ‘mini-CLR’ which is hosted by the web browser (e.g., the SL runtime). Handles garbage collection, threading, assembly binding, etc. • SL 2.0 provides a ‘mini-BCL’ which provides core functionality of the base class libraries (security, threading, collections, LINQ, network protocols, etc). • SL 2.0 also provides a suite of GUI controls, similar in functionality and programmability to the WPF control library (control templates, XAML, etc). • SL 2.0 is in effect, a new distribution of the .NET platform! • Consider the following table, which contrasts the functionality between each version of Silverlight. • Items in bold are specific to SL 2.0. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 9
    • Silverlight Overview Possible Feature Support Silverlight 1.0 Silverlight 2.0 2D Vector Animation/Graphics * * AJAX Support * * Managed Programming Languages (Visual Basic, Visual C#, IronRuby, IronPython) * HTTP Networking * * JavaScript Support * * JSON, REST, SOAP/WS-*, POX, and RSS Web Services (as well as support for Sockets) * ADO.NET Data Services * Cross Domain Network Access * LINQ to Objects * Canvas Layout Support * * StackPanel, Grid and Panel Layout Support * Full suite of Controls (TextBox, RadioButton, Slider, Calendar, etc) and control template support * Managed Exception Handling * Media – 720P High Definition (HD) Video * * Media – Audio/Video Support (VC-1, WMV, WMA, MP3) * * Media – Image Support (JPG, PNG) * * Rich Core Framework (e.g. generics, threads, security etc) * Silverlight ASP.NET Controls * * Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 10
    • Silverlight Overview • In addition to the previous table, SL 2.0 provides the following additional services. SL 2.0 Feature Meaning in Life Provides safe access from the Silverlight client to the local machine's file system. Isolated storage Enables local storage and caching of data isolated to a particular user. A background worker thread carries out programming tasks while the application Asynchronous programming is freed up for user interaction. Provides a safe File Open dialog box, to ease the process of creating safe file File management uploads. Enables .NET Framework programmers to directly manipulate UI elements in the HTML DOM of a Web page. Web developers can also use JavaScript to call HTML - managed code interaction directly into managed code and access scriptable objects, properties, events, and methods. Provides support for serialization of CLR types to JSON (JavaScript Object Serialization Notation) and XML. Provides the Application class to create .xap packages. The .xap package contains Packaging the application and entry point for the Silverlight plug-in control to run. XMLReader and XMLWriter classes simplify working with XML data from Web XML libraries services. Also support for LINQ to XML. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 11
    • Silverlight Overview • The Silverlight 2.0 runtime plug-in is essentially a ‘micro’ version of the .NET CLR. • This runtime will host your Silverlight assemblies, as well as the Silverlight base class libraries. • This runtime will JIT CIL code, handle threads, exceptions and garbage collection. • This is a good thing, as your current .NET programming skills apply directly to Silverlight development. • In addition to the ‘micro-CLR’, Silverlight 2.0 supports a subset of the .NET base class libraries. • When a requesting browser loads a Silverlight page, any required assemblies are downloaded to the user’s machine. • Like any other .NET program, you can build your own code custom libraries for use within your Silverlight programs. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 12
    • Silverlight Overview • The SDK documentation provides the following helpful legend which breaks down the Silverlight architecture. • Again note that Silverlight 2.0 offers support for LINQ, WCF services, numerous UI controls and XML processing. • Also note that version 1.0 and 2.0 both make use of XAML. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 13
    • Silverlight Overview Key Points - SL 2.0 supports a subset of WCF. - SL 2.0 supports a subset of WPF. - SL 2.0 supports a subset of the BCL. - SL 2.0 supports LINQ functionality. - SL 2.0 supports .NET programming languages (C#, VB, etc). Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 14
    • Silverlight Overview • To summarize the story so far, SL 2.0 is a .NET-based web plug-in development framework. •Geared towards building rich, media driven, interactive web content. •Supports development using managed languages or script code. •Leverages several aspects of the WPF programming model (XAML, content model, control templates, Page and Application objects, etc). • Leverages a healthy subset of the CLR / CTS / CLS. • Next up, Silverlight 2.0 tool support… Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 15
    • Silverlight Overview • When you are building a Silverlight application, you will (typically) make use of XAML to describe the look and feel of the plug-in. • XAML is an XML based grammar. • Using XAML, you can declaratively define animations, graphical renderings, UI controls, data binding operations and a slew of additional functionality. • While this is very powerful, authoring XAML by hand is extremely tedious and error prone. • During development, XAML is typically generated by external tools. • However, to better learn the syntax of XAML, consider the use of Kaxaml. • Kaxaml is a free tool which you can download from www.kaxaml.com. • Provide a easy to use UI to author XAML and view output. • IntelliSense, auto-completion, XAML snippets, save / load support, etc. • Supports WPF and Silverlight XAML syntax (while the two are very close, they are not identical). Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 16
    • Silverlight Overview • Kaxaml is a free tool which you can download from www.kaxaml.com. • Provide a easy to use UI to author XAML and view output. • IntelliSense, auto-completion, XAML snippets, save / load support, etc. Kaxaml and XAML Functionality Demo! Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 17
    • Silverlight Overview • A production level Silverlight application will most likely require the services of a professional graphical designer. • This is due to the fact that Silverlight apps (and WPF apps for that matter) are so graphically intensive. • As you may agree, most .NET programmers are not the best of graphical artists. Consider the Showcase Area of the Sliverlight web site. Many of the SL demos make heavy Use of graphics, animations, Transformations, etc. While many developers could program This functionality, few would be comfortable Using a graphical artist tool to do so… Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 18
    • Silverlight Overview • Rather than forcing graphical artists to use VS08 to author XAML descriptions, Microsoft has created a suite of dedicated tools which fall under the "Expression" product lineup. • Expression Blend is a tool which allows designers to build rich UIs for Silverlight apps (as well as WPF apps). • Expression Design allows these same designers to render 2D and 3D vector graphics. • Both of these tools will generate the underlying XAML in the background. • Go to http://www.microsoft.com/expression to download evaluation copy. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 19
    • Silverlight Overview • Even better, Expression Blend projects use the exact same format as Visual Studio 2008. • Therefore, a graphically minded person can use Blend to build the look and feel of your Silverlight application. • Programmers can load the same project into Visual Studio 2008 to add code. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 20
    • Silverlight Overview • The Silverlight web site allows you to download project templates for Visual Studio 2008 • Once installed, you can select a new Silverlight Application project (using C# or VB). • You can also build a *.dll which makes use of Silverlight libraries. This can be helpful when building custom controls for your Silverlight applications. Blend / Visual Studio 2008 Silverlight Project Template Demo: -Examine initial code / XAML. -Examine ‘mini-BCL’ libraries. -Examine SL 2.0 API documentation. Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 21
    • Silverlight Overview • In the next session, we will walk through a Silverlight 2.0 application. • The application will demonstrate: • Core programming model • Silverlight / WCF integration. • Asynchronous calls to remote services. • Use of animation services. • Use of the Silverlight DataGrid • Use of data binding templates. • ASP.NET Silverlight web controls • See you then! Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 22
    • Silverlight Overview • Intertech offers free: • Content packed newsletters • Podcasts through iTunes • YouTube videos • Free Oxygen Blast seminars • Whitepapers and .pdf downloads • For the above and special offers, register for the newsletter at the bottom of our homepage Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 23
    • Silverlight Overview • In addition to training, Intertech delivers consulting • Intertech delivers consulting on the same topics that we provide training • The mix of training and consulting is who we are: Instructors Who Consult | Consultants Who Teach Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 24
    • Silverlight Overview • For advanced purchase customers, Intertech offers Elite Rewards™ • Elite Rewards give customers: • Significant savings for advanced purchases • Simplified enrollment • Special benefits like advanced notice of our Oxygen Blast events Copyright © Intertech, Inc. 2007 • www.Intertech.com • 800-866-9884 • Slide 25