by bartczernicki@gmail.com via Silverlight Hack on 1/22/2011 10:05:00 AM
Astract: This article will show you how you can take advantage of the Silverlight architecture for easy deployment to web parts and easy client communication (intra web parts). This article will amplify why Silverlight is still the technology of choice if you want to create modular functionality deployed as web parts into custom or SharePoint portals.
A few months ago Microsoft made the announcement that they are "repurposing" Silverlight from a general web technology in favor of HTML5. They have backtracked a bit from this statement and have made statements like Silverlight has some "sweet spots" in line of business (LOB) applications. Microsoft does a very poor job of defining these sweet spots and what they are.
Silverlight being a web browser plug-in offers some really nice deployment and integration capabilities; one of them being SharePoint and web parts. This allows you to deploy Silverlight applications to existing custom portals, SharePoint 2003-2010 servers or other web part architectured sites with little/no additional code. In my opinion this makes the Silverlight architecture very attrictive for intranet line of business applications.
Note: Additional details on this topic is provided in my new book "Silverlight 4 Business Intelligence", where I dedicate an entire chapter to Silverlight web parts. In the book you will see step by step instructions and code samples for the scenarios outlined below.
Silverlight as a Portable Web Part Module
Silverlight applications (XAP files) can be easily made into web part by simply surrounding the Silverlight application with a "web part wrapper". This technique can be implemented via a ASP.NET Web Part interface, SharePoint 2003/2007 web part interface (deprecated) or the new SharePoint 2010 Silverlight Web Part.
Hosting Silverlight in web parts is as simple as "rendering" the XAP package inside the web part.
Lets take a look an example of how to host an existing Silverlight application in a SharePoint 2010 portal using the new Silverlight web part. SharePoint 2010 includes a new "Silverlight Web Part" which does exactly this.
SharePoint 2010 includes the "Silverlight Web Part" in the "Media and Content" section.
As long as the SharePoint 2010 server can access the URL location of the XAP file, you host the Silverlight application as a web part. This means that SharePoint can host Silverlight content as a web part from a:
// In the receiving application:
LocalMessageReceiver messageReceiver = new LocalMessageReceiver("receiver");
messageReceiver.MessageReceived += new EventHandler<MessageReceivedEventArgs>(receiver_MessageReceived);
try{messageReceiver.Listen();}
catch (ListenFailedException)
{MessageBox.Show("Cannot receive messages." + Environment.NewLine +"There is already a receiver with the name 'receiver'.","LocalMessageReceiver", MessageBoxButton.OK);}
// In the sending application:
LocalMessageSender messageSender = new LocalMessageSender("receiver");messageSender.SendCompleted += new
Original Post: Maximizing your Silverlight LOB investment with Web Parts
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.