YOUR FEEDBACK
More on the Software Assembly Question - Do Design Patterns Help?
Yanic wrote: Hi, > UML and MDA are being changed to be more data and doc...
SOA World Conference
Virtualization Conference
$50 Savings Expire May 23, 2008... – Register Today!

SYS-CON.TV

2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
TOP THREE LINKS YOU MUST CLICK ON


How OpenSocial Complements Silverlight
"Thank you Google for making Silverlight better!"

Digg This!

Michael Scherotter's Synergist Blog

Over the weekend, my challenge was to learn about OpenSocial and create a Silverlight application that uses it. I did that, with this simple application. To take advantage of the OpenSocial implementation in Orkut sandbox, you have to create a Google Gadget with the OpenSocial feature, post the gadget on the Internet, and then add the URL of the gadget as an application. 

As I looked into the Google gadget API to build this, I found something interesting, the Google Gadget framework exposes the function _IG_FetchContent() that can be used to asynchronously fetch the text at any URL.  This is called cross-domain data access and if enabled in the browser, it opens up a very big security hole. One of the challenges in writing Silverlight applications that run in a secure browser sandbox is that they can't access data from a different domain. 

For example, if your site is http://blogs.msdn.com, your Silverlight client-side JavaScript can't get data from Web 2.0 services like Twitter at the URL http://twitter.com/statuses/friends_timeline/Synergist.xml and render it out in Silverlight.  To do this in Silverlight today, you have to either do some server-side code to create a bridge or proxy web service that routes the service on the server.  It isn't hard, but it's another step that you have to take, and the server-side code for a PHP website would be different than the code for an ASP.Net website.  I am told that the next version of Silverlight, 1.1, will have a better way of doing that. 

Mash-up and Gadget Frameworks

Other options are to use mash-up and gadget frameworks like Microsoft's Popfly, Yahoo! Pipes, or Google Gadgets that implement this cross-domain data access for you. 

Since OpenSocial applications in Orkut are based on Google Gadgets, it is possible for Silverlight OpenSocial applications in Orkut to take advantage of these Google Remote Content APIs to make cross-domain calls. This can be used to call Web 2.0 services or to composite your Silverlight application from XAML residing on various domains.  Where you would use Silverlight's Downloader object for same-domain data and services, you would use the _IG_FetchContent() and _IG_FetchXmlContent() to access data from external domains.  Here's how I've used it to download XAML from cross domains and populate the Silverlight Scene graph:

var m_root = null;

function OnLoad(sender, context, source)
{
  m_root = source;
 
  _IG_FetchContent("http://hosting.gmodules.com/ig/gadgets/file/
    113009390747258006757/OpenSocial.xaml
", GotXaml)
 
}

function GotXaml(xaml)
{
    var host = m_root.getHost();
    var canvas = host.content.CreateFromXaml(xaml);
   
    m_root.children.Clear();
   
    m_root.children.Add(canvas);
}

Now that's Synergy!

Thank you Google for making Silverlight better!

About Michael S. Scherotter
A developer evangelist for Microsoft's Communications Sector of North America, Michael S. Scherotter is based in the San Francisco Bay Area.

Michael S. Scherotter wrote: You can read more about Silverlight and OpenSocial on my blog at http://blogs.msdn.com/syn ergist.
read & respond »
netBear wrote: Does Flash work with OpenSocial?
read & respond »
SILVERLIGHT LATEST STORIES
3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
JavaOne 2008: Sun Talks Up its Late-to-the-Party AIR-Silverlight Rival
At Java One this week Sun has been selling its year -old-but-still-upcoming - and definitely late-to-the-party - Adobe AIR- and Microsoft Silverlight-competitive JavaFX Rich Client environment as a potential revenue-generator capable of putting ads on mobile applications and JavaFX Scri
AJAX World - Xceed Launches Microsoft Silverlight 2 Control
Xceed launched Xceed Upload for Silverlight, the commercial offering in support of Microsoft's promising new Silverlight technology. The product is available now for purchase or as a fully functional 45-day trial on Xceed's website. Xceed Upload for Silverlight lets developers add uplo
Microsoft To Keynote 4th International Virtualization Conference & Expo
Mike Neil is general manager for virtualization strategy in the Windows Server Division at Microsoft. Mike is focused on the delivery of the Windows virtualization technology, including Windows Server 2008 Hyper-V, Microsoft Hyper-V Server and Virtual PC 2007. Mike also directs the tec
AJAX World - Curl Launches Adobe AIR Competitor
Curl announced the beta release of Curl Nitro, the code name for an extension of the Curl Rich Internet Application (RIA) platform which offers enhanced desktop capabilities required by today's enterprises. The Nitro extension simplifies the process of installing and managing Curl appl
Is the Silverlight Adoption Rate Artificially Inflated?
Silverlight 2.0 is a freaking phenomenal RIA development environment and I would actually, at this point, put the development experience in Silverlight 2.0 above and beyond Flex. I can do more faster and have it look better and run more efficiently in Silverlight 2.0 than I can in Flex
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discu
JavaOne 2008: Sun Talks Up its Late-to-the-Party AIR-Silverlight Rival
At Java One this week Sun has been selling its year -old-but-still-upcoming - and definitely late-to-
AJAX World - Xceed Launches Microsoft Silverlight 2 Control
Xceed launched Xceed Upload for Silverlight, the commercial offering in support of Microsoft's promi
Microsoft To Keynote 4th International Virtualization Conference & Expo
Mike Neil is general manager for virtualization strategy in the Windows Server Division at Microsoft
AJAX World - Curl Launches Adobe AIR Competitor
Curl announced the beta release of Curl Nitro, the code name for an extension of the Curl Rich Inter
Is the Silverlight Adoption Rate Artificially Inflated?
Silverlight 2.0 is a freaking phenomenal RIA development environment and I would actually, at this p
Xceed to Embrace Microsoft's Silverlight in Upcoming Product
Xceed is poised to launch Xceed Upload for Silverlight, its offering in support of Microsoft's promi
Cynergy Selected by Microsoft for Global Agency Initiative
Cynergy Systems announced it has been selected by Microsoft to participate in the Microsoft Global A
Gomez Announces Web Performance Testing Support for Microsoft Internet Explorer 8
Gomez announced support for Microsoft's Internet Explorer (IE) 8 beta 1. Using the Gomez ExperienceF
Silverlight 2 - Adobe Flex Killer Is on Its Way!
Silverlight 2.0 kicks ass and I can't wait to start dropping more hardcore blog posts regarding it.
ADS BY GOOGLE
BREAKING NEWS FROM THE WIRES
Aplana Software Has Developed a New Web-Site for Russian TV Channel Sport Using Microsoft Silverlight Technology
Aplana Software, a Moscow based software services company and a member of I.T.Co Group,