Click here to Skip to main content
15,888,096 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi teams.

I don’t have much more experience on Sliverlight. Just I work 1 year on Sliverlight with multi xap architecture, I have confusion on How to choose right Sliverlight Architecture/pattern and Template.

Please go through the below lines…

We are migrate our asp.net web application to Sliverlight 4.0/5.0 i.e. we are developing the same application in Sliverlight from scratch .This web application has around 50+ pages with business logic is in class library , Data Access layer is also class library using ADO.Net and database as Sqlserver.

For this New Development process
1. We can use DAL layer as Ado.net Class library / ADO.Net Entity Farm work.
2. BAL needs to convert to WCF.
3. UI is Sliverlight.

When we focus on Sliverlight UI part we face a lot of confusion about “How to choose Sliverlight Architecture/pattern and Template” and which is the right one for us.

The suggested approaches are.
For a Single page single xap i.e. per page one project.
o Advantages
1. Overall xap size is reducing.
2. Page loaded quickly.
3. Good performance.
o Disadvantages
1. Difficult to maintain number of xap.
2. Difficult to give master page look and fill.
3. Difficult to pass parameter from page to page (only with query string, Isolated Storage not suggested.)

For a Single xap for project.
1. Advantages
i. Easy to Provide master page look and fill.
ii. Pass parameter from page to page (With query string, Isolated Storage, public property).

o Disadvantages
 Difficult to maintain State of application (i.e. state management) as this type of application has one entry point from APP.xaml if user Referees the page the state up page is loaded.
 Overall xap size is Increase.
 Performance point of view not so good.

Module wise xap for project (XAP on demand).
o Advantages
1. Provide master page look and fill.
2. Pass parameter from page to page (With query string, Isolated Storage, public property).
3. Performance point of view it is better than single xap.

o Disadvantages
 Difficult to maintain State of application (i.e. state management) as this type of application has one entry point from APP.xaml if user Referees the page the state up page is loaded.
 Overall xap size is Increase.

Sliverlight Template
As Microsoft provide three Templates for Sliverlight development, so which is the right one.
o Sliverlight Application
o Navigation Application
o Business Application.

Design Patterns:
o MVVM
o Prism
o Others.

If I have any mistakes please excuse me.
Your support/suggestions is highly appreciated and welcome...........
Thank's
Prasanta Kumar Pradan
Posted
Comments
Mycroft Holmes 30-Nov-11 2:19am    
And for this you want a Quick Answer - I suggest you post this in the Design forum where it can better be discussed.

Hello Prasanta

Well as I understood from your query ,you have some concern over Silverlight architecture .Let me clear you on start that there are numbers of options available and patterns too but whatever you choose it must be considering your resources available either Time ,Knowledge , Requirements or all.

Allow me to comment on your mentioned points and assuming various factors:

1 )whether it will be a complete rewrite or you intend to implement some of the existing framework with in Silverlight project. Because if you are going to use Entity Framework and WCF RIA Service i feel most of the existing set of code will be of no use mostly,ADO.Net DAL ,as most of the things are going to be handled by it .

If you are planning to use the existing DAL and Expose the results via WCF Service, then there is no use of EF.



2) The next major concern you have is over the SL patterns and practices. MVVM is a pattern while Prism is a composite application framework which comes with its own set of assemblies and concepts called Region,shell etc... Prism meant for complex and large applications with various teams collaborating each other and changes to the application are very frequent. But It does comes with its own overhead.

On the contrary MVVM pattern is recommended for standard application as it leverages the full feature of SL programming model.

But major portion of your post describes advantage and disadvantage of having single or multiple XAP files. Let me tell you that, the Single XAP file per Page / a Single XAP for whole application, both will not work in case of project of size like yours. So you have to split your application. For this Reason MEF (Managed Extensibility Framework) is best .By the way Prism is based on MEF .

If you want to compare PRISM and MVVM in one word then i feel, MVVM addresses Separation of Concern and PRISM address Modularity.

Also I will suggest you to have a look at Enterprise Library for Silverlight.

3) The Template is not a major concern as Navigation Template implements an additional Navigation Framework over Silverlight Application Template. And Business Template is for WCF RIA based.



I hope I could have suggested you a straight answer but it's not possible to do so.

Hope this will help you .

Thanks

Manas
 
Share this answer
 
I would suggest you don't keep the xap file size too big.
Break it into smaller pieces as download time is always important for the client.

Using Prism with MVVM could be a good strategy to go forward for line of business applications.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900