Live Mesh gives accessibility to your data from multiple devices (including
Mac, Mobile) and allows you to share data with others. Imagine you are creating
sales proposal that needs updates from team members situated at different
geographical locations. Live Mesh helps you put your documents inside a folder
and share them with others, even from a mobile phone browser. To use Live Mesh,
visit the site www.mesh .com and sign in using your Windows Live ID. Mesh
provides Live Desktop with 5 GB space, capability of remote connection, and a
client that can be downloaded on machine that adds machine to mesh. Besides,
every folder created inside mesh has Mesh Bar that helps in managing and
notification of content.
Direct Hit! |
Applies To: Web Developers USP: Synchronize files,folder and data across multiple devices Primary Link: mesh.com Keywords: Live Mesh |
Implementation
Here, we are going to build a Silverlight application to run locally as well
as on live desktop provided by Live Mesh. To build the mesh application, one
needs to login into a different mesh environment. Visit https://developer.mesh-ctp.com
and login using Windows Live ID. This is an environment created specially for
developers and is different from actual mesh environment as mentioned in the
introduction. Add your machine to mesh by installing 'LiveFrameworkClient.msi'
from this page. Now to start building an application, one needs to download Live
framework SDK and tools for Visual Studio. These files can be downloaded from
dev.live.com/liveframework/sdk using invitation tokens that can be obtained
after registering to Microsoft Connect website.
There are three downloads available on the download page 'LiveFramework
SDK.zip','LiveFrameworkTools.msi' and 'Silverlight_tools.exe'. Download all
these files, extract 'LiveFramework.zip' file inside 'Microsoft SDK's' folder
at'C:\Prog ram Files\Microsoft SDKs'. After this, install 'LiveFrameworkTools.msi'
and 'Silverlight_tools.exe'. This will add new project templates to your Visual
Studio 2008 SP1 namely 'Live Framework' , click on it and create new project (PCQ_Silver_MEWA)
using 'Silverlight Mesh-enabled Web Site' template (we are using C# as
programing language). Before creating an application, one needs to add
reference. This can be done by right clicking 'References' and clicking on 'Add
Reference'. Go to 'Browse' tab and go to 'C:\Program Files\Microsoft SDKs\Live
Framework SDK\v0.9\Libraries\.Net Library' and select all three references there
and add them. Here is the content of 'Page.xaml':
Once debugging of Silverlight application starts you need to complete these three steps mentioned above to complete the process of debugging. |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
Here, we have created simple button, with an event on button click. In this
example, button click will display a message box as shown in 'Page.xaml.cs':
Here silverlight app is running inside developer mesh in Live Desktop. Click on 'MEWA' to get a message. Same application can be run locally using Live Framework Client. |
using Microsoft.LiveFX.Client;
using Microsoft.LiveFX.ResourceModel;
namespace PCQ_Silver_MEWASilverlight
{
public partial class Page : UserControl
{
private MeshApplicationService meshApp;
public Page()
{
InitializeComponent();
meshApp = Application.Current.GetMeshApplicationService();
meshApp.LoadCompleted += new EventHandler(meshAppLoaded);
meshApp.LoadAsync();
Upload application package by clicking on 'Upload Package' on Azure Services Developer Portal. Go to Visual studio and click on the link in pop up window to get the path. |
}
void meshAppLoaded(object sender, EventArgs e)
{
}
private void Button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("This application runs ONLINE as well as OFFLINE");
}
}
}
Fun part starts now. As soon as you debug this application, it will generate
pop up window with three steps. First one needs to create a new project on
'Azure Services Developer Portal'. This can be done by clicking on the link
provided in the pop up window. On developer portal, click on 'Live Services Live
Framework Community Technology Preview', and fill in 'Project Label' and
'Project Decription'. From next window, select 'Create a Mesh-enabled Web
application'. One needs to upload application package by clicking on 'Upload
Package' button. Simply go back to Visual studio and click on the link in pop up
window to get path of package. Once package is uploaded, it will generate
application self link under 'Web Site Embedding'. Copy this link and pase it in
pop up window and click on 'OK'. This wil launch appliction in 'Live Desktop'.
Now same application can also be launched on user machine using shortcut created
on desktop.
This way, same application runs on web site as well as on local machine, and
further changes made on this application can easly be synchronized with mesh.