Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



Component One


rssbus
 


Component One

Reader rating:
Click here to read 2 comments about this article.
Article source: CoDe (2008 - Vol. 5 - Issue 2 - Windows Live )


Article Pages:  1  2 - Next >


Light Up the Web-Microsoft Silverlight Streaming by Windows Live

Microsoft® Silverlight™ Streaming by Windows Live™ is a free streaming and application hosting service for delivering rich interactive applications (RIAs) over the Web. In this article I’ll show you how to get started with Silverlight and how to upload your applications and rich media to the Silverlight Streaming Service.

In summer 2007, Microsoft released version 1.0 of Silverlight, a revolutionary way to build rich interactive experiences on the Web. Silverlight is a cross-platform, cross-browser plug-in that extends the browser’s Document Object Model (DOM) with vector graphics and multimedia features. Based on XML Application Mark-up Language (XAML), the same technique used in the Windows Presentation Foundation (WPF), Silverlight can be scripted with JavaScript and can work within AJAX-enabled Web pages.

"
It’s just as easy to deliver Silverlight experiences from PHP sites on Apache/Linux as it is from ASP.NET sites on a Windows Server.
"

Silverlight provides a consistent user experience with Firefox and Safari on the Mac and Firefox and Internet Explorer on Windows. Even Linux users can run Silverlight using Novel’s open-source Moonlight code.

In fact, you’re not locked into the Microsoft platform at all-it’s just as easy to deliver Silverlight experiences from PHP sites on Apache/Linux as it is from ASP.NET sites on a Windows Server.

Hello World in Silverlight

You need to install the Silverlight 1.0 runtime for your browser. The first time you visit a Silverlight enabled site like http://www.microsoft.com/silverlight, you'll be directed to an installation process. The runtime is surprisingly small (less than 2 MB) and is quick and painless to install.

I’ll start with a simple Silverlight “Hello World” demonstration.

Using XAML, define a Canvas that includes a TextBlock with the “Hello World” text and save this file as Hello.xaml (Listing 1).

Create an HTML page to host the Silverlight control; call it Default.html (Listing 2).

You must also provide two JavaScript files. Silverlight.js is part of the Silverlight SDK and CreateSilverlight.js is shown in Listing 3. CreateSilverlight is the code responsible for instantiating the Silverlight control with your XAML.

You should now have four files: default.htm, Hello.xaml, CreateSilverlight.js, and Silverlight.js. Launching default.htm in a browser runs the application (Figure 1).

Click for a larger version of this image.

Figure 1: Running the Silverlight Hello World application.

Silverlight Streaming

Microsoft has a software and service strategy and this is where the Silverlight Streaming by Windows Live service comes in-developers can deploy their Silverlight applications and rich media “in the cloud,” leveraging Microsoft’s high performance, high availability content distribution network.

While the product is in pre-release, storage and delivery is free up to 4 GB, with outbound streaming up to 700 Kbps. After release, developers will have continued use of the service with up to 1 million minutes of free video streaming at 700 Kpbs per site per month. Unlimited streaming will be available for free with advertising or, for a nominal fee, without advertising.

You can sign up for a free Silverlight streaming account at http://silverlight.live.com. You need a Windows Live ID to get started or you can create a new Windows Live ID for free.

Uploading

Now move your Hello World sample to the Silverlight Streaming Service.

First create a manifest.xml file, which describes the constituent parts of your Silverlight Streaming application:

<SilverlightApp>
        <version>1.0</version
        <source>Hello.xaml</source>
</SilverlightApp>

For this simple example, you no longer need the default.html or JavaScript files. You just need to create a Hello.zip file that contains manifest.xml and Hello.xaml.

On Windows, multiple select the files, right-click and select Send To Compressed (zipped) folder-you can use any of the popular ZIP compression programs, but you need to make sure that the manifest file appears in the top-level root of the zip file-zipping the parent directory is a common error and will not work!

Log in to Silverlight Streaming at http://silverlight.live.com using your Windows Live ID and click Manage Applications. Select Upload a Silverlight Application, specify a name (Hello) and browse for your Hello.zip file. Click Upload (Figure 2).

Click for a larger version of this image.

Figure 2: Uploading the application to Silverlight Streaming.

Depending on your connection speed, this may take a while. If all goes well, you will be presented with a page that allows you to test your application. You will also be given sample HTML and JavaScript that you can cut and paste into your own Web site to run the application (Figure 3).

Click for a larger version of this image.

Figure 3: Having uploaded your application, test links and sample code are automatically created.

Click Launch Application Test Page (Figure 4).

Click for a larger version of this image.

Figure 4: Click Launch Application Test Page to run your application.

You can also provide a link for others to run your application using an IFRAME. The URL is of the form:

http://silverlight.services.live.com/
invoke/accountId/appName/iframe.html

Where accountId is your Silverlight Streaming numeric account identifier and appName is the name of your application (in this case Hello). You can find out your accountId by clicking the Manage Account link. The IFRAME invoker redirects you to an obfuscated URL as in Figure 5.

Click for a larger version of this image.

Figure 5: Invoke your application directly within an IFRAME.

&

By: Rob Blackwell

Rob Blackwell is R&amp;D Director at Active Web Solutions http://www.aws.net. He is a Microsoft Most Valuable Professional (MVP) for Virtual Earth. He occasionally has something interesting to say on his blog at http://www.robblackwell.org.uk.

rob.blackwell@aws.net

Fast Facts

Silverlight Streaming by Windows Live is a free service that gives you up to 4 GB of storage and up to one million minutes of video streaming at 700 Kbps. Unlimited streaming will be available for a nominal fee or for free with advertising.


Light Up the Web

For more information about Silverlight see http://www.microsoft.com/silverlight/ or buy Laurence Moroney’s book “Introducing Microsoft Silverlight 1.0” published by Microsoft Press.

To sign up for a free Silverlight Streaming service go to http://silverlight.live.com



Listing 1: Hello.xaml.

<Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

        <TextBlock FontFamily="Times New Roman" 
                           FontSize="70" 
                           FontStyle="Italic"
                           Foreground="Green"   
                           Text="Hello World" />

</Canvas>



Listing 2: Default.htm.

<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtmlxml:lang="en">
  <head>
    <title>Hello World</title>
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript" src="CreateSilverlight.js"></script>
  </head>
  <body>
    <div id="SilverlightPlugInHost">
      <script type="text/javascript">
         createSilverlight();
      </script>
   </div>
  </body>
</html>



Listing 3: CreateSilverlight.js.

function createSilverlight()
{  
        Silverlight.createObjectEx({
                source: 'Hello.xaml',
                parentElement: document.getElementById('SilverlightPlugInHost'),
                id: 'SilverlightPlugIn',
                properties: {
                        width: '400',
                        height: '400',
                        background:'#ffffff',
            isWindowless: 'false',
                        version: '1.0'
                },
                events: {
                    onError: null,
                        onLoad: null
                },              
                context: null 
        });
}



Article Pages:  1  2 - Next Page: 'Expression Encoder' >>

Page 1: Light Up the Web-Microsoft Silverlight Streaming by Windows Live
Page 2: Expression Encoder

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
3.8 out of 5

54 people have rated this article.

rssbus

      Sharepoint TechCon

 

Hacker Halted