SilverLights Interview Questions :

 
 
 
 Questions with Answers :
 
Ques: 1 
Is Silverlight supported on various locales?
Ans: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.
Ques: 2 
Can I add more than one .xaml pages in silverlight application?
Ans: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.
Ques: 3 
What is Silverlight Tool Kit?
Ans: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.
Ques: 4 
What are the main components of Silverlight application?
Ans: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
Ques: 5 
What is story Board in Silverlight?
Ans: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.
Ques: 6 
What happens if we press F5 in Visual Studio to run a Silverlight Application?
Ans: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.
Ques: 7 
What is Downloader Object in siverlight?
Ans:SilverLight exposes an object named Downloader Object which is used to download content, like scripts, media or other data, as required by the application.
Ques: 8 
When would a customer use Silverlight instead of ASP.NET AJAX?
Ans: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.
Ques: 9 
Is Silverlight free?
Ans:Yes, Microsoft has made the Silverlight browser plug-in freely available for all supported platforms and browsers.
Ques: 10 
Will Silverlight support all the codecs Windows Media Player supports?
Ans: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.
Ques: 11 What are the different ways to display text with Silverlight?
Ans: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.

Ques: 12 
How does XAP work? 
Ans: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.
Ques: 13 
What are the design files and the code-behind files in Silverlight?
Ans: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.
Ques: 14 
 Can I consume WCF and ASP.NET Web Services in Silverlight?
Ans:Yes
Ques: 15 What is the Silverlight official name?
Ans:Silverlight was formerly code-named "WPF/E."
Ques: 16 
What are the new features of Silverlight 4?
Ans:   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
Ques: 17 
 When to use Silverlight, ASP.NET, or both? 
Ans: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). 
Ques: 18 
Do I need to have the .NET Framework installed in order to use Silverlight?
Ans: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.
Ques: 19 
 What are the different Layout controls available in Silverlight Application?
Ans:three main controls that can be used for layout management in silverlight:

· Canvas Control

· StackPanel Control

· Grid Control
Ques: 20 
What is the difference between Silverlight and Flash?
Ans: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 doesn’t exist with Flash.
Silverlight 2 supports Socket communication too. Flash allows creating XML Socket object.







What are the graphics related features supported in Silverlight?
Use of graphics nowadays is common as more and more websites are started using lots of graphics in there web pages. Silverlight also supports most of the graphics design and provides lots of features such as:
- Draw 2D vector graphics such as rectangle, ellipse, and path, with fill and/or stroke.
- Brushes: SolidColorBrush, Linear/RadialGradientBrush, ImageBrush, VideoBrush.
- Opacity mask.
- Shape (supports mouse/keyboard events) and Geometry (lightweight).
- EvenOdd and Nonzero path fill rule.
- Affine transforms.
- Render bitmap images encoded with jpg and png.
- Ink and stylus devices.



Silverlight interview questions and answers

What is the cross domain/scheme/zone policy? How do I configure it?
Cross domain is the domain that is represented by a single domain name. Ex: www. Abc.com. If a Silverlight application is being hosted under one domain and the resources are being on another domain then it is considered as cross domain.
Cross Scheme consists of three types of schemes, which are as follows:
1. http
2. https
3. file
If the file is hosted under http or https or file scheme, then it is a cross scheme.
Cross Zone is browser specific and they differ browser to browser. You can find them in your browser’s security options.

How do I provide a cross domain policy file for a self-host WCF service?
It is quite easy to provide the cross domain policy file for self-host WCF services, but it requires programming to be done on the other side to do it. Example code:
ServiceHost host = new ServiceHost(typeof(Service1));
host.Open();
Console.Read();
host.Close();
&ltadd baseAddress="http://localhost:8731/Service1/" /> // base address
When you will call the service from the Silverlight application, you will get a cross domain issue which can be solved by putting the cross domain file in the same directory with the console .exe.

What are the restrictions of web service accessing in Silverlight?
Silverlight provides and supports lots of features but there are some restrictions as well, such as WS-Security and WS-Addressing are not supported. When working with the languages such as ASMX/JAVA/PHP, you need to see that you have SOAP 1.1 and WS-I Basic Profile 1.0. Silverlight only support GET and POST actions, others are not supported. It doesn’t have full http features also.



Silverlight interview questions and answers

What is the real advantage of using Excel/Word files or local database in Silverlight?
The real advantage of using Excel or World files or any local database in Silverlight is that it provides easy to manage features for store and fetching the data, which are frequently used by the applications. It doesn’t rely much on WCF services to provide the properties for data communication. The data is automatically fetched and saved in excel or word sheets for future references.

What are the advantages of Extensible Application Markup Language (XAML) over C# or VB.NET?
XAML is the language which is used with Silverlight. It is one of the growing languages that has lots of features and properties. The advantages of it over C# or VB.NET are that:
C# or VB.NET provide development by using coding whereas, XAML provides codeless development and provides lots of features to create complex user interface controls etc. It can also define an instance of class which is being already defined by C# or VB.NET.

Can you use any specific Patterns in Silverlight programming?
Yes, you can use any specific patters in Silverlight programming, as it provides Model-View or View-Model approach. This approach provides the provision to create loosely coupled application where the code is completely isolated from XAML. Prism which is a set of classes provided for development of such applications can also be used to provide more flexibility.

What is namescope in Silverlight?
Name scope in Silverlight stores the relationship between XAML and the objects which are being defined by the XAML, with their instance equivalents. Whenever, you create a new object, a new name scope will automatically be created. But, there is a problem in this, when name scope is being created for the dynamic objects, sometimes it causes an exception to occur or some kind of error.

Silverlight interview questions and answers

What types of security measures are provided with Silverlight?
Silverlight is Microsoft based technology and it come up with some security features, to make it secure to use and implement. For secure communication its applications makes use of WCF services and uses WCF security features. SSL (Secure Socket Layer) can be used for security mechanism to give the transport layer security.

Does Silverlight application supports desktop implementation?
Yes, Silverlight supports desktop implementation. Newer version of Silverlight provides out-of-browser facility, by using this feature it can be physically deployed on the local machine. Silverlight 4.0 supports OOB facility that enhances the communication with other applications like Word, Excel etc. and with the local database like MS Access etc.

Where is the Silverlight application present?
Silverlight application resides on the host computer where the ASP.NET is installed. It resides in the ASP.NET webpage, but it can be hosted on other HTML pages too, by using the extension .xap. Silverlight application is made available to the browser when a user makes a HTTP request to ASP.NET page.

What are the controls provided in Silverlight for Line-of-Business (LOB) applications?
Silverlight provides lots of applications for Line-of-Business (LOB) to have better communication among the elements and also to enrich the properties of the application. The controls which are being provided by the Silverlight are as follows:
- Data Grid: The representation of data in a grid form
- Data Form: Representation of data in a form
- Chart controls: Representation of data in chart forms and has additional functionality to display the controls for customization.



Silverlight interview questions and answers

What is the relationship between Silver Light, WPF and XAML?
Silverlight is used to read and render the user interface (UI) elements. XAML is a XML file that defines the user interface elements. This file is being read by the WPF framework. Microsoft developed WPF framework and then extended it to WPF/e, which helped the application to render user interface in the browser. Silverlight is being officially launched by Microsoft.

Explain SilverLight architecture?
Silverlight is a plugin that is provided by the Microsoft. Silverlight architecture includes the functionality from core .NET framework, Ajax and having some of its own functionality such as animation, media etc. The architecture consists of four blocks:
- .NET framework components: WPF is .NET framework, used in Silverlight.
- Presentation core: core presentation framework includes the display options such as images, vector animations etc.
- Other technologies: Ajax and JavaScript technologies are used to interact with Silverlight framework.
- Hosting: Silver-light animations run under the browser environment and it also provides lots of other application hosting programs.

What type of applications can be developed using Silverlight?
Silverlight is a plug-in, which can be used to develop web based or mobile based applications. Silverlight is used in those applications where you need to represent the graphics or the output should be in graphical format. Silverlight can be used in various types of Line-of-Business applications such as: Healthcare, Insurance, Logistics etc. One of the good example of its application is healthcare application.More.....>>

No comments:

Post a Comment