Live Framework – creating a Silverlight Mesh-enabled web application in 8 steps
After seeing what the new Mesh-enabled web applications can do during the last PDC in Los Angeles I couldn’t wait getting my hands on a token and creating something.
First of all, if you have not yet been using Live Mesh signup for an account here: https://www.mesh.com/. This is the public beta so you can start using the client application and Live Desktop to synchronize and share data.
In this post however, I’m talking about the developer Live Framework CTP which at this stage in on limited access. Read on…
In order to create your first Mesh-enabled project you need to install the Live Framework Tools CTP. You will be able to download this once you get your token.
Silverlight Mesh-enabled web application
1. I started by creating a new project of type “Silverlight Mesh-enabled Web Application”.
2. The Visual Studio template automatically generates two projects for this type of application:
- A Mesh host project, this is the actual Mesh application (with a .meshproj extension for Visual Studio)
- A Silverlight project, which will generate the XAP file to be included in the Mesh app.
At this moment the development experience is still not a fluent task: in order to debug your project you need to package it into a zip file and upload it to the cloud (manually). Once that is done the XAP file can be uploaded seamlessly by Visual Studio in order to debug remotely. Let’s review the steps to do this.
Publishing the project in order to debug and test
3. Developer portal, create the new project, choose “Mesh-enabled Web application”:
4. Once the project is created, keep the project details page open, you will need to get back to this page to upload the package and get the Application Self-Link further on.
5. Back in Visual Studio, build your project. Building the project will generate a .zip file with the name of your project. The zip file contains the files from the host project (the .meshproj in Visual Studio) as well as the .xap file of the Silverlight project).
Check the ProjectDir > Bin > Debug directory to retrieve the .zip file that was generated upon build. An easy way to get to the file system from within Visual Studio is by right-clicking on the project and choosing “Open Folder in Windows Explorer”.
6. Go back to the Developer portal and retrieve the project detail page. Click the Upload Package to upload your .zip file. This will deploy the Mesh-enabled web application and make it available on Live Mesh as well.
Once the package is uploaded you can click “Test Now” to try out your application on the Live Mesh site. Let’s not do that just yet.
7. Uploading .xap file through Visual Studio.
Back in Visual Studio, Press F5 to debug, this will launch the “Mesh publishing tool” from Visual Studio. Note: I’ve no idea if this is really called the Mesh Publishing tool, that’s just the name I’m giving to it. This popup will request you to upload the .zip file to the portal (which we have done in step 6). Copy and paste the “Application Self-Link” which can be found on the project’s properties page.
The XAP file will be published to the Mesh and once all these steps are completed your application will be launched in the browser. You may be required to login again.
8. Test your app and debug. The application will start launching the in on the Live Desktop, I set a breakpoint on the constructor and yes, my breakpoint is hit over the Mesh!
Breakpoint in Visual Studio:
The process of uploading the latest .xap to the Mesh happens at every time you debug the application. This is a good thing because it means you online need to go through the different steps once to upload the initial project. Visual Studio then does the work of uploading and deploying the new .xap file to the server every time you debug.
Note that throughout this post we are addressing the Developer CTP at developer.mesh-ctp.com, not Live Mesh in beta that is currently public.
This post does not yet use any Live Framework APIs or access any resources. That’s for another post where I will be saving some information to the Mesh and getting the offline and online experience.
How can you get started?
At his moment the CTP is limited, attendees of the PDC are one of the first to get tokens. But… I do have two tokens that I will give to the first two people replying on this post. Be quick and you might be able to start your own Live Fx & Mesh developments.
And if you want to get ideas on all that’s possible with the Live Framework, there are several sessions worth watching from PDC: https://www.microsoftpdc.com/
Start meshifying!
Comments
Anonymous
November 18, 2008
I need a token for live framework, please :) !Anonymous
November 18, 2008
Creating a Silverlight Mesh-Enabled ApplicationAnonymous
November 18, 2008
I’m hoping that Katrien was inspired by the PDC BBC iPlayer demo that we worked on here, as she createdAnonymous
November 19, 2008
We (the Belgian MSPs) are looking at how we can start using this. Right now we are only sharing files on mesh. At the ask the experts booth on TechEd a nice man explained us all of this but it's nice to gave step by step instructions :D Btw, on TechEd they have distributed a limited number of tokens (I think about 100). We've got 3 of them :DAnonymous
November 19, 2008
I would like a Live Mesh developer token. Thanks! Walt LounsberyAnonymous
November 19, 2008
In this issue: Bart Czernicki, Martin Mihaylov, Katrien De Graeve, Silverlight SDK, Arturo Toledo, crocusgirlAnonymous
November 19, 2008
Any more tokens left? I would like to get one.Anonymous
November 19, 2008
@Walt Lounsbery - you are the second in the comments to ask for the token: it's yours! Leave me a comment via the contact form so I can mail you the token. @ZZigic: sorry last one just gone! I don't have any more tokens folks, hopefully the CTP will become more available soon.Anonymous
November 19, 2008
I'm at Champp's with some fellow geeks chatting about code. A few conversations are going onAnonymous
November 20, 2008
I hate to nitpick but Silverlight is missing an "h" in the title.Anonymous
November 22, 2008
@Jorriss: thanks for pointing that out, completely missed the typo!Anonymous
November 24, 2008
Visual Studio Tools for Live FrameworkAnonymous
November 25, 2008
In my previous post about the Live Framework and Mesh-enabled apps I described how to create your firstAnonymous
December 09, 2008
译文: 最近在Los Angeles 的PDC大会,看到了Mesh-enabled web applications 所做的开发,我迫不及待使用手头的 token 去做些东西(应用).首先,如果你还未注册 Live Mesh 帐号的话,在这里进行注册: http://www.mesh.com/. 这是个公共的beta 版,您可以使用不同的客户端应用和Live Desktop去同步或共享数据.