views:

46

answers:

1

Hi,

Is it good idea to use WCF to connect to SQL server in my silverlight application?

This communication layer deals only with the database (SQL Server) and will return a large dataset most of the time. I am trying to speed up my silverlight application. I was using aspx pages and the client wants something flashier and faster.

Any recommendation? AM i on the right track? I don't to be changing long down the track.

Thanks

A: 

Why not RIA services?

http://www.dotnetscraps.com/dotnetscraps/post/Silverlight-and-NET-RIA-Services-Step-By-Step.aspx

Regarding, the large dataset... it is never good to return large datasets. If you start with a large dataset assumption, ultimately everything that you build on top of it will have issues. Remember that anything about 85KB in .NET goes on to the Large Object Heap, which eventually fragments it.

Rahul Soni
Why do you suggest RIA instead of WCF layer?How's it better in terms of performance? Regarding the large dataset, I have to do that so it display a list of information to be displayed in the datagrid. If not, what's your suggestion without using dataset? I have return a collection of something?
overule
I am not saying that WCF shouldn't be used. But for most of the stuff, you could use RIA, since it would take care of a lot of plumbing. A few days ago, I was under a similar dilemma and was thinking if there is any potential bottleneck that I can face with RIA. http://stackoverflow.com/questions/3832016/what-are-the-pitfalls-of-using-net-ria-services-in-silverlight. Regarding the dataset, use it... but use it with caution. Use Filters, Paging, and everything else that helps. Planning for that huge dataset is the key.
Rahul Soni
Cheers! I will go with WCF since it gives me more control over RIA.Time will tell if i make the right decision.Any more feedback from other developers?
overule