开发者

How to load data to Silverlight? Json or WCF Service?

This question came to my head while working with a map in silverlight that displays some harbours, and after mouse_overing the harbour, its data gets displayed in the screen. I did it and now it works, using WCF service, but I 开发者_JAVA技巧get some big delays. My friend told me that maybe Json could handle better with this delay, but I have no idea. What should I do?


Are you doing WCF with binary encoding (custom binding) instead of XML (basichttpbinding)? That could save a lot of time.

http://www.mostlydevelopers.com/blog/post/2009/10/14/Silverlight-3-WCF-Binary-Message-Encoding.aspx

http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/05/silverlight-3-experimenting-with-wcf-s-binary-xml-encoder.aspx

Otherwise, json could be faster but I think the conversion must be done in last option. You certainly can (must) optimize either Server or Client code. For example : Are you returning only the needed Data or a whole object fully populated with list of childs you don't care?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜