1 / 27

Building Rich Web Applications with Microsoft SilverLight

Building Rich Web Applications with Microsoft SilverLight. Noah Subrin SRA University Spring 2008 Week 4. Today’s Agenda (Week 4). Student Q&A Week 3 Review Questions Take-home lab review (QuickStart 1) (sample interactive controls) Performance Tips for SilverLight Apps

hedia
Download Presentation

Building Rich Web Applications with Microsoft SilverLight

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Rich Web Applications with Microsoft SilverLight Noah Subrin SRA University Spring 2008 Week 4

  2. Today’s Agenda (Week 4) • Student Q&A • Week 3 Review Questions • Take-home lab review (QuickStart 1) (sample interactive controls) • Performance Tips for SilverLight Apps • Chapter 8 – Downloading Input on Demand • More Additional Resources

  3. Housekeeping Items • Toll free audio is available at 1-866-836-1423 Attendee access code: 6259066021 As a courtesy to the class, please mute/unmute your phone by pressing *6 or press the mute key on your phone unless you have something to share with the class

  4. Class Slides • The semesters slides are not yet available on the SRA Portal. You may download them from my blog site http://blogs.federalsystems.net or by using WebEx File\Transfer function

  5. Student Q&A\Feedback • Are there any questions or comments anyone would like to share with the class?

  6. Week 3 Review Questions • What UIElement control do we use to play .wmv, .wma, and some types of mp3 files? • What property do we use in .xaml to uniquely identify an object (programmatically)? • Name some of the methods we use to control media playback. • What are the required steps to animate a SilverLight object?

  7. More Week 3 Review Questions • Storyboard and DoubleAnimation are two examples of __ objects. • What animation property do we use to describe the length of time it takes for an animation to play once? • What property indicates how frequently a timeline should repeat? • What two properties describe the beginning and ending values of the property to animate?

  8. More Week 3 Review Questions • What do we call it when SilverLight runs some JavaScript code when an event occurs? • What are some of the mouse events we can capture? • T/F SilverLight natively supports the double-click mouse event. • What do we call support for stylus events?

  9. More Week 3 Review Questions • What function do we call to dynamically create SilverLight content from a JavaScript string? • What do we call the concept of an event being sent to all of an elements ancestor elements? • How do we programmatically access a SilverLight control from a child element?

  10. SilverLight 1.0 QuickStart Review • We will proceed with our review of SL 1.0 Quickstart and take a look at sample controls. • Hyperlink • Button • Slider We will view them in split mode in Blend 2.0. All of the controls use JavaScript

  11. Performance Tips for SilverLight Apps • Test on Multiple Platforms and Browsers • Set EnableFrameRateCounter to true During Development • Use Transparent Background for a SilverLight Plug-in Sparingly • Use SilverLight Animations Instead of Creating Your Own Per-Frame Animations

  12. Performance Tips for SilverLight(continued) • Avoid Animating the Size of Text • Avoid Using Windowless Mode • Use Visibility Instead of Opacity Whenever Possible • SilverLight takes advantage of multi-core for rendering and media playback. Therefore, your SilverLight-based applications will perform faster on multi-core systems.

  13. Performance Tips for SilverLight(continued) • In Full-Screen Mode, Hide Unused Objects • Do Not Use Width and Height with MediaElement Objects • Do Not Use Width and Height with Path Objects • When Downloader Finishes, Detach Events and Set to Null • http://msdn.microsoft.com/en-us/bb693295.aspx

  14. Questions? • Break

  15. Demos – More 1.0 Controls • Community Gallery silverlight.net/community/gallerydetail.aspx?cat=3 SilverLight Ink Journal LCD Clock Interactive Asset Allocator • Wicked Code Demo from Jeff Prosise in MSDN Magazine 2008 Launch Edition (includes download control)

  16. Chapter 8 – Downloading Content on Demand • SilverLight 1.0 has a special downloader control • Uses an HTTP GET command that does not have to refresh the web page similar to AJAX update panel. • Can download many kinds of file types - even .zip files on demand • Use the SilverLight control’s CreateObject call to instantiate the object

  17. Using Downloaded Content • Downloader exposes open and send methods • Send performs an asynchronous “GET” • Listen for the ‘Completed’ event which signals that download is complete • ResponseText property displays the downloaded content represented as a string

  18. Downloader Tip (p181) • We can parse and load downloaded XAML in a single call using CreateFromXamlDownloader method in the Completed event handler • This is more efficient because it avoids copying the XAML content into a temporary string

  19. Another downloader tip p182 • (Repeat of earlier performance tip) For best performance detach all downloader event handlers and set the downloader instance to null

  20. We can download several items at once • Downloader supports retrieving a package, like a .zip file • Tip we can use any file extension for our zip file any have it work with the downloader, unless it contains font files

  21. Chapter 8 Walkthrough • Displaying a Progress Bar p183 • Progress Bar with Gradient p185 • Progress Bar Customizations p186-7

  22. Summary of what we covered today • Week 3 Review Questions • Take-home lab review (QuickStart 1) (sample interactive controls) • Performance Tips for SilverLight Apps • Chapter 8 – Downloading Input on Demand

  23. Downloader object summary • Downloader object makes it easy to manage content effectively • Less content downloaded up front • We can use zip files to speed up our downloads. • We can create custom progress bars to improve the customer experience

  24. Additional Resources • SilverLight ‘How To Topics’ from the MSDN Library http://msdn.microsoft.com/en-us/bb188568.aspx

  25. Optional Home Work • View Live from Redmond: Building a dynamic Silverlight Application using a web service, the downloader, and CreateFromXAML (duration = 60 minutes) Msevents.microsoft.com Search on demand webcasts Event id = 1032356286

  26. Next Class Session – June 12 • I will be out of the office next week. • Week 5 class will be held on June 12 at the usual time. • Agenda: Review Week 4 material Review optional homework Week 5 material will deal with Chapter 9 in the course text (animation).

  27. Questions ? • Feel free to contact me at noah_subrin@sra.com • Thank you for your participation!

More Related