Oct 24, 2007

Talking to the Outside World from Silverlight 1.1: An Introduction

(This post is basically a recap of the introduction part of my REMIX 07 Boston Talk )

Silverlight applications run in the user's browser. We all know about the rich graphics and interactivity that Silverlight provides. But any real-world application will, at some point, need to communicate with the "outside world".

This interaction can take many forms. The simplest one (at least from a developer's point of view) is accessing media from some remote server: you can display an image or play a video from any URL. This capability exists even in the 1.0 version of Silverlight. However, it is limited to only certain types of data - images, videos and sounds.

The next step up is being able to work with arbitrary blobs of data and then write code to make sense of them. In 1.0, your only option was to use JavaScript on the page that hosts your Silverlight control. You could use standard AJAX techniques: use XmlHttpWebRequest to GET any data from some HTTP location and then use JavaScript to adjust your Silverlight graphics accordingly. You could also POST any data to some HTTP location.

In 1.1, there is no need for external JavaScript - you can use the BrowserHttpWebRequest .NET class (a subclass of HttpWebRequest) directly from your Silverlight application to issue GET/POST requests with a Stream of bytes.

But what if you want to work with more than just bytes? Most data has some structure to it: You may be receiving data in XML or JSON format that you will want to parse, or getting an RSS feed that you want to process and then display, or you may be talking to a SOAP service that actually describes its structure using metadata. In other words, you are not just working with bytes but with products, search results or high scores - data that matters to your app. The data may come from a service you yourself create, or from some "mashup-friendly" source like Flickr or Facebook.

This is exactly the problem I am working on within the overall Silverlight effort, and what many of the posts here will be about - how do we make it easy to work with structured data - that is, how do you consume "services" (in the widest sense of the word)? Watch this blog to discover what is planned in this space, and of course leave comments if you have any ideas or feedback!

I should note that most of the information here will be about SL1.1. In the existing SL1.0 (and in 1.1 as well of course) you can use all of the usual AJAX techniques as I already mentioned. In fact, Fritz Onion did a great talk at REMIX on integrating Silverlight 1.0 with ASP.NET AJAX - you can do some pretty powerful things with this combination - check out the Channel9 videos (Parts 1 2 3 4) and sample code.

56 comments:

Anonymous said...

網頁設計,網頁設計公司,最新消息,訪客留言,網站導覽
情趣用品,情趣用品,情趣用品
色情遊戲,寄情築園小遊戲,情色文學,一葉情貼圖片區,情人視訊網,辣妹視訊,情色交友,成人論壇,情色論壇,愛情公寓,情色,舊情人,情色貼圖,色情聊天室,色情小說,做愛,做愛影片,性愛

免費視訊聊天室,aio交友愛情館,愛情公寓,一葉情貼圖片區,情色貼圖,情色文學,色情聊天室,情色小說,情色電影,情色論壇,成人論壇,辣妹視訊,視訊聊天室,情色視訊,免費視訊,免費視訊聊天,視訊交友網,視訊聊天室,視訊美女,視訊交友,視訊交友90739,UT聊天室,聊天室,豆豆聊天室,尋夢園聊天室,聊天室尋夢園,080聊天室,080苗栗人聊天室,女同志聊天室,上班族聊天室,小高聊天室
AV,AV女優
視訊,影音視訊聊天室,視訊交友
視訊,影音視訊聊天室,視訊聊天室,視訊交友,視訊聊天,視訊美女,視訊辣妹,免費視訊聊天室
自慰器,自慰器

eda said...

101煙火,煙火批發,煙火工廠,製造浪漫煙火小舖,煙火小舖,衣蝶,衣蝶,情趣用品,情趣商品,情趣,情趣,衣蝶情趣精品百貨,衣蝶情趣精品百貨,煙火批發,情趣禮品,成人用品,T字褲,按摩棒,情趣內衣,情趣精品,情趣商品,情趣用品,情趣,情趣,真愛密碼情趣用品,真愛密碼,真愛密碼,真愛密碼情趣用品,貓裝,自慰器,性感內褲,角色扮演,丁字褲,,跳蛋,AV,丁字褲,煙火,情趣用品,情趣用品

Elk Grove California said...

Really great work. Congrats to everyone who are involved with this project. The website layout and graphics are really cool. Please come visit my site Elk Grove California when you got time.

Mesquite Texas Yellow Pages said...

Awesome! I have read a lot on this topic, but you definitely give it a good vibe. This is a great post. Will be back to read more! Please come visit my site Mesquite Texas Yellow Pages when you got time.

Fullerton California said...

I wanted to thank you for this great read!! I definitely enjoying every little bit of it :) I have you bookmarked to check out new stuff you post. Please visit my Please visit my blog when you have time Please come visit my site Fullerton California when you got time.

Fort Collins Colorado Yellow Pages said...

I am not much into reading, but somehow I got to read lots of articles on your blog.
Its amazing how interesting it is for me to visit you very often :)
Please come visit my site Fort Collins Colorado Yellow Pages when you got time.

Jacksonville Business Directory said...

I forgot about those! Maybe they look good w/ the right outfit? I didn't like skinny jeans when I first saw them. lol. Please come visit my site Jacksonville Florida FL when you got time.

Indianapolis Business Directory said...

I'm glad you're back to posting. I love reading about your shopping adventures and great finds. Your outfits are always super cute too! Very inspirational. Please come visit my site Indianapolis Business Search and give me any valuable feedbacks.

Kayla said...

Burberry polo shirt because of the warm clothing comfortable who gets gradually the favour of athletes idiosyncratic, again soon in the football players in the star girlfriend and music. Ed hardy clothes in Hollywood is a very popular brand hot. Want to wholesale handbags from online stores. Babolat aeropro drive Racquets is Nadal's babolat tennis racket used. In many places to be able to buy cheap tennis racquets. These cheap jacket are on sale now. the Puma basket will make you feel very relaxed when you play basketball. If you want to buy the Cheap puma shoes shoes ,you can buy them online. Burbrery Polos of in the future I’m sure. Many ed hardy shirtsdesigns are more or less the same with each other.

Kayla said...

The article written by your very good, I like it very much. I will keep your new article. This is my web site http://www.crazypurchase.com, we do China Wholesale, wholesale from china, buy products wholesale , China Wholesalers, who are interested, you are welcome to look at.

poll said...

Great tips. I am new to business, trying to visit more business blogs for guides and tips.
You can be friends with me. Please come visit my site Kansas City Yellow Page Business Directory when you got time. Thanks.

poll said...

Nice blog design. This seems like it would be a very interesting blog to keep up with. Please come visit my site St. Louis Yellow Page Business Directory when you got time.

Reality said...

Yeah it is a great and nice article looking forward to have such article it is so useful. Please come visit my site homegrown when you got time.

youth leadership development said...

I really liked your blog! You have some great content. Check out my blog and give me some feedback Please come visit my site executive development
when you got time.

life coach business said...

Well, nice article buddy… Someone will love to read this infor if I tell her about this. She’s really interested in this subject. Thanks again… Please come visit my site wellness coaching
when you got time.

starting a home based business said...

You may have not intended to do so, but I think you have managed to express the state of mind that a lot of people are in. The sense of wanting to help, but not knowing how or where, is something a lot of us are going through. Please come visit my site work from home opportunities when you got time.

contract management best said...

I am not really sure if best practices have emerged around things like that, but I am sure that your great job is clearly identifed. I was wondering if you offer any subscription to your RSS feeds as I would be very interested and can’t find any link to subscribe here. Please come visit my site contract management process give me any valuable feedbacks.

higher education said...

I really liked your blog! Please come visit my site college give me any valuable feedbacks

fashion accessories said...

Can you provide more information on this? I am new to the subject. Feel free to check out my site clothing when you got time.

poll said...

I found your site on google, great site, keep it up. Will return in the future. Submitted this post to Google News Reader. Please come visit my site migraine headache when you got time.

binge eating disorders said...

sorry to ask this here but… I really love your theme, would it happen to be a free one i can download somewhere, or is it a custom theme you had made? Soon i will be launching my own blog, however i’m not great with designs but i do like the style of your site so it would be excellent if i could find (or buy) something with a similar look as my last designer cannot finish my site. Thanks! Please come visit my site binge eating disorder when you got time.

telephone service said...

You may have not intended to do so, but I think you have managed to express the state of mind that a lot of people are in. The sense of wanting to help, but not knowing how or where, is something a lot of us are going through. Please come visit my site call when you got time.

answering services said...

I am not really sure if best practices have emerged around things like that, but I am sure that your great job is clearly identifed. I was wondering if you offer any subscription to your RSS feeds as I would be very interested and can’t find any link to subscribe here. Please come visit my site satellite give me any valuable feedbacks.

telephone company said...

I can see that you are putting a lot of time and effort into your blog and detailed articles! I am deeply in love with every single piece of information you post here. Will be back often to read more updates! Please come visit my site call when you got time.

Jewelry Wholesale Supplier said...

I enjoyed reading your work! GREAT post! I looked around for this… but I found you! Anyway, would you mind if I threw up a backlink from my site? Please come visit my site jewelry when you got time.

Wholesale Jewelry and Gifts Import said...

As a Newbie, I am always searching online for information that can help me. Thank you. Please come visit my site jewellery supply give me any valuable feedbacks.

rr8004 said...

This is just another reason why I like your website. I like your style of writing you tell your stories without out sending us to 5 other sites to complete the story. Please come visit my site Texas TX Phone Directory when you got time.

rr8004 said...

This is just another reason why I like your website. I like your style of writing you tell your stories without out sending us to 5 other sites to complete the story. Please come visit my site Memphis Yellow Page Business Directory when you got time.

rr8004 said...

What a facinating article. I’m looking for a marketing expert to help with a project, could you help? Please come visit my site Business Phone Directory of San Diego California CA when you got time.

rr8004 said...

What a facinating article. I’m looking for a marketing expert to help with a project, could you help? Please come visit my site American San Diego online business directory when you got time.

costume jewelry wholesale said...

Wow, loving the two photos you posted. You got potential. Please come visit my site organic jewelry when you got time.

wholesale baby giftperacr said...

I forgot about those! Maybe they look good w/ the right outfit? I didn't like skinny jeans when I first saw them. lol. Please come visit my site garden supply give me any valuable feedbacks.

Buying Or Selling A Home said...

I really liked your blog! Please come visit my site how to buy home give me any valuable feedbacks

Move House said...

Can you provide more information on this? I am new to the subject. Feel free to check out my site house moving and relocation tips when you got time.

Natural Remedy said...

Me and my friend were arguing about an issue similar to this! Now I know that I was right. lol! Thanks for the information you post. I would love some feedback on my siteHome remedies when you got time.

Children Health said...

What a blog filled with vital and important information this is .. It must have taken a lot of hours for you to write these yourself. Hats off from me for your hard work. Please come visit my site Children's health give me any valuable feedbacks.

rr8004 said...

Yeah it is a great and nice article looking forward to have such article it is so useful. Please come visit my site Corpus Christi Business Search Engine when you got time.

rr8004 said...

Yeah it is a great and nice article looking forward to have such article it is so useful. Please come visit my site CCorpus Christi Business Phone Listinge when you got time.

rr8004 said...

. Since I’m new to blogging, these articles are greatly appreciated; very useful and informative blog and every body must visit this blog. Please come visit my site Plano Business Services And Classifieds when you got time

rr8004 said...

. Since I’m new to blogging, these articles are greatly appreciated; very useful and informative blog and every body must visit this blog. Please come visit my site Plano Web Link when you got time

thomson said...

Organic weed control and lawn weed control guides and tips. Include gardening basic information and soil and composting resources.weed control

thomson said...

Garden Soil, soil testing, orgnic soil, plant soil basics and techniques online guide.soil testing

lilena said...

Beauty Schools And Cosmetology Schools, Beauty Careers and Cosmetology training online guide. Find out how to find the best cosmetologist schools, career and job descriptions of spa therapist, hair designer, makeup artist.cosmetology jobs salaries

lilena said...

Baby tooth decay, protect infants children's baby tooth. Children’s oral care tips and guikdes.give

thomson said...

Organic weed control and lawn weed control guides and tips. Include gardening basic information and soil and composting resources.lawn weed control

thomson said...

Endometriosis pain, treatment endometriosis, symptoms of endometriosis.symptoms of endometriosis

thomson said...

Online resources of toe fungus, fungus treatment, nail fungus toe. foot fungus

thomson said...

Potty training tips, baby potty training. Resource guide on how to potty train, potty training for boys and girls.potty training tips

rr8004 said...

Awesome! I have read a lot on this topic, but you definitely give it a good vibe. This is a great post. Will be back to read more! Please come visit my site Local Business Directory Of Louisville U.S.A. when you got time.

rr8004 said...

Awesome! I have read a lot on this topic, but you definitely give it a good vibe. This is a great post. Will be back to read more! Please come visit my site Louisville City Directory when you got time.

rr8004 said...

Excellent article , i just share it with my friend of Italy. I Stumble UP your blog post , you will notice an increase of traffic within 24 hours for targeted people. Cheers . Please come visit my site Directory Of Fresno when you got time.

rr8004 said...

Excellent article , i just share it with my friend of Italy. I Stumble UP your blog post , you will notice an increase of traffic within 24 hours for targeted people. Cheers . Please come visit my site Internet Business Directory of Fresno City when you got time.

rr8004 said...

Couldn't be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing! Please come visit my site Albuquerque Yellow Page Business Directory when you got time.

rr8004 said...

Couldn't be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing! Please come visit my site Local Business Directory Of Albuquerque U.S.A. when you got time.

rr8004 said...

Wow, loving the two photos you posted. You got potential. Please come visit my site Greensboro City Business Listings when you got time.

rr8004 said...

Wow, loving the two photos you posted. You got potential. Please come visit my site Greensboro Business Directory Forum Blog Classifieds when you got time.