Escolar Documentos
Profissional Documentos
Cultura Documentos
Contents
Inorder to understand Silverlight, we have to understand what is Web development, RIA, and Web2.0
I tro d u cti n to W e b n o D e ve l p m e n t o
Desktop
Desktop Applications
Rich
Web
Web Applications
Reach
http://blogs.msdn.com/pietrobr | Pietro Brambati
Introduction to RIA
RIAs
Provide the look and feel of a desktop application. Allow users to contribute information, such as knowledge articles, pictures, music, and videos. Provide Rich User eXperience (Rich UX). Are based on the concept of Web 2.0.
Introducing RIAs(Contd.)
Rich UX is achieved through:
Rich user interface: Information on the Web pages is presented with a rich, attractive, and intuitive look and feel. Highly interactive websites: Websites contain sliders to change data, calendar gadgets to schedule tasks, and media players to watch videos and slide shows. Dynamically responsive Web applications: Websites provide quick response to users actions. Wide reach: Web applications can be accessed by desktops, Web browsers, and mobile devices.
http://blogs.msdn.com/pietrobr | Pietro Brambati
D e m o : I tro d u ci g R I s n n A
W h a t i S i ve rl g h t s l i
M i so ft S i ve rl g h t i a cro ss-b ro w se r, cro l i s cro ss-p l tfo rm i p l m e n ta ti n o f . N E T a m e o fo r b u i d i g a n d d e l ve ri g th e n e xt l n i n g e n e ra ti n o f m e d i e xp e ri n ce s & ri o a e ch i te ra cti a p p l ca ti n s fo r th e W e b . n ve i o S L u si g ve cto r g ra p h i , i a g e s, n cs m a n i a ti n , a n d m u l m e d i . m o ti a
Silverlight
The Silverlight platform allows you to develop rich and interactive applications for the Web. Users today use the Internet to read, share information, photos, videos, and sound files, make online business transactions, and socialize. Therefore, developers focus on building rich user interfaces and performancecentric websites. Allows creation of interactive and visually stunning graphics that users can manipulate directly in their Web browser.
http://blogs.msdn.com/pietrobr | Pietro Brambati
Installing Silverlight
Features of Silverlight
Is based on XAML, a markup language, which enables you to design the elements that make up the applications content region. Compelling Cross-Platform User Experiences. Flexible programming model with collaborative tools. Efficient, low cost delivery, and more capable media. Integrating Silverlight with ASP.NET Pages. Server Side XAML Generation.
Silverlight Architecture
Browser Host
Framework
Data WPF WCF
LIN Q
XML
DLR
. NE T fo r Si lv er li gh t Pr es en ta ti on Co re
Rub y
Pyt hon
XAML
UI Core Inputs DRM
Text Imag es
Keybo ard
Mou se
Media
Ink
Media La yo ut
Controls
VC1
WMA
MP3
Edit ing
Silverlight Processing
Being a client-side technology, processes the applications on the client machine and decreases server resource utilization. Improves the Web experience on the client machine. When Silverlight is used, and a change is needed to the rich content, a new XAML file is generated server-side. The next time the user browses to the page, this XAML is downloaded, and the experience is updated without any reinstallation.
System.Windows
mscorlib
System.Windows.Browser
System.Windows.Browser
System
System System.Collections.Generic System.ComponentModel System.Diagnostics System.Text.RegularExpressions
System.Core System.Xml
System.Xml System.XmlSchema System.Xml.Serialization
V Silverlight Expression Maximum Productivityisual Studio 2008 Extensions for Visual Studio Suite
ASP.NET 3.5
Application of Silverlight
Creating Animations, Games in web page. Enabling business application development. Webcam and microphone support allow sharing of video and audio in applications such as chat and customer service. Silverlight runs across all platforms and major browsers. Deep Zoom allows you to easily knit the collection of large images together and view it in the browser.
Moonlight
Moonlight is an open source implementation of Microsoft Silverlight for Unix systems. Moonlight you can access videos, applications and content created for Silverlight on Linux. In collaboration with Microsoft, Novell released the version 1.0 of Moonlight for major Linux systems including openSUSE, SUSE Linux Enterprise, Fedora, Red Hat, Ubuntu, and likely other system as well Silverlight Runtime for Linux Latest version Moonlight 2.99.0.8-i586.xpi
Silverlight /Moonlight
Browser Plug-In
OS Support
Windows OS Mac OS X Linux
Browser Support
Internet Explorer 5.5+ Mozilla FireFox 1+ Safari
Implementation
Microsoft Expression Blend:
Is a user interface design tool for creating graphical interfaces for web and desktop applications. Is an interactive What You See Is What You Get (WYSIWYG) front end for designing XAML-based interfaces for Silverlight. Auto-generates XAML code in the background.
Silverlight Layouts
One of the most important considerations while developing an application is deciding on its user interface (UI). Your application must render consistent content across all platforms and browsers. The Silverlight applications include the following core layout models for displaying content:
StackPanel Layout Grid Layout Canvas Layout
XAML
XAML
eXtensible Application Markup Language The Design Language of Silverlight. Tools will create XAML or Can be Hand coded
BAML
Binary Application Markup Language Binary Representation of XAML More Efficient
XAML Compilation
BAML 000110101 101010001 101010 C#/VB.Net
Combine
Partial class
ile mp Co
XAML <window />
Co m pi l e
Interpret SL App
XAML Compilation
XAML compilation involves three things.
Converting a XAML file into a special binary format. Embedding the converted content as a binary resource in the assembly being built. Connecting XAML and procedural code.
XAML example
Creating a button using XAML
XAML
Animation in Silverlight
Keyframes:
Define begin and end points of the visual transition of the animations Set on the timelines to mark the property changes of the elements, such as rectangle, ellipse, or polygon
Types of Animation
Identifying Various Types of Animations in Silverlight There are two types of animation classes in Silverlight:
Timeline animation : DoubleAnimation, PointAnimation, and ColorAnimation. Keyframe animation : DoubleAnimationUsingKeyFrames, PointAnimationUsingKeyFrames, and ColorAnimationUsingKeyFrames.
Demo Animation
Advantages of Silverlight
Cross-Platform User Experiences Flexible Programming Model with Collaboration Tools Connected to Data, Servers, and Services Search-engine friendly. Silverlight does NOT need to be hosted in IIS, any web server will do. Silverlight executed in the client browser. Low Cost, High Quality Media
Disadvantages of Silverlight
No support for auto-content scrolling of a container. User needs the Silverlight-Plugin/MoonlightPlugin. Silverlight is that it can't be easily reused. Right Click mouse event is not yet implemented.
Examples:
Demo:Book Controls in Silverlight
Summary
Silverlight provides a powerful way to display data and media in a rich medium. Web Browser plugin delivering:
Rich Media Experiences Rich Internet Applications Cross-browser, Cross-platform