Differentiate between ‘DataSet’ and ‘SQLDataReader’ in ADO.NET?
In this question the interviewer is expecting two points the first point is
dataset is a connect architecture and datareader is a disconnected architecture.
Let’s discuss both these points in detail.
Point 1:- ‘DataSet’ is a Disconnected Architecture while ‘DataReader’ is a
Connected Architecture.
In order to understand that, below is the sample code for ‘DataSet’ where you
can see even after calling the “ObjConnection.Close()” the ”Foreach Loop” is
still running. This indicates that the ‘DataSet’ works in Disconnected
Architecture.
Similarly, below is the sample code for ‘DataReader’ where you can see that
when “ObjConnection.Close()” is called then the “While Loop” does not execute
and throws an error. This indicates that the ‘DataReader’ works only in
Connected Architecture.
Point 2:- ‘DataSet’ is an in memory representation of database by itself whereas
‘SQLDataReader’ is a flat row and column.
Dataset is an in-memory database with database, tables, columns and rows.
While data reader is a flat table with just rows and columns
If you see the dataset object in your visual studio intellisense you should
see the complete object hierarchy as shown in the below figure.
If you see the ‘sqldatareader’ in intellisense , its flat table with rows and
columns as shown in the below image.
crud operations in silverlight using WCF service
Step 1:
Add WCF Service in your silver light project.
Step 2:
Create Instance of Webservice as follow
private void btnAddEmployee_Click(object sender, RoutedEventArgs e)
{
MyTASCParticipant1.EmployeeServiceClient proxy = new MyTASCParticipant1.EmployeeServiceClient();
proxy.AddNewEmployeeCompleted += new EventHandler<MyTASCParticipant1.AddNewEmployeeCompletedEventArgs>
(proxy_GetPeopleCompleted);
proxy.AddNewEmployeeAsync(“123123″, 83, 1, “Manoj”, “D”, “Sitapara”, “Add1″, “Add2″, “City”, “WI”,
“53718″, “a@a.com”, “1234567890″, “1234567890″, System.DateTime.Now, “M”, “159159854″, “365965″);}
void proxy_GetPeopleCompleted(object sender, MyTASCParticipant1.AddNewEmployeeCompletedEventArgs e)
{
MessageBox.Show(“Employee Data saved”, “Successful”, MessageBoxButton.OK);
}
How to create table using Gridview in Silvelright
<Grid x:Name=”grdLayoutRoot” Background=”White” >
<Grid.RowDefinitions>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition>
<RowDefinition Height=”30″></RowDefinition><RowDefinition Height=”30″></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=”104″></ColumnDefinition>
<ColumnDefinition Width=”208″></ColumnDefinition>
<ColumnDefinition Width=”104″></ColumnDefinition>
<ColumnDefinition Width=”208″></ColumnDefinition>
</Grid.ColumnDefinitions>
<sdk:Label Grid.Column=”0″ Grid.Row=”0″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”FirstName” VerticalAlignment=”Top” Content=”First Name” />
<sdk:Label Grid.Column=”0″ Grid.Row=”1″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”MiddleName” VerticalAlignment=”Top” Content=”Middle Name” />
<sdk:Label Grid.Column=”0″ Grid.Row=”2″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”LastName” VerticalAlignment=”Top” Content=”Last Name” />
<sdk:Label Grid.Column=”0″ Grid.Row=”3″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”Address1″ VerticalAlignment=”Top” Content=”Address 1″ />
<sdk:Label Grid.Column=”0″ Grid.Row=”4″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”Address2″ VerticalAlignment=”Top” Content=”Address2″ />
<sdk:Label Grid.Column=”0″ Grid.Row=”5″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”City” VerticalAlignment=”Top” Content=”City” />
<sdk:Label Grid.Column=”0″ Grid.Row=”6″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”State” VerticalAlignment=”Top” Content=”State” />
<sdk:Label Grid.Column=”0″ Grid.Row=”7″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”ZipCode” VerticalAlignment=”Top” Content=”Zip Code” />
<sdk:Label Grid.Column=”0″ Grid.Row=”8″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”EmailAddress” VerticalAlignment=”Top” Content=”Email Address” />
<sdk:Label Grid.Column=”0″ Grid.Row=”9″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”HomePhone” VerticalAlignment=”Top” Content=”Home Phone” />
<sdk:Label Grid.Column=”0″ Grid.Row=”10″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”MobilePhone” VerticalAlignment=”Top” Content=”Mobile Phone” />
<Button x:Name=”btnAddEmployee” Width=”100″ Height=”30″ Content=”Add Employee” Grid.Column=”1″ Grid.Row=”11″ HorizontalContentAlignment=”Center” HorizontalAlignment=”Left”></Button>
<TextBox Height=”23″ Name=”txtFirstName” Width=”173″ Grid.Column=”1″ Grid.Row=”0″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtMiddleName” Width=”173″ Grid.Column=”1″ Grid.Row=”1″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtLastName” Width=”173″ Grid.Column=”1″ Grid.Row=”2″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtAddress1″ Width=”173″ Grid.Column=”1″ Grid.Row=”3″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtAddress2″ Width=”173″ Grid.Column=”1″ Grid.Row=”4″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtCity” Width=”173″ Grid.Column=”1″ Grid.Row=”5″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtState” Width=”173″ Grid.Column=”1″ Grid.Row=”6″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtZipCode” Width=”173″ Grid.Column=”1″ Grid.Row=”7″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtEmailAddress” Width=”173″ Grid.Column=”1″ Grid.Row=”8″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtHomePhone” Width=”173″ Grid.Column=”1″ Grid.Row=”9″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtMobilePhone” Width=”173″ Grid.Column=”1″ Grid.Row=”10″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<sdk:Label Grid.Column=”2″ Grid.Row=”0″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”DateOfBirth” VerticalAlignment=”Top” Content=”Date Of Birth” />
<sdk:Label Grid.Column=”2″ Grid.Row=”1″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”Gender” VerticalAlignment=”Top” Content=”Gender ” />
<sdk:Label Grid.Column=”2″ Grid.Row=”2″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”SocialSecurity” VerticalAlignment=”Top” Content=”Social Security#” />
<sdk:Label Grid.Column=”2″ Grid.Row=”3″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”EmployeeID” VerticalAlignment=”Top” Content=”Employee ID” />
<sdk:Label Grid.Column=”2″ Grid.Row=”4″ Height=”18″ HorizontalAlignment=”Left” Margin=”10,8,0,0″ Name=”Group” VerticalAlignment=”Top” Content=”Group” />
<TextBox Height=”23″ Name=”txtDateOfBirth” Width=”173″ Grid.Column=”3″ Grid.Row=”0″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtGender” Width=”173″ Grid.Column=”3″ Grid.Row=”1″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtSocialSecurityNumber” Width=”173″ Grid.Column=”3″ Grid.Row=”2″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtEmployeeID” Width=”173″ Grid.Column=”3″ Grid.Row=”3″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
<TextBox Height=”23″ Name=”txtGroup” Width=”173″ Grid.Column=”3″ Grid.Row=”4″ HorizontalContentAlignment=”Left” HorizontalAlignment=”Left” />
</Grid>
</UserControl>
Return list in WCF Using LINQ
First Create MyEmployee.CS class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;namespace WcfService1
{
public class MyEmployee
{
public string FirstName;
public string LastName;
public string BirthDate;
}
}
Got o IService1.cs File
[ServiceContract]
public interface IService1
{
[OperationContract]
List<MyEmployee> GetCustomersList();
// TODO: Add your service operations here
}
Now, Go to Service.svc.cs File
NorthwindDataClassesDataContext db = new NorthwindDataClassesDataContext();
public List<MyEmployee> GetCustomersList()
{
return (from v in this.db.Employees
select new MyEmployee
{
LastName = v.LastName,
FirstName = v.FirstName,
BirthDate=v.BirthDate.ToString()
}).ToList();
}
Working with WCF RIA Services in Silverlight
As Silverlight application presentation tier exists on the client side, WCF RIA Services helps us to easily build N-tier RIA application by bridging the gap between the presentation tier and the middle or data tier. WCR RIA Services is a technology built upon WCF.
(More about WCF RIA Services - here)
How to create a WCF RIA application that supports data filteration and paginations.
This article is the continuation of my last article in Silverlight controls series, read last article here.
Get 500+ ASP.NET web development Tips & Tricks and ASP.NET Online training here.
To create WCF RIA Service application, we need to follow below steps.
1. File > New Project > Select “Silverlight Business Application”, write name of the application, specify path and click OK

You should see two projects created (I had given the project name as RIABusinessApplication so I have another project added calledRIABusinessApplication.Web apart from RIABusinessApplication).
All these projects should have pre-written code that is ready to be tested.
2. Run it and you should see the sample application created for you.

3. Add ADO.NET Entity Framework in the .Web project.

My solution structures look like below.

4. Build your project.
5. Add a Domain Service Class in the .Web project. My domain service class name is DomainServiceClass.cs
In the Dialogue box, check Enable client access checkbox, select the DataContext of the ADO.NET Entity Framework you just added from the DropDown and click the Table name checkbox. Also select the Enable Editing checkbox, that allows you to perform CRUD operation through WCF RIA Services. Click OK.

6. Have a look at the Domain Service class just created and you should see all the relevant method for the table you had selected that allows you to perform CRUD operation.
7. Go to the Views folder of the BusinessApplication project and and add a new Silverlight page (PersonalDetailPage.xaml).
<navigation:Page xmlns:sdk=”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk” x:Class=”RIABusinessApplication.Views.PersonalDetailPage” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” mlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ mc:Ignorable=”d” xmlns:navigation=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation” d:DesignWidth=”640″ d:DesignHeight=”480″ Title=”PersonalDetailPage Page” Style=”{StaticResource PageStyle}”><Grid x:Name=”LayoutRoot”><ScrollViewer x:Name=”PageScrollViewer” Style=”{StaticResource PageScrollViewerStyle}”><StackPanel x:Name=”ContentStackPanel” Style=”{StaticResource ContentStackPanelStyle}”><TextBlock x:Name=”HeaderText” Style=”{StaticResource HeaderTextStyle}” Text=”{Binding Path=Strings.PersonalDetailTitle, Source={StaticResource ApplicationResources}}”/></StackPanel></ScrollViewer><StackPanel><sdk:DataGrid x:Name=”DataGrid1″ AutoGenerateColumns=”True” /><Rectangle Width=”250″ Height=”10″ Fill=”Black”/><sdk:DataGrid x:Name=”DataGrid2″ AutoGenerateColumns=”True” /><sdk:DataPager PageSize=”3″ x:Name=”DataPager1″ /></StackPanel></Grid></navigation:Page>
8. Copy-paste the code from Home.xaml file into the newly created xaml file so that the existing layout will be maintained. You may like to add the Title in the Page directive. (My new page xaml code looks like above)
9. You may like to add a new item into Assets > Resources > ApplicationSettings.resx for the HeaderText of the newly created .xaml file. Change this file (Binding Path …) accordingly so that this page will have the header text what you have kept into the .resx file.

10. Now drag-drop a DataGrid from the toolbar and give a name and make sure that AutoGenerateColums is true. (Displayed in the above code snippet)
11. Go to the Code behind of the newly created .xaml file and refer the .web project (Do not be surprised, you will be able to add the reference of the web project here).
using RIABusinessApplication.Web;
using System.Windows.Data;
12. If you see all the files/folder of the Business Application project by clicking on Show All Files icon from the Solution, you will notice that you have Generated_Codefolder with some .cs file

13. Now go to the Domain Service class (in my case DomainServiceClass.cs) and update few lines of code to support data filtration and paging.
// TODO:
// Consider constraining the results of your query method. If you need additional input you can
// add parameters to this method or create additional query methods with different names.
// To support paging you will need to add ordering to the ‘PersonalDetails’ query.
public IQueryable<PersonalDetail> GetPersonalDetails()
{
returnthis.ObjectContext.PersonalDetails.OrderBy(p => p.FirstName);
}
public IQueryable<PersonalDetail> GetPersonalDetailsByFirstName(string firstNameStartsWith)
{
returnthis.ObjectContext.PersonalDetails.Where(p => p.FirstName.StartsWith(firstNameStartsWith));
}
In the first method we are sorting the collection to enable paging and in the second method we are filtering the records whose first name starts with a certain character.
14. Now write following code in the Code behind of the newly created .xaml file.
public PersonalDetailPage()
{
InitializeComponent();
this.Loaded += newRoutedEventHandler(PersonalDetailPage_Loaded);
}
void PersonalDetailPage_Loaded(object sender, RoutedEventArgs e)
{
DomainServiceClass context = newDomainServiceClass();
DataGrid1.ItemsSource = context.PersonalDetails;
context.Load(context.GetPersonalDetailsByFirstNameQuery(“S”));
DomainServiceClass context1 = newDomainServiceClass();
PagedCollectionView view = newPagedCollectionView(context1.PersonalDetails);
DataGrid2.ItemsSource = view;
DataPager1.Source = view;
context1.Load(context1.GetPersonalDetailsQuery());
}
Where DomainServiceClass is the context created under .web.g.cs file.
15. Now go to MainPage.xaml file and add a Link for the newly created .xaml file. You will to copy-paste the HyperLinkButton control and change accordingly.
<Rectangle x:Name=”Divider2″ Style=”{StaticResource DividerStyle}”/>
<HyperlinkButton x:Name=”Link3″ Style=”{StaticResource LinkStyle}”
NavigateUri=”/PersonalDetailPage” TargetName=”ContentFrame” Content=”{Binding Path=Strings.PersonalDetailTitle, Source={StaticResource ApplicationResources}}”/>
16. Now run the application. You should see the output something like this

Notice that in the above picture we have first GridView that has filtered records and the second GridView that has paginated records.
Hope this article was useful. Thanks for reading and hoping that you liked it.
Choosing a Data Access Layer for Silverlight 3
The three major candidates in Silverlight 3 are Web Services (WCF/ASMX), ADO.NET Data Services and RIA Services. In any situation, any of these will work. But they are suited to different styles and requirements. Here’s the abridged differences between the stacks:
- Web Services: Interface-based Data Access
- ADO.NET Data Services: LINQ-based Data Access with change management
- RIA Services: Interface-based Data Access with change management
Let’s dive deeper into explaining these differences and why that might matter.
Web Services
Using web services is the tried and true method for communicating across the firewall. This pattern is well known and reliable. In general this requires you specify an interface for the CRUD operations as separate operations on a web service then dutifully call them in your Silverlight code.
Reasons to Use: Any existing investment in web services can be a great reason to use them (whether in code or skillset). Also, web services are often used in cases where a project wants a very close control over the flow from the application to the database.
Reasons to Avoid: With web services you end up having to keep track of the changes yourself and know what services to call with updates. Any need for batching or transactional support gets cumbersome and code-intensive.
ADO.NET Data Services
ADO.NET Data Services is a simple REST-based facility for data access. It relies on the HTTP stack to help define the interface. GET calls become Reads, POST becomes Updates and so on. It uses ATOM or JSON for its serialization format so it is consumable by a variety of clients.
Underneath its covers it takes this URI based API and converts it into a LINQ call for GETs and to API calls to the provider for inserts, updates and deletes. That means that ADO.NET is a thin layer who’s purpose is to translate the URI model to data access code. But its better than that…
The real power of ADO.NET Data Services for Silverlight is the inclusion of the Client Library. This client library allows you to issue LINQ queries defined in the client and executed on the server. While the LINQ syntax is somewhat limited when compared to the server, it fulfills the 80% case and ADO.NET Data Services allows you to add operations to fill in the rest when necessary. In addition, the client library includes a powerful data context class that can monitor changes and issue changes in batches with transactional support.
Exposing your data access with ADO.NET Data Services is about exposing queryable end-points instead of defining an interface. This is what makes is unique. For example, we can query our service using a LINQ Query like so:
// Silverlight Code// Create the query using LINQvar qry = (<strong>from ginds.Games</strong><strong>where g.Price < 50m</strong><strong>orderby g.Name</strong><strong>select g</strong>)asDataServiceQuery<Game>;// Execute the Query// (This part is getting cleaner in ADO.NET Data Services v1.5)qry.BeginExecute(newAsyncCallback(r =>{games2.ItemsSource = qry.EndExecute(r).ToList();games2.DisplayMemberPath ="Name";}),null);
Reasons to Use: Want a simple, secure model where the developers can define the queries they need in code instead of changing the interface as the needs change. The ADO.NET Data Services’ client library makes the amount of code you write on the client small as it becomes LINQ calls and working with the context class.
Reasons to Avoid: When you want tight control over the interface to your data access and do not want developers issuing LINQ queries directly from the client code.
RIA Services
As the new kid on the block, RIA Services has a lot to offer. RIA Services is based on the idea of creating a data access API on the server and at the same time creating the client code in Silverlight (and other platforms in the future). Its focused on sharing code between the client and the server including validation logic. In addition, while it allows you to create a set interface, it also provides a context object which can monitor changes on the client and batch those changes back to the server. In some ways RIA Services is like a hybrid of Web Services and ADO.NET Data Services.
Because RIA Services is based on a server-side query defined in its interface, on the client we call the query by calling the call on the interface:
// Silverlight Code// The context object that tracks changesXBoxGamesContext ctx =newXBoxGamesContext();// Our RIA Query, really a call to an interfacevar qry = <strong>ctx.GetGamesByGenreQuery("Shooter");</strong>// Bind the datatheList.ItemsSource = ctx.Load<Game>(qry).AllEntities;
var riaQry = ctx.GetGamesQuery()<strong>.Where(g => g.Price < 50m)</strong><strong>.OrderBy(g => g.Name);</strong>LoadOperation<Game> op =ctx.Load<Game>(riaQry);
Reasons to Use: RIA Services is a good choice if you expect to develop a straightforward application minimum number of tiers. It works best in Rapid Application development scenarios versus large architected applications. RIA Services does support a mix between the interface based from Web Servics and and LINQ based querying that is supported by ADO.NET Data Services.
Reasons to Avoid: RIA Services leverages a lot of magic code generation to make it work and that is harder to debug than it should be. Integration with large enterprises is possible, its not as easy it as it should be.
“So Which Would You Suggest?”
While I paint this picture of data access in Silverlight with a broad brush, I still get the question to suggest one over the other. The fact remains that there isn’t a right/wrong answer here. A lot of it depends on the environment, project and skillset of the developers. So, no…I won’t tell you what I suggest because I don’t know the requirements and environment you work in. That’s why they pay you the big bucks to be a developer, right?
What is XAP file in Silverlight?
When you start learning Silverlight and create your first Silverlight application, one thing you will notice XAP file along with HTML and ASPX files. First time after running your Silverlight application you can see XAP file in client bin folder. Before running of Silverlight application, you will not find XAP file in client bin folder.
Usually below steps followed while running a Silverlight application.
- Create a Silverlight Application
- Compile it to IL.
- Packaged it to XAP file.
- XAP file hosted in web server.
- XAP file get downloaded to browser.
Flow diagram of a Silverlight application from creation to running at client browser can depicted as below,
If you notice whenever we are creating a new Silverlight application, you usually host Silverlight application in a new Web Site. This is the web site which will host the XAP file.
Every time you run Silverlight application, automatically visual studio creates the XAP file and deploy to the web site.
XAP file is basic deployment in Silverlight.
XAP file is a ZIP file. It contains many files needed to run Silverlight application at the client browser. There are many files contained in a XAP file.
Just to have a look what all files a XAP file contains,
- Right click XAP file
- Rename the extension from XAP to ZIP
- Un Zip the ZIP file. You will find below files inside XAP file
There is one more way to easily extract the entire XAP file. Follow the steps as below,
- Open Command prompt as administrator
- Type command as below
- Navigate to folder containing XAP file. On right click of XAP file you can find Extract All option.
After extracting XAP file on unzipping the Zip file, you can see there are at least two files
- Silverlight application dll
- AppManifest.Xaml file.
AppManifest.xaml file contains key information like,
- Version of Silverlight application is targeting
- Entry point of the application
- Name of the Silverlight application to be loaded
If you open AppManifest.xaml file, you will see above information are provided there. There is only one assembly of Silverlight application is listed in Deplyment.Parts section. If you have referred any other assembly in Silverlight application then information of that assembly will also be listed in Deployment.Parts section.
Algorithm how Silverlight application loads at client browser
Step1
HTML files gets loaded at client browser
Step2
Browser reads the HTML and finds the object tag and XAP file associated with object tag.
Step3
Browser downloads the XAP file using Silverlight plugin installed at browser.
Step4
Silverlight plugin reads the AppManifest.Xaml file and finds Entry Point of the application and minimum version of Silverlight application is targeting.
Step5
Application gets executed at client browser.
Size of the XAP file is vital factor in performance of Silverlight application.
For better performance we should try to have size of XAP file as low as possible. All the resource files, images and Videos should be downloaded asynchronously at client browser. We should put images and media files on the server.
