Silverlight Subjective Questions And Answers

Silverlight Subjective Questions And Answers

More interview questions and answers

What is Microsoft Silverlight?

Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET-based media experiences and rich interactive applications for the Web.

Silverlight applications are run as client-side applications without the need to refresh the browser to update the UI. However, because of the built-in .NET framework, Silverlight applications can easily integrate with server-side controls and services. Using Silverlight\'s implementation of the .NET framework, developers can easily integrate existing libraries and code into Silverlight applications.

One of the design goals of the Silverlight technology is to fill the gap between windows application and web application in terms of creating Graphical User Interface (GUI). 

Why Use Silverlight?

Support of Managed code - you can write programming in your favorite language which .NET CLR supports like C#,VB.NET, Dynamic languages( IronPython, IronRuby) 

# Better development tools -Visual Studio 2010, Expression Blend.

 Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.

 Silverlight supports the ability to progressively download and play media content from any web-server.

 Silverlight also optionally supports built-in media streaming.

 Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.

 Silverlight makes it easy to build rich video player interactive experiences.

# Large community-  available lot of learning resource as compare to Flash technology

# Integration with Enterprise based technologies like WPF, LINQ etc...

# Silverlight integrates the XAML declarative language with the .NET framework. 

It delivers rich video, audio, and graphics. 

Which platforms Silverlight supports?

    * Mac OS 

    * Windows Vista

    * Windows XP SP2

    * Windows 2000

    * Windows Server 2003

    * Linux (Moonlight)

Which browsers Silverlight supports?

Supported browsers: Microsoft Internet Explorer 6, Windows Internet Explorer 7, Mozilla Firefox, and Firefox 2.0.x.

What are the system requirements for Silverlight?

Operating System: Windows Vista; Windows XP Service Pack 2

o Intel® Pentium® III 450MHz or faster processor (or equivalent)

o 128MB of RAM

o Mac OS

o Operating System: Apple Mac OS X 10.4.8 or above

o Intel Core Duo 1.83GHz or faster processor

o 128MB of RAM

What is Moonlight?

Moonlight was built by Novell in collaboration with Microsoft which provided Novell with test suites, specifications, open source code and Media Codecs to create an entirely open sourced Silverlight-compatible implementation for Unix systems.

Access to licensed Media Codecs (MP3, WMV, VC-1) is provided by Microsoft to Moonlight 1.0 and 2.0 users. The first time that you access a web site that requires these codecs, Moonlight will prompt you to download the codecs from Microsoft and install those on your system.

    * To run Silverlight applications on Linux. 

    * To provide a Linux SDK to build Silverlight applications. 

    * To reuse the Silverlight engine we have built for desktop applications. 

What is the difference between Silverlight 1.0 and 2?

Silverlight 1 is pure AJAX and Javascript based. All the code has to be written in Javascript and XAML.\\

Silverlight 2 supports managed code. When Silverlight 2 runtime is installed, it installs a limited version of .NET runtime on the client machine. This allows .NET programmers to write managed code to be executed on the client PC and provide a better user experience to the users. Of course, there is security and restrictions built in to it so that the code has limited access to the client computer.

In Silverlight 1.0, the XAML code was referenced directly by the Silverlight object embedded in the browser. In Silverlight 2, however, the embedded object references an XAP package that contains the XAP file, assemblies, and resources necessary to run the Silverlight application. 

What is Silverlight Plug-In?

* The Silverlight plug-in is a very lightweight component that is necessary for users to access Silverlight applications. The plug-in download and install take only a few moments and do not take up much hard drive space.

* The Silverlight plug-in is responsible for accessing the Silverlight object in the Web page, downloading and accessing the XAP package, setting up the program environment, and beginning execution of the application.

* When a Web page containing a Silverlight application is displayed, the user should be given a link to download the plug-in from Microsoft if the plug-in is not already installed

What is Silverlight Runtime?

Silverlight CLR is a subset of the .NET Framework that contains components and libraries, including data integration, extensible Windows controls, networking, base class libraries, garbage collection, and the common language runtime (CLR).

Silverlight Runtime is a browser plug-in to support Silverlight enabled applications. If Silverlight runtime is not installed, browsers will not be able to run Silverlight elements in the browser. You can set up your Silverlight tags such a way that your browser will automatically prompt the user to download and install the Silverlight plug in when your application is launched in the browser. 

Installing the run time is a onetime operation on the client. Once installed, it will be automatically launched when any Silverlight application is loaded in the browser.

What is Silverlight SDK?

What is Silverlight SDK?

Silverlight SDK is a set of tools, documentation, samples and templates for the web developers to help them easily develop Silverlight enabled applications. The SDK is not really mandatory to develop Silverlight applications; however, SDK will make development much easier.

This SDK provides a working sample control for Silverlight 4 that implements all the features of two additional assemblies, which together provide a rich set of user experience for consumption of Microsoft Bing search results.

The first component is a reusable framework extension to the Microsoft Silverlight Toolkit. This framework is designed to provide:

    * Support controls for the sample Bing component
    * A reusable view control toolkit for implementing and using some of the advanced data metaphors shown in the Bing search component.
    * Components such as CloudView, TileView, BandCloudView and StackView can be used in any Silverlight application. All the controls in this assembly support theming and accessibility. All these controls are built on the same infrastructure as the Silverlight Toolkit Controls. 

What is .xap file?

A .xap file is an application package (.xap) that is generated when the Silverlight project is built. A .xap file has an application manifest file (AppManifest.xaml) and the necessary DLL is needed by the application.

It  used to contain and transfer the assemblies and resources of a managed code application. This managed code application must be run within the Silverlight 2 browser plug-in.

What is Silverlight.js file?

Silverlight.js file is a Java Script helper file. Silverlight.js is a helper file which enables Web sites to create advanced Silverlight installation and instantiation experiences. You can call the createObject and createObjectEx functions defined in this file to embed the Silverlight plug-in in a Web page. 

It supports for adding a Silverlight application to a web page through Java Script. 

What is the use of ClientBin folder?

The ClientBin folder is used for placing .xap file of a Silverlight application. 

This folder can be kept anywhere in the web application.  but this is the default that is used by the Silverlight.

So if you have silverlight applications associated to your web project their .xap files should go there. 

Explain how can Silverlight use ASX files.

An ASX file is an XML file in which media files are specified in the playlist. Using ASX files in silver is pretty simple. Assign the source property of a MediaElement object to the ASX file name.

Explain Silverlight application life-cycle

Silverlight is running on the client, not on the server as normal ASP.NET pages... there is no such as Page Life Cycle in Silverlight. But there are some events that will be executed on the client side in a specific order.

   1. First the App constructor in the App.xaml file.

   2. The App\'s Applicaiton_Startup event which will be executed every time you open your Silverlight app.

   3. The Main page\'s Constructor..  It will be the constructor of the page assigned to the RootVisual properly within the App\'s Application_Startup event.

   4. InitializeCompnent, only to make sure the components are singed to variables so you can use them. I hope this one will be removed in the future and be handled elsewhere.

   5. If you have hooked up to the Loaded event within the Main Page Constructor, that event will then be executed, same with the rest event listen in the order they will be executed if you have hooked up to them.

   6. Then the SizeChanged event.

   7. Then the LayoutUpdated event.

   8. Then GotFocus if you mark the Silverlight app.

   9. If you navigate from your Silverlight app or close the Browser the App\'s Application_Exit event will be executed.

What are the main features and benefits of Silverlight?

The following are the features of SilverLight:

1. Built in CLR engine are available for deliverd a super high performance execution environment for the browser.

2. Includes rich power framework of built-in class library for using with browser-based applications.

3. Supports WPF Userinterface interface programming model.

4. Provides a managed HTML DOM API which is used for HTML enabled programs of a browser using .NET technology.

5. Silverlight supports PHP or Linux environment. Hence does not require ASP.NET.

6. Permits limited access to file system for applications. An OS native file dialog box can be used for using any file.

The following are the benefits of Silverlight:

1. Supports high quality videos

2. Supports cross-platform and cross-browser applications

3. Features are available for developers with Visual Studio for developing applications very quickly.

4. Most inexpensive way for video streaming over internet at the best possible quality.

5. Supports third party languages such as Ruby, Python, EcmaScript!

6. Supports remote debugging.

7. Provides copy protection.  

8. Flexible Programming Model with Collaboration Tools.

9. High-quality media, low-cost delivery. 

Which language is Silverlight developed in?

C# and C++.

What are the other RIA technologies besides Silverlight?

Adobe Flex, Java FX, Adobe Flash are some of the other RIA technologies besides Silverlight.

What is meant by RIA?

RIA is an acronym for Rich Internet Application.

A Rich Internet Application provides a great experience for its users. It should be easy to use, engaging, and  targeted to perform its task very well. To many this means a desktop-application-like-experience delivered through the web. This may include common features such as drag-and-drop data manipulation and imaging/drawing/charting capabilities, but it is not a requirement to include any of these.

Microsoft .NET RIA Services helps to simplify the n-tier application pattern by combining the ASP.NET and Silverlight platforms. RIA Services provides a pattern using which you can write application logic that can run on the mid-tier and controls access to data for queries, changes, and custom operations. It also provides support for data validation, authentication, and roles by integrating with Silverlight components on the client and ASP.NET on the middle tier.

What is XAML?

What is XAML?

Extensible Application Markup Language (XAML) is a declarative language..

XAML is just XML that Microsoft has developed to describe objects. Silverlight relies on XAML to store and represent visual objects to be displayed and animated on HTML pages. XAML is a XML file which defines the UI elements. This XML file can be read by WPF framework or Silver light framework for rendering. Microsoft first developed WPF and they used XAML files to describe the UI elements to the WPF framework. Microsoft then extended WPF and made WPF/E which helped to render the UI in the browser. WPF/E was the code name for Silverlight. Later Microsoft launched Silverlight officially. 

What features are missing from Silverlight presentation markup that will be supported in WPF?

1. high-end Windows specific features of WPF, such as real 3D, hardware-based video acceleration, and full document support, will not be supported in Silverlight. This is by design in order to serve Silverlights cross-browser, cross-platform reach scenario that demands a light weight plug-in. That being said, Silverlight will offer a uniform runtime that can render identical experiences across browsers on both Mac OS and Windows.

Goal of SilverLight?

The goal of Silverlight 2 is to let you efficiently develop visually appealing web applications. This development model includes a set of platform libraries, the ability to use a variety of .NET languages, a security model that enables web page access to your application without an install process, and a mechanism to enable designers and developers to work concurrently to create production quality web sites

What are Deep Zoom and Deep Zoom Composer?

Deep Zoom is important feature for silverLight.Deep Zoom provides the ability to interactively view high-resolution images in Silverlight. You can zoom in and out of images rapidly without affecting the performance of your application.

Deep Zoom provides smooth in-place zooming and panning.

DeepZoom Composer allows you to create high resolution image compositions, which are built for smooth Zooming and Panning. DeepZoom composer is absolutely free and is simple to use, just load in all your high resolution images and makes your composition on screen. 

Deep Zoom Composer is a tool that allows preparing of images for use with the Deep Zoom feature in Silverlight 3.

What is the difference between WPF and Silverlight?

That main difference is that WPF uses full .Net library works only on Windows system, while Silverlight uses only a subset of the .Net library because Silverlight run-time was designed to work as Browser plug-in (although now it also works out of browser) in cross-platform environment. 

Silverlight represents a subset of WPF that is delivered through a browser plug-in, much like Flash/Flex.

WPF is programmed with your favorite .NET language, Silverlight is currently programmed with JavaScript only (there\'s was talk of cross-platform .NET support coming)

Silverlight does not support some of the more advanced concepts of WPF such as controls, templating, 3D

Silverlight integrates right into an HTML page where as WPF XAML files have to be loaded via a frame if they want to mix with HTML content

Simpler security model for Silverlight vs. WPF XBAPs

What is the difference between Silverlight and Flash?

Adobe Flash is  most Famous competitor to Silverlight both supports browser plug-in and enables execution of rich content for the Web. Flash is not the new technology, which is already having long life span as compared to Silverlight.

Silverlight aims to give .NET developers a better option for creating rich web content. Silverlight provides a browser plug-in with many similar features to Flash, but one that\'s designed from the ground up for .NET. Silverlight natively supports the C# language and uses a range of .NET concepts. As a result, developers can write client-side code for Silverlight in the same language they use for server-side code (such as C# and VB), and use many of the same abstractions (including streams, controls, collections, generics, and LINQ).Now, we got moonlight for Linux user .This limitation doesnt exist with Flash.

Silverlight 2 supports Socket communication too. Flash allows creating XML Socket object.

What are the different Layout controls available in Silverlight Application?

Three main controls that can be used for layout management in silverlight:

· Canvas Control

· StackPanel Control

· Grid Control

Do I need to have the .NET Framework installed in order to use Silverlight?

The answer  is no - a cross platform version of the .NET Framework is included in the 6 MB Silverlight 4 download, which means you do not need to have anything extra installed on the client in order to access Silverlight application in the browser.  

The Silverlight version of the .NET framework includes the same CLR engine (same GC, type-system, JIT engine) that ships with the full .NET Framework, and a subset of the .NET Framework namespace libraries.  You can see the full list of all classes/namespaces that are included by opening up the Object Browser when you create a new Silverlight application using Visual Studio.

When to use Silverlight, ASP.NET, or both?

This depends on different scenarios.  Below are some common approaches:

    * Pure Silverlight.

      One approach is to completely remove ASP.NET, this solution works best if you\'re working on a new development. You only need to work on Silverlight, without any worry about integration problems. If you need to communicate with the server, you write web services, such as WCF. It will also help you when you need to port part of or the whole of your system to other hosting or even other platforms, since the client and the server are completely separate.

    * Major ASP.NET plus a Silverlight island.

      This approach is generally used when the Silverlight content and the ASP.NET content have little relationship. For example, an ASP.NET blog engine with a Silverlight media player in a blog post. This approach is very easy to implement, and allows you to reach the broadest audience. For example, if a user hasn\'t installed Silverlight, he can still read the blog posts, but he can\'t watch the videos.

    * Use ASP.NET AJAX instead of Silverlight

      ASP.NET AJAX is designed to work with ASP.NET. It is mainly an extension to ASP.NET. While AJAX can\'t provide you the advance user experience that Silverlight can, for many scenarios, it should be sufficient. This approach also helps if you have strong ASP.NET experience, but are still quite new to Silverlight.

      Within this approach, there are two branches. One is to mix the client and server code by using UpdatePanel, AJAX Control Toolkit, and etc.  The other method is to take the pure AJAX approach, where you write html and JavaScript instead of using Server Controls, and call web services to communicate with the server. The former branch is easier to implement, especially if you have strong ASP.NET experience, but lack JavaScript knowledge. The latter branch proves to be better in architecture when you want to port the AJAX application to other technologies such as Silverlight.  Especially since you only need to rewrite the client side code, and can keep the web services as they are. The programming model for the later branch is similar to Silverlight. Therefore, this approach is rarely taken if you\'re experienced in Silverlight.

    * Mix Silverlight with ASP.NET.

      More often, you may want to port an existing ASP.NET application to Silverlight, but you don\'t want to completely rewrite the entire application. This is the most difficult approach since you\'re mixing client side and server side technologies.

Before going with this approach, please consider if the above approaches can solve your problem. Ask yourself the following questions:

   1. Do you really need a rich interactive user experience?    

      This is normally a requirement for consumer oriented applications, but for most business applications, you only need a \"good\" user experience, which AJAX is sufficient to provide.

   2. Can you add Silverlight islands to your existing ASP.NET application instead of mixing the contents? 

      This should work for most scenarios. For example, Windows Live Mail is built in ASP.NET, with a few Silverlight islands, such as a slide show program that allows you to view photo attachments with enhanced experience (actually most Microsoft created web applications takes this approach). 

What are the new features of Silverlight 4?

   1. Printing Support

   2. Design implication

   3. Support WebCam / Microphone

   4. RichTextArea Control

   5. Events right mouse button

   6. Access to the Clipboard

   7. Support UDP / multicast network

   8. Hosting Silverlight in HTML 4

   9. Brush HTML

  10. Access to Local Files

  11. ViewBox

  12. Support for Google Chrome

What is the Silverlight official name?

Silverlight was formerly code-named \"WPF/E.\"

Can I consume WCF and ASP.NET Web Services in Silverlight?


What are the design files and the code-behind files in Silverlight?

The user interface elements of Silverlight applications are defined in XAML files. The logic and functionality of Silverlight applications is implemented using managed code-behind files that share the same class with the XAML file.

How does XAP work?

Once you have created the .xap file (explained below), the Silverlight 2 plug-in downloads the file and runs it in a separate work space.

What are the different ways to display text with Silverlight?

Silverlight supports displaying static preformatted text that is comprised out of glyph elements and also dynamic text that uses TextBlock. With glyphs, one needs to position the characters individually while TextBlock supports simple layout.

Will Silverlight support all the codecs Windows Media Player supports?

Since Silverlight is a lightweight cross-platform technology, it only carries the most common codecs that are needed for Web playback. However, we are gathering information from customers about the needed codecs and can update Silverlight when necessary.

Is Silverlight free?

Yes, Microsoft has made the Silverlight browser plug-in freely available for all supported platforms and browsers.

When would a customer use Silverlight instead of ASP.NET AJAX?

Silverlight integrates with existing Web applications, including ASP.NET AJAX applications. Consequently, ASP.NET AJAX and Silverlight are designed to be complementary technologies. In the broader sense, Silverlight can talk to any AJAX application, both client-side and server-side. ASP.NET AJAX can additionally be used to control Silverlight-based visualization of data or delivery of rich experiences. Examples might include mapping applications or video playback with rich presentation.

What is Downloader Object in siverlight?

SilverLight exposes an object named Downloader Object which is used to download content, like scripts, media or other data, as required by the application.

What happens if we press F5 in Visual Studio to run a Silverlight Application?

The following happens if we press F5 in Visual Studio to run a Silverlight Application.

a)A new folder is created in website project.(It happens only first time)

b)The name of the folder is Clientbin.

c)The folder contains the packages with .xap extension.

What is story Board in Silverlight?

A Storyboard in the Silverlight is a container where we can put animation objects. We need to make the Storyboard a resource that is available to the objects that we want to animate.

What are the main components of Silverlight application?

the main component of Silverlight application.

a)Input:  It handles input from devices like keyboard, mouse etc.

b)UI core: It manages rendering of bitmap images, vector graphics, text and animations.

c)Media: It handles the playback of MP3, WMA Standard, WMV7, WMV8 streams.

d)XAML: This manages UI layout to be created by XAML markup language

What is Silverlight Tool Kit?

Silverlight Tool kit is nothing but is a collection of Silverlight Tools, Components etc. It includes source code describing the all you need to develop an application.

Can I add more than one .xaml pages in silverlight application?

Yes, you can have multiple .xaml files in a single project.

In the App.xaml, in the method Application_Startup you can choose, which page you want to initially display.

Is Silverlight supported on various locales?

Silverlight installs on localized versions of Macintosh computers and Windows. At this time, the installation is available in an international English format. Final releases will render international text (using double-byte characters) and support the full 64K Unicode character set. Silverlight uses simple input mechanism that treats all the languages in the same way.

Silverlight Subjective Questions And Answers