Saturday, October 13, 2007

Hosting Silverlight Applications with Silverlight Streaming

Developing a Silverlight mini-application is not hard. There are excellent tutorials such as the QuickStarts series on Microsoft Silverlight web site. However, most Silverlight tutorials assume that you can deploy your multimedia Silverlight application to a web server that you have complete control over. What would you do if you don't have enough control over your web server on the Internet?

I ran into similar situation when I tried to deploy my Silverlight control in Google Blogger. Fortunately, after some Internet search, the following solution is found.

Microsoft offers Silverlight Streaming, a free hosting service that can solve this problem. All you need is a web page where you can place html and javascript code. The major parts of your Silverlight app will be hosted at http://silverlight.live.com/, including XAML files, media resources and javascripts. When your web page is displayed, your hosted Silverlight contents will be streamlined from the host to the client browser. Hence the name of the service is Silverlight Streaming.

The following steps describe what you need to do to get the Silverlight Streaming service work. I also included code snippets for a Silverlight mini-application that displays a smile as illustrating example.

Step 1.
Develop your Silverlight application with any existing development tools. At the time of this writing, Microsoft Blend 2 September Preview is my favorite one.

A typical Silverlight application will include

  • A .html web page to host the Silverligh plug-in control

  • A .xaml file to hold XAML script for display

  • .js files to hold javascript code


Not all of Silverlight application files will be uploaded onto the hosting service. Before uploading, test your Silverlight application locally to make sure it works as you expect.

Step 2.
Prepare a package to host your Silverlight application.
The package should have .zip format and includes the followings:

  • manifest.xml file to describe the contents of your package

  • The manifest.xml file for the example I developed will look like this



  • all .xaml files, javascript files required by your Silverlight application (excluding the Silverlight.js file containing Microsoft's Silverlight javascript code)

  • The Smile.xaml file for the example



  • all required media files (if any)

  • .html files should be excluded


The package used in my example contains only the XAML file and the manifest. Currently Microsoft Silverlight Streaming site is still at Alpha state only. The maximum size of the .zip package is set at 22MB. Hope that when it comes to release phase later, this limitation can be significantly improved.

Step 3.
Obtain your Silverlight Streaming account at http://silverlight.live.com
You will need a Windows Live ID to register for the Silverlight Streaming account. When registration succeeds, you will be given a public Account ID and a private Account Key to access the uploaded contents. Only the public Account ID will be needed in this example. Upload your Silverlight application package using "Manage Applications" section. All your uploaded applications can also be managed from there.

Step 4.
Create web pages that will display a Silverlight plug-in with your Silverlight application contents. You can copy the code snippets offered by Microsoft Silverlight Streaming service after uploading your application. Your Account ID will be already inserted into the code snippets properly.

If you can't modify the html header section of your web page, it will be fine if you inline all javascript code and html in the body of the page.

The resulting web page in my example will look as follows. Note that the call to

Silverlight.createObjectEx({source: "XAML_file", ...})

has been replaced by

Silverlight.createHostedObjectEx({ source: "streaming:/your_Account_ID/hosted_application_name", ...})



That's it! Just point your browser to the URL of your web page and enjoy your deployed Silverlight application.

Sunday, October 7, 2007

MOSS as Microsoft's top product in 2007

While there are still many debates going on around what is Microsoft's greatest product release in 2007, I strongly believe that Microsoft Office SharePoint Server (MOSS) could be the winner.

Here are my arguments to support this evaluation. The first one is from the point of view of system integration, and the last two ones are from software architecting and development perspectives.
  1. MOSS is a truely integrated collaboration environment. It brings into one place Enterprise Content Management (ECM), rich features for business management through built-in workflows and dashboards, and easy access to a variety of data sources with Business Data Catalog (BDC). Excel Services and InfoPath make MOSS environment even more tightly integrated with other products in Office 2007.

    Before MOSS the enterprise world is full of many ECM systems, both proprietary and open sources. With MOSS now including ECM and taking into account the large number of SharePoint users (up to 85 million licenses sold as Tom Rizzo said in his Foreword to the book "Essential SharePoint 2007", Addison-Wesley, 2007), it can be foreseen that ECM providers now face a strong competitor.

  2. MOSS is built on matured and new Microsoft technologies such as ASP.NET 2.0, web part frameworks and .NET 3.0. Customzing MOSS is now much easier than customizing SharePoint 2003. Everyone who worked with SharePoint 2003 knows how painful it is to introduce a custom branding to SharePoint 2003 deployment, or to make a SP2003 site internet-facing.

    It is easy to change the look-and-feel of MOSS portals with ASP.NET master pages. MOSS architecture also supports Internet-facing sites with non-Active Directory authentication mechanisms. Hawaiian Airlines and Glu Mobile’s Website are great real world success stories of MOSS sites presence on the internet.

  3. MOSS should not be approached like a shrinked-wrapped product. It fact, it has become a full-scale environment for enterprise computing. This environment comes with very strong out-of-box capabilities, such as the ones mentioned in section 1. above.

    However, MOSS also provides lots of support for third-party development within the environment. Imagine what we can achieve if we consider MOSS as a delivery channel where end-users can access their digital resources within a rich, customizable, web-based environment, with version control, BI elements. These digital resources can be processed outputs from other line-of-business applications. Full stand-alone packages or independent software applications may be built or re-architected to take into account MOSS capabiltities. For example, they can output their reports to MOSS document libraries or dashboards and let end users consume these outputs from there. MOSS can also be used to host the productivity-layer components as proposed by Microsoft in realizing composite applications by OBAs.

With these enhancements, MOSS bring more opportunities to system integrators and ISVs. They can offer services and products with MOSS in one of the following areas:

  1. Deployment and integration of MOSS into existing IT infrastructure.
  2. Development of MOSS web parts for rich business working contexts, or components to relialize the concepts of composite applications. Microsoft has already actively promoted Office Businesss Applications (OBA) in this direction.
  3. Re-architecting existing products with WSS or MOSS as the delivery channel. Again, Microsoft has spent lots of effort in this direction. Many serious products such as Microsoft Visual Studio Team System/Team Foundation Server and Microsoft Project 2007 already rely on WSS as an output environment. The latest release of Microsoft BI products (PerformancePoint Server 2007) also includes WSS 3.0 and MOSS components. While observing these products are gaining more popularity, many other software vendors may follow this approach.