Introduction
In this first module, you will get a high-level overview of Silverlight: its positioning, capabilities, and development tools. You will also see how Silverlight compares to other rich web-enabled technologies such as AJAX and Flash/Flex. Then you dive straight into creating a Silverlight application, gaining the core knowledge of how a Silverlight application is structured, deployed and rendered within the browser.
Fundamentals
This module will provide you with an overview of four core aspects of Silverlight development: the use of eXtensible Application Markup Language (XAML); the code-beside programming model; the concept of the visual tree; and the use and declaration of dependency and attached properties. The key, bedrock skills gained in this module will be further developed throughout the remainder of the class.
UI Elements
Designers and developers need a rich set of controls to help them build compelling UIs quickly. Silverlight supports this with three categories of controls: runtime, SDK, and toolkit. Here we will see how the various controls are packaged, how to instantiate them in your application, how to handle events, and how to design complex user interfaces by arranging controls inside multiple nested panels. We also look at how to integrate 2-D vectors graphics into your UI and customize their appearance with brushes, effects, transforms, and plane projections.
Out-of-browser Applications
Silverlight applications can include a manifest that allows them to be installed on the user's local machine. The apps can then be run "offline", i.e. outside of the browser. Locally installed apps run inside the same security sandbox as in-browser applications by default; however, apps can partially escape this sandbox by requiring the user to grant "elevated trust" upon installation. This module shows how to create OOB applications, including how to handle state transitions, cache required data in isolated storage, and detect changes in network connectivity. You will also learn how to work with elevated trust, and to sign your application to give the user a pleasing installation experience.
Navigation
One of the most important features of a RIA is its ability to integrate into the Web. In this module you will learn how to work with the browser to provide a navigable user interface that fully supports bookmarking and the back/forward buttons. This naturally leads to the user being able to "deep link" into the Silverlight content, and you will understand how this works, the issues that you need to address, and take a look at the extensibility points within the navigation framework.
Keyboard and Mouse
Silverlight's keyboard and mouse handling is less capable than that of WPF; it has to cope with multiple browsers running on multiple operating systems and has to be more constrained due to the security restrictions of the plug-in. It may appear basic, but there are many subtleties that have to be mastered to ensure that you can create rich line-of-business or game applications that are accessible to users; and this module will give you the low-down on this seemingly simple subject.
Animation
Smooth, carefully designed animations improve the usability of applications. Silverlight is loaded with animation types and comes with great tool support from Expression Blend. In this session you will learn how to create animations both declaratively and from code, to apply easing effects to animations to add depth and subtlety to your applications, and to work with fluid transitions.
Behaviors
Traditionally, designers create appearance and developers add behavior. A strict separation can slow down the designer's work since they must wait for the developers to add even simple behavior such as starting an animation or changing the UI in response to a mouse-over. Silverlight Behaviors simplify this process: developers encapsulate blocks of functionality into Behaviors and designers apply them to the UI through Expression Blend. This module shows you how to write reusable Behaviors, and to create and use custom Triggers and Actions to provide fine-grained support to the designers. The understanding gained in this module will truly enable you to build software that enables highly productive workflows in your Silverlight development.
Data Binding
All good UI technologies support declarative data binding, and Silverlight is no exception. In fact, it is fair to say that data binding is the most important aspect of Silverlight development. In this critical module you will learn how to bind data to UI elements; how to bind between UI elements to minimize your coding; how to implement the key interfaces that enable the UI to be updated automatically, such as INotifyPropertyChanged, and how to fully utilize the flexibility afforded by data templates, value converters, fallback values and string conversion.
Data Presentation
The Silverlight SDK and toolkit contains numerous controls for displaying data and capturing user input. In this module you will work with the various graphing controls, along with the DataGrid and the DataForm.
Validation
Bound user interfaces are fantastic, but you need to be able validate the user input. In this module you will examine the various validation techniques that are available in Silverlight, such as throwing exceptions and reporting errors via various interface and events. You will also see how you can implement validation by decorating your types with attributes and by writing custom validators.
Model-View-ViewModel
Many years of experience tell us that interleaving code and presentation leads to unmaintainable, untestable, and designer-unfriendly code. The strongest pattern to emerge in WPF and Silverlight to overcome this is the Model-View-ViewModel pattern, and in this module you will gain a deep understanding of what it is; how to structure your code to support testing, "blendability" and maintainability; how to work with ICommand; and how to support designers effectively.
Custom Controls
Silverlight has a very strong story for developer/designer interaction and separation of concerns. Starting with a review of User Controls, you will rapidly move on to learn how to create re-skinnable custom controls, gaining a solid understanding of Silverlight's famed "parts and states" model. You will learn how to create and manage control templates using Expression Blend, and use Visual State Manager to reduce code and maximize design flexibility, implementing controls along the same M-V-VM model that underpins robust Silverlight applications.
Shell Integration
This module explores several ways to interact with the environment outside the Silverlight host: through the clipboard; via drag and drop from the shell; through printing, including pagination; and via COM (automation) interoperability. You will also gain a solid understanding of the impacts of the security sandbox on these features.
Windows Phone 7
In this module you will understand how you can you use Silverlight to create applications for the Windows Phone 7, and see which additional APIs are available to you, and which pieces of Silverlight won't work, on the phone platform.
HTML Integration
Very few Silverlight applications are completely isolated from their containing site. Therefore, in this module you will learn how to support interoperability with existing HTML elements so that you can combine Silverlight, AJAX and standard HTML programming to create a uniform and integrated experience for the user.
Networking
RIAs naturally become richer and more dynamic when they communicate with external data sources. Therefore, in this session, you'll use the many network stacks, such as WCF, Sockets or simple RESTful APIs, to pull resources from your own and other domains' servers, gaining a deep understanding of the limitations of and support for cross-domain calls. You will also gain an insight into the role of WCF RIA Services in the building of larger RIA applications.
Local Messaging
Patterns that have multiple parts like Navigation+Content or Banner+Skyscraper ads are often implemented using multiple Silverlight applications. The apps typically need to communicate to coordinate their activities; for example, you might want an animation that starts in the banner ad to continue into the skyscraper. Silverlight includes a Local Messaging API to allow multiple Silverlight applications on the same machine to communicate. The connection works within a page, across processes, across browsers, and even with Silverlight apps running out-of-browser.
Media
Silverlight excels at supporting rich high-definition media. In this module, you will learn how to leverage Silverlight's built in video capabilities to control and display A/V content within your application. We will cover playback basics, full-screen mode, and video brushes. You will also use Microsoft Expression Encoder to create and transform A/V content to fit the limitations of the Web. You will add markers to your video during encoding and then write C# code to react when the markers are reached during playback: a technique that allows you to coordinate targeted overlay or banner ads to really maximize the value of your media content.
Appendices (not taught)
The course materials also include the following extra modules:
- Working with Files: local files, Isolated Storage, data files, zip files.
- Extensibility: working with MEF to build extensible applications
- PRISM: using PRISM (Composite Application Guidance) to structure Silverlight applications
- Ink: how to capture, store, and display stylus input.
- Graphics: complex shapes and curves, writeable bitmaps.
- GPU Acceleration: discuss the pros and cons of Silverlight's support for GPU acceleration.
- Pixel Shaders: overview of how to write and apply a custom pixel shader.
- Splash Screen: how to display an informative splash screen while your app is loading.
- Installation: how to respond when the user doesn't have the Silverlight plug-in installed.
- Control Reference: a quick-start guide to the available controls.
- Duplex Networking: how to implement a push service using WCF.
- Composition: brief overview of how to build an application from parts by dynamically loading assemblies.
- Asynchronous Execution: multi-threading support in Silverlight including a brief discussion of timers