Video Transcript
Welcome to Azure Services Platform Live Services. Now the goal of this session is to, of course, introduce Live Service and anytime we’re dealing with a new technology, it’s always good to look types of things in technology that are replaces. So, we’ll start with a little bit of history. Of course, any new technology also is going to requires some terminology and s we need to talk about a number of different terms that are related to Live Services. We’ll dive a little bit deeper into the Live Operating Environment. We’ll talk about the Live Framework SDK and we’ll see what it looks like to build a Live Framework client application and then, we’ll wrap things up with a quick look at Live Mesh, specifically how to build a mesh enabled web application.
Some history and terminology
So, to start with, let’s think about where we are right now or where we’ve been the past few years and you think about Microsoft and the services that it provides. There’s a lot of online services that come under the Microsoft brand whether it’s MSN, hotmail or mail through Windows Live, you’ve got Windows Live that stores your contacts and your photos and it’s associated with maybe your email, of course there’s services like search and virtual earth for being able to locate information or locations so there’s a lot of information out there and more and more Microsoft has exposed this information to developers, right, whether it’s through the existing Live APIs that allow you to use java script to create match ups using Virtual Earth or use a .NET SDK that allows you to go out and grab contacts from somebody’s Windows Live account subject to their approval, of course.
There’s a lot of sort of need to make this data available to developers. Why? Because developers want to create these great new applications, specifically when you talk about social networking applications and things that encourage people to share data with their friends and family and you also see a conversions of devices where people want to access information and get to their Twitter account or their Facebook page, they want to be able to do it on their mobile devices, they want to be able to do it when, you know, they’re not at their at their home computer and so forth so there’s this, in all this data out there, and we need as developers, we need ways to get it. Now one of the problems that we sort of started to see is that each of these different services and others have their own sort of unique APIs to get to it, one might be .NET, one might be JavaScript, one might use a purely rest based HTTP based access methodology so there’s a lot of different ways and there’s very little consistency from one to the next so that’s sort of the current situation with respect to all this data that’s out there.
Now, meanwhile another thing that’s just recently been announced is the Azure Services Platform and the Azure Services Platform certainly is built on the notion of cloud computing and specifically the computing storage facilities provided by Windows Azure but there are other components besides Windows Azure to the Azure Services Platform. There’s .NET Services, sequel services and share point and dynamics CRM but what we’re going to be talking about in this session is, of course, Live Services so note that we’re not talking about Windows Azure and we’re not talking about any other component of the Azure Services Platform other than Live Services in this session.
So what is Live Services? Well, in a nutshell, Live Services are simply building blocks that handle user data and application resources. They are part of the Azure Services platform.
Live Framework SDK
Now, the Live Framework is part of Live Services and really the Live Framework is what the developers care about in terms of live services because the Live Framework provides a uniform way of programming live services and that maybe I should highlight and circle and make it bold to say that it’s the uniform way because remember where we’re coming form is an environment in which the APIs that we use to access all this information are inconsistent and they change from one to the next. It really just makes it difficult to learn whereas with the Live Framework, they’ve really strived to create a consistent uniform API. The Live Framework is also simple open and interoperable, uses standard based HTTP based mechanisms for getting to the data. That means it’s going to support any number of platforms, any number of programming languages, applications and devices.
In a nutshell, the Live Framework allows developers to consume and combine Live Services to build your own custom applications and to support that, there is two things that you would download in order to get started, The Live Framework SDK and Live Framework tools that work with Visual Studio. Now, the components of the Live Framework, there’s three. The first is the Live Operating Environment and the Live Operating Environment represents a service composition engine so we break that down, it’s just sort of a run time if you will, that takes a number of services and brings them all together in one place and we can think about services as being akin to what we talked about earlier and that is geo location and web search and contacts and photos and custom information that you want to store.
The Live Operating Environment exposes the programming model in two places. It exposes it in the cloud but it also exposes it on clients and that’s going to be key part of sort of the whole value of the Live Operating Environment. The Live Framework also defines a resource model, a consistent way that you can define resource types and relationship. In other words, when we say contact, what does that mean? We want some consistency and we want some consistency in the API as to how we get at the data associated with contacts. There’s a programming and application model that defines resource model elements that allow you to deploy, managed, discover and run applications.
So, this is sort of a high level view of the components that make up the Live Framework with a little detail thrown in. To begin with, we’ve got that Live Operating Environment. Again, the service composition engine and although it’s associated with Windows Azure and the Cloud, it also can be executed on Windows devices, on ultimately on Mac devices, Windows mobile, on your clients and then on top of the Live Operating Environment, you’ve got the resource model and the resource model could take several sessions just to go through it. So, we’re not going to talk about it any great detail just to point out that there’s a lot of work and emphasis has been placed on making the resource model consistent and interoperable. Some of the sort of benefits that I have already mentioned. Then there libraries that allow you get to that resource model, whether it’s a .NET frame work API, a Silverlight API, java script and there could be other/ There’s no reason why you can’t create your own library to access the resource model because accessing the resource model uses things like HTTP and ATOM bout any programming language. Finally, there’s the tools and services that make up the Live Framework and we’ll see a few of these in today’s demos.
First of all there’s a developer portal that you can log in to and that’s where you can sort of test your applications so that they’re actually running in the Live Operating Environment. Your code runs in a sandbox and so, in other words, when you upload an application to debug and test, it’s not going to be running there visible to everybody else. There’s a few other tools and services. I just want to highlight the fact that the Live Framework tools include templates and designers specifically from Visual Studio that really simplify development as we’ll see in a later demo. So, in summary, the Live Framework is just the uniform way of programming live services and again, the emphasis on interoperability so you support a variety of platforms, languages, applications and devices.
The Live Operating Environment SDK
Now, let’s talk a little bit more in detail about the Live Operating Environment. Now, the Live Operating Environment is this services composition engine. It provides a schema in the cloud and something they’re referring to as cast reflection on all of your devices. The Live Operating Environment exists in the cloud. It also get installed on all devices that you want to participate in your mesh and we’ll talk about that a little bit later. The goals of the Live Operating Environment, one is that all of the incarnations of the Live Operating Environment look and feel the same. So, in other words, you install an application into your mesh and you’ve got the Live Operating Environment running on several machines and then you’ve also accessing it through the cloud. It’s going ot look and feel the same regardless of which machine you’re using or which browser you’re using and so forth. Each instance of the Live Operating Environment is architected in the same way for consistency sake.
The Live Operating Environment again provides unification and this is the, you know, unified programming model. Another way to thing about the Live Operating Environment is to simply say that the Live Operating Environment is about solving the hard problems so that you don’t have to. If you were to build an application and let’s just take for an example, if you were to build a instant messaging client. The actual communication part is potentially very, very difficult, alright? It’s one thing to just make a simple web service call to a service that’s sitting out there on a known port and a known address but when you start talking about network communication between peers and you want to have, you know, users that are sitting at home behind firewalls and network address translation and you want them to talk to each other, those are some really tough issues with respect to all the communication plumbing that you have to deal with. If you were to build an application, for instance, that you wanted to be available offline, well, now you have to deal with synchronizing data and making sure that it’s available and you have to a do check for network connectivity and handle all of that.
So, whether it’s the offline synchronization story, whether it’s having a centralized location where you can manage resources, dealing with the communication pipelines, dealing with device management, detecting user and device presence, handling notifications, all these things, they’re just built into the Live Operating Environment. So you essentially have a platform from which you can begin building your application where all of these things are already done and that saves you a tremendous amount of time and effort in creating these sort of next generation applications. So, finally one more look at the Live Operating Environment. We can thing of the Live Operating Environment as existing in two places. It exists on the client or it exists or and it exists in the cloud and so whether you’ve got an application like Outlook or a browser or a media player or a mobile device, right, all of these things can run applications that are part of the liver operating environment and they use HTTP to access data that’s being stored in the cloud but also replicated and synchronized down to each individual device.
So, you’ve got your contacts, directory, your device listing and the point of this is, just to make sure I emphasize this, is by having the liver operating environment both in the cloud and on the client, your data is always available. If you go to a brand new computer, you can get to it because it’s out there in the cloud but if you power up your laptop on an airplane, you can get to it because the information in the cloud has been synchronized down so it’s sitting on your laptop as well. Now, from a perspective of the Live Operating Environment online, applications that assume that they’re used rather the Live Operating Environment in the cloud. Well, those applications are going to use HTTP to talk to the environment in the cloud and those applications are going to assume that they’re always on line and in some cases, that’s fine. If you have a web application, then you can sort of assume that you’re always going to be online because it’s going to be located on another web server and for it to even be accessible, it’s got to be connected to the internet so you don’t have to make any – you can just make an assumption there rather, that you’re going to be online.
You go through the Live Operating Environment to get to your live services data so that would a situation of you know, building a web app or a mobile app that assumes that you’re online but as I mentioned, that’s not always going to be the case so you can actually architect your application to use an occasionally connected scenario where you use the cloud when it’s available but you also have this Live Operating Environment that runs locally and the benefit there is now because of the way that the Live Operating Environment in the cloud and the one in the client is completely consistent, that gives you as a developer, the ability to write your code just once. Essentially, you can write your code that uses the local copy of the data through the local Live Operating Environment so your application, as far as it’s concerned will always run locally and only talk to the local Live Operating Environment.
Meanwhile, you leave it that local Live Operating Environment to synchronize with the Live Operating Environment in the cloud. So, it’s really a best of both worlds sort of proposition where you have the reliability of an application that doesn’t require internet connectivity and always will work , while at the same time you get the benefit of having data that’s stored in the cloud so that it can be accessed anywhere. And if something happens to your computer and you have to reinstall the application or even reinstall the operating system, you don’t have to worry about your data being gone, because as soon as you install the local Live Operating Environment, it’s going to start synchronizing back and getting your data back from the cloud.
So, inside the Live Operating Environment you’ve got a whole manner of components that assist in the operations there and again, these are going to consistent both online, in the cloud and on your local device. So, let’s say you’re sitting on your host and that could be either the web or your desk top, there’s a common language run time and this is managed code that runs the liver operating environment so there’s a CLR involved and inside that CLR, is the Live Operating Environment engine and it provides the service proxies and the scheduler. It provided the caching functionality and synchronization engines, so we’re not going into this in any great detail at this point but this is sort of a look at the details of what the Live Operating Environment provides for you.
So, one more thing before we get to our first demo and that is the resource model provided by the Live Framework and I mentioned several times now and you may be tired of hearing it but there’s this emphasis on uniformity and consistency and that certainly affects the resource model where you’ve got a very consistent resource model by which you can go out and look up data. So getting to information, whether it’s coming from your mesh or from your profile or from contacts, the API is going to feel extremely consistent and familiar between those.
Building a Live Framework Client App Demo
So, let’s take a look at just what it looks like to build a Live Framework client application. Before we open Visual Studio, we need to set up our development environment and to do that, you’re going to need to download two things. You’re going to need to download the Live Framework SDK and the Live Framework tools. Now both of these downloads are available through, at this point, through connect.microsoft.com and you need to register for and received a token for live services. So, once you’ve redeemed your token and then accessed the developer portal, then you’ll be able to download the SDK and zip file and then an MSI that represent the tools installer.
So, let’s talk about, first of all, the SDK. The SDK has the class libraries and the samples in order to be able to write applications that use the Live Framework and you’ll want to extract this to program files. Microsoft __ SDKs. It’s key that you install it there because in certain cases, the SDK expects it to be in that location so at least at this point for right now, you’ll want to make sure that you install it in Microsoft SDKs under program files and then you have the Live Framework SDK. There’s the version, you’ve got your class libraries, there’s the client – here we go – the client DLL, the resource model DLL and the web DLL, this is also where you’re going to find samples for .NET using SP.NET or WPF. There’s sample mesh applications and so forth. There’s also a tool called the live fx resources browser and let me just fires this up really quick. What this tool does is it actually is a web browser that connects to your local operating environment, your local Live Operating Environment or your cloud Live Operating Environment.
So, for instance, if I want to see the devices that are defined in my local Live Operating Environment, you know, I would simply click here and I’m going to see a list in Adam format, in XML of that information. So, this just is sort of a helpful tool when you’re developing, to be able to see what that the environment is actually providing you, whether online or running your local environment. Okay, so let’s close that. We’ve extracted the SDK and now, it’s time to install the tools, the Live Framework tools will really speed development in terms of your Live Framework because it comes with templates where a lot of the sort of boiler plate code is already provided. So, to give you that sort of usual wrap up application development experience with Visual Studio, as far as Live Framework then you really need these Live Framework tools.
Once the tools have installed, we can go ahead and fire up Visual Studio 2008. Select file, new project and I want to point out that there’s no specific template for a Live Framework client application because you can access the Live Framework from any managed code that has access to Live Framework DLLs so it can be a Windows service, a console app, Windows form app WPF application, you know, essentially any of these things so, we’re going to create a standard WPF applications called live FX demo and because we’re going to need some user interface to show off the results of our calls to the Live Framework, I’m going to go ahead and add a new user control and just replace the XAML with some code I happen to already have so we’ll just replace all that XAML there and I’m actually going to do the same thing for the window as well just so that we have our UI handled and we’re going to need to add an event handler. Here and we should now have sort of an empty shell of an application with a little bit of user interface but no real code behind.
Okay, so next up, I need to add references to the appropriate DLLs so I’m going to right click and select add reference and what I’m looking for here is of course, the program files SDK, Microsoft SDKs, the same location that we extracted, the Live Framework SDKN2 so we’ll go to Live Framework SDK and we’ll select libraries .NET and these are the three DLLs that I want to add from my Live Framework client app. Okay, once the references are there then, let’s go ahead and add some musing statements. The first three that I’m adding are just sort of traditional main spaces that you’re probably already familiar with and then there’s these two that came from the DLLs that I just added, live FX dot client, live FX dot resource model and we’ll need both of these in our code. Okay, so what we’re going to do is when the window is loaded, I’m going to create an instance of background worker and the reason I’m doing this is so that we can load our contacts in the background thread and that way, we make sure that we’re not freezing up the user interface while we wait for that to go happen cause it can take some time going out onto the network out into the clouds. So, we add event handlers for run worker completed and do work and then finally we call worker.run worker asycn. So that’ll kick things off in the do work method. And then the run worker completed method is going to get called and that’ll be back on the UI threads so we can use that to update our user interface.
Okay, so what do we need in order to access the Live Framework? I need a user name or user ID and that’s going to be the same one that I’ve been using. I also need the password and no, I’m not going to hard code my password in here. I’m going to actually use a text reader and this is going to come from a file. Of course, normally you wouldn’t want it to come from a file. You want your password to come from some secured storage but in this case for our purposes, this is going to work just fine so we have a user name and we have a password and then we’re going to create a server URI and this is what we’re going to connect to. It’s HTTPS user – CTP.windows.net and then I’m going to define a token and it’s just a string in this case because remember that the Live Framework uses just HTTP calls so, when it’s going back and forth, you know everything essentially has to be broken down into a string for a lot of the communications so in this case, our token is actually gets stored as a string but there’s a nice convenience method that you’ll see in just a minute. To start with, I need a network credential and that network credential is going to be initialized with our user ID, our password and that server URI that we’re connecting to and then there’s an extension method called get Windows Live Authentication token so this is not defined by the network credential class. It’s actually an extension method that’s in the DLLs that we just added a reference to.
So, once I’ve got that token as a string, I can define URI and I can define some live item access options and basically this is just to allow me to specify that I want to auto load relationship. Now, I can finally create my Live Operating Environment. So, this is sort of the central class of anything accessing in that Live Operating Environment. We have to create it. Well, we created it with just a simple call to the constructor but we haven’t connected to it. We haven’t connected to either the one in the cloud or the one locally so, if I wanted to connect to the one locally, I would simply just call connect local but in this case we want to go out to the clouds. So I’m going to call environment connect. I’m going to specify the token, remember which is a string. I need to specify the authentication token type as a user token and then I’m going to specify the URI that we created and finally, the access options that I created and so that’s what connects to the Live Operating Environment in the cloud. Once I’ve done that, I can use it to get at all sorts of data so, for instance, I can define an enumeration up here. We’re going to make an object of type I enumerable contact and contact, you’ll notice is part of the Live Framework client name space so we’ll just call contacts there. In that way, I can initialize my contacts by calling the Live Operating Environment.contacts.entries. So, at this point, we now have or we should have all of our contacts stored into a member variable.
Now we want to display them out while I can’t do it from the background thread because I don’t have access to the UI but I can do it down here and since I’ve stored them off to a member variable, they’re still going to be accessible to me and all I need to do is to iterate through them so I’m going to say for each contact in contacts I’m going to define a new instance of that user interface class that I created before so contact UI it goes new, contact UI and contact UI exposes a couple of properties that I can set so that the UI is effective, one of them being contact name, that’s a text blocks so we’ll set the text property to contact.resource.formatted name and you can see contacts has a list of emails, it has a family name, gender, formatted name, given name, prefixes, suffixes, in this case we want our contacts formatted name and then we’ll say, if contact.resource.emails.count is greater than zero cause one thing you have to be careful of is not all contacts have all the information that you expect. You might have email addresses for some people but not their phone number or vice versa so if we do have an email, we’ll go ahead and add it to the UI so we’ll say that contacts.details.text is equal to contact.resource.emails and since we know the count is greater than zero, we can safely reference the first instance and we can simply pull the value out and now one more thing that we need to do has nothing to do with the Live Framework but we need to add to that contact UI to the contacts grid and we need to move this up here and then finally, I’ve displayed a little loading message and we need to hide that so the loading grid, we need to set the visibility down to visibility dot collapsed.
Okay, so at this point, we can go ahead and run our app. We should see that it’s loading contacts and shortly, once the contacts arrive, we should see them appear. So, these are all contacts that we would see in our windows live account but we can also access them as you can see very easily through a nice strongly typed friendly API from our .NET Live Framework client. Now, we’ve been talking about the Live Framework and Live Services and Live Operating Environment but I’ve alluded to without really explaining something called Live Mesh.
Live Mesh
So, let’s talk a little bit about Live Mesh before we wrap things up. Live Mesh is simply a software plus service platform that’s designed to unify all your data devices and applications and the goal of Live Mesh is to just have all of your data devices, your data driven applications and devices simply work together to make sure that your data and the applications that use that data are available to you anywhere, anytime allowing you to easily connect and share with the people you need to connect and share with and that data that’s being used by applications, you want to make sure that’s always up to date. So, mesh can be leveraged by both desk top and web based applications.
If you’re writing a desk top application, you can either use the local Live Operating Environment or even and you can use the clog based Live Operating Environment. If you’re building a web out, then it’s going to connect the Live Operating Environment in the cloud and again, just as what you know, what we talked about before, the application already has all the hard stuff handled, synchronization offline, resource model, etc., so when you build a mesh enabled web application, it’s going to be hosted and deployed in the user’s mesh, that is to say, it’s everywhere and anywhere. It takes full advantage of the live services that we’ve been talking about with respect to the available information on line, data sharing, synchronization and one thing about the nature of mesh enabled live applications is they have to be implemented using the multiplatform technology because remember devices that can run the Live Operating Environment and participate in a mesh run the gamut from Windows PCs to Windows Mobile 6 to Mac OS.
And so therefore, because of the multi-platform support, there’s got to be written applications that is have to be written, engaged HTML, JavaScript, Silverlight, even Flash so…
Building a Mesh-Enabled Web App Demo
let’s go ahead and take a look at the Mesh. Before we actually build our Mesh enabled web application, let’s go ahead and see what it looks like to install the software that I’m going to need on the client side to have the mesh Live Operating Environment on my desk top so I’m going ahead and navigate to developer.meshCTP.com Obviously at some point, that’s going to change and I can sign in here using my Windows Live ID and once I do that, I’m going to get sort of a preview of what the Mesh looks like. Now, the mesh software isn’t actually installed on machine yet so I’m going to go ahead and click on install software. I’ll select from the drop down which version I want and then go ahead and click on install.
I’m going to run the MSI file and once it installs, I’m going to be able to add this device, the computer that I’m currently on into the mesh so you’ll notice that once the installation completes down on the system tray, there’s an icon for Live Mesh. I can go ahead and sign in there using the same Windows Live ID and password, and let’s have it remember me and go ahead and sign in to Live Mesh. Now, the first time I do this on a particular machine, it’s going to prompt me to add this particular computer, this is just a machine name. It’s not a very descriptive, so I’ll just call this bill desktop and click on add device and now, as part of my mesh, I’m now have multiple devices. I can go to my mesh desk top, then I can see a mesh up that I’ve created and I won’t cross that application. I can create a brand new folder if I want test data and the idea is that this folder would then synchronize whatever is in it with all the devices in my mesh so whether it’s a Windows Mobile 6 device that has the live outboarding environment, a Mac OS that has the environment, any device that I make part of my mesh, it’s all going to get the same applications, the same folders, the same documents and so forth. If I go back to devices, we should see that now I have my laptop. I have my desktop. This is where I would install software on other devices that I want to enable so this is what mesh looks like, sort of at your first experience.
Let’s go over to Apps tab and it’ll show you the applications that they currently have installed as well as any applications that I want to add. I can add them from a browser over here. Let’s go ahead and go to the desk top where we see the actual instances of those applications. Remember I’ve got the collaborative crossword, I can double click on it and it’s just going to open up right here, in the browser. And it’s a Silverlight app so you can see it loading up there and then, the application appears and the idea behind this particular sample application is this is a collaborative crossword and I could invite other people to participate in this and so that we could sort of share the work in terms of completing the crossword.
Alright, I can also close out of the browser and I want to point out that when I close out of the browser, you’ll notice that applications that were part of my mesh, have actually been created on my desk top, essentially as short cuts. So, if I go to collaborative crossword here, it’s going to open up and it’s the same application, it’s just this time it’s not running in the browser. It’s still a Silverlight application and it’s the same exact application, it just now I have sort of desktop experience versus the web experience. So this is what they mean when they say ‘your application is everywhere’ is if you go to a website just using any standards compliant browser, you can go to your mesh and you can see your apps. If you’re sitting at your home on your desk top, you can run the apps locally and you don’t need to be connected to the internet to do so. And then the information, for instance, in this case it would be the portions of the puzzle that I’ve completed, that information will get synchronized across everywhere you’ve go this application installed, which is going to be everywhere in your mesh.
So let’s go ahead and fire up Visual Studio and create our mesh enabled web application. We’ll select new project and note that there is a set of Live Framework templates for this, there’s mesh enabled web application and Silverlight mesh enabled web application. Let’s go ahead and we’ll call this mesh demo. We’ll click okay, and right away, you’ll notice that there’s actually two projects that get created in the solution. One is that project for the mesh app itself, sort of the configuration as well as a few assets including a logo that’s going to represent the application in the mesh which you can modify; some metadata in the form of a manifest file; there’s some java scripts to assist in loading the Silverlight plug in etc. The second project, this is going to look very similar and it’s almost identical to a standard Silverlight 2 project. You had get your user control that is called your name space dot page, the page has a grid in it, it looks exactly the same, the only thing they’ve done is they’ve add a little sample text for you. We can go ahead, change this, we’ll call, say that this is ‘My Devices’ which give us a sort of preview and what it were going to do here. We’re going to change this grid to a stack panel and why don’t we increase the font size while we’re at it. Okay, so that’s the user interface such as it is. We’ve got a nice stacked panel called lay out route that we’ll be able to use.
Let’s go ahead and investigate how this is actually different, besides just the addition of a text block, how this is different from a “normal” Silverlight app. And that is, you’ll notice the references to the Live Framework, name spaces are already present so we didn’t have to add those. Also, you’ll see that those using statements are already present, not only are the using statements there, but the page constructor already has a little bit of template code that will retrieve the mesh applications service and then call the load method with a event that fires as soon as the load is completed. That way, you have something that’s in your page that knows exactly when the environment is ready for you, when you have this mesh application server object up and usable.
Since I know that it’s going to be usable at this point, I can go ahead and copy it down here and I know that I don’t need to call load, I know that it’s already ready to go because, you know, that otherwise this event handler wouldn’t have been invoked. So, at this point, I can create an instance of the Live Operating Environment and just like the previous demo, you know, this is sort of central class in doing any of this sort of programming. In this case, I can use that mesh application service object Mesh App to go out and grab the Live Operating Environment.
Now what I’m going to do here is just show you how easy it is to query information that’s in the mesh so, for instance, I can take, do a for each where I can show each mesh device in the Live Operating Environments mesh.device.entries and notice how similar that is to our environment.contacts.entries that we used in the previous demo. And so, for each of these, I’m going to go ahead and add it to that stacked panel. So I think we left that as being called layout route. We’ll call layer route.children.add and we’ll create a new text block and we’ll initialize the text to be equal to device.resource and we’ll go ahead and grab the resource title here.
So, just before I do that, look at the API in the case of since this is a device, we’ve got things like is local, is on line. We’ve got information that is common across multiple resources and information or properties that are specific to devices. So you’ll see how the API is very consistent and that’s of course, as I keep mentioning, one of the central themes. And that’s it. So, it seems like a pretty simple application biz but it’s a Silverlight app that’s going to display all of the devices in our mesh whether we have one, two or ten.
We can build it and hopefully we see that the build is successful, which it is but now it’s time to actually run this application. Now we want to run it in the Live Operating Environment so that’s another thing that the template does for us is it provides sort of the facility for easily doing that. Watch what happens when I start debugging, it’s going to tell me that there are five steps and the first thing I need to do is sign in to the Live Framework so go ahead and specify a password and then it’s going to tell me and this only happens the first time per project or I should say once per project where we have to do this but you have to create a place up in the developer portal for mesh to create and host your project.
So they make it easy, in other words, they tell you exactly what you need to do, you just have to follow the links here so the first thing I need to do is to create a new mesh enabled web application by going to the developer portal. So, we click on that link, it automatically takes us here, it remembers me. I typed in a password and I can go at this point into new project and I need to go down to live services, Live Framework community technology preview, select that. We’ll go ahead and do a project label of live FX, I guess that’s the previous one we did, right so we’ll call this mesh demo and click on next. We want to mesh enable the web application so we select the second radio button, we select Create and when it’s done, we should have a information about the empty application and at this point, it’s sort of a container.
So the next thing we need to do and of course, Visual Studio tells us this, is we need to upload an application package – it’s the developer reportable request an application for upload which is exactly what’s happening here, it says please submit your package. Okay, so luckily, if we select this, it’s going to copy the full path of the zip file that’s it’s generated for us, cause all of these components over here and the code that’s compiled from the XAML and the code behind, all of that gets put into a zip file. And then selecting this just copies that path onto a clipboard.
We can go back and select upload package and here we just select browse. We can paste in the full location of our package here, select open and click deploy. It shouldn’t take too long to copy because it’s a relatively small zip file, is one less than a single MB so that doesn’t take long and then it goes through a simple deployment process. At this point, we can actually go ahead and test it, so we can select and one of the reasons on doing this now is cause it shows main install URL but what I really want is an application self link. So, if I go to test now, it’ll take me out to my mesh and I can click allow access and there is the one instance of mesh demo which if I go close that and go back to mesh demo, I should now, at this point have an application self link. So, I’m going to copy this, this is something you only have to do one time for each project. I’m going to copy that and return to Visual Studio where it’s still waiting for me to provide that application self link so I paste that in and click okay and now it can continue with steps where it prepares the application and one of the reasons that we go through this is in Visual Studio is so that Visual Studio can from now on, automatically upload a new package and handle everything for us so we get that sort of, you know, one click, test, debug, experience that we’re used to in Visual Studio.
So now, it’s going to take us to our mesh where we should see, not only is the application on our desk top but it actually loads and it’s running and we have our mesh demo and there is our list of devices, desktop and laptop just as we would expect and so this app is usable within our mesh. We can run it locally, we can run it in the cloud and that’s it for creating a simple mesh enabled application.
So, just a few reminders before we wrap up and that is the Azure Services Platform has aligning page form which you can get to all sorts of information at Microsoft.com/Azure and if you’d like to begin using the Live Framework SDK and the tools that we’ve talked about in this session, you will need to register and receive developer token, you can do that at connect.microsoft.com even without the developer tools, you can begin reading and researching and learning more about the Live Framework via the SDK and that’s available through the link shown. You’ll find it on MSDN. Thank you very much as always and we hope to see you in the near future.
[End of Audio]