. Net website you must know|Anytao technology blog
[Walking through the cloud, azure services platform] 3: Who said live mesh is only a network storage, deploying Silverlight applications in Mesh
Released on: 2009.02.26:Anytao
2009Anytao.com, Anytao original works. Please refer to the author and source in the post.
1 Introduction
Azure, mesh, live, and dataservice have followed the high profile of Microsoft cloud computing. No matter whether we are in the cloud or in the fog, whether we accept or avoid it, they will continue to come. Live Mesh has always been the most criticized among all the families supported by Azure services platform. Most of them believe that mesh is regarded as a good network storage at most, it is not related to the holy concept of cloud computing. Just like myself, mesh serves as a storage platform for several interconnect devices for some time, facilitating file sharing.
However, this is not the case. What we see is only one aspect of mesh, and its mystery has become more "Cloud" with the launch of live framework CTP, mesh is only a network storage. In this article, we provide a Silverlight mesh-enabled web application, deploying the cool Silverlight in the mesh to feel the real live mesh.
Let's start.
2. necessary preparation
To run our mesh applications, installation and preparation are required.
Prerequisites
- Install the live framework SDK and tools. Next we will share the installation steps.
- You have the live services: Live framework CTP permission. If you do not have the token of live framework CTP, see [2: My first cloud application: Hello, Cloud!]. .
Install SDK and related tools
The installation path of the SDK and related tools. When you select to create a live framework CTP project, you can download the required sdks and tools through a link, for detailed installation steps, refer to the online documentation instructions:
Here we will just give a brief description:
- Install the Live Mesh SDK
Download the Live Mesh SDK, decompress the installation package, and copy the decompressed live framework SDK folder to % ProgramFiles % \ microsoft sdks \ (% ProgramFiles (x86) % \ microsoft sdks \, 64-bit System) directory.
- Install silverlight_tools.exe
- Install live framework tools for Microsoft Visual stuido
This tool must be installed after Live Mesh sdkand silverlight_tools.exe. After installation, open Visual Studio. The live framework project template is displayed in the new project template, we will see its wonderful application process in the next tour.
3 Changyou Silverlight in mesh-enabled
Create a mesh-enabled web application project
- After the necessary environment is installed, open visual stuido and create a project. You can see the newly installed Live framework template. Select the Silverlight mesh-enabled web application template and set the corresponding path and Project name:
- After the creation, two projects, one Silverlight project and one mesh project, will be generated. After the creation, a prompt will be prompted to log on to the mesh with a valid account:
- Create a simple Silverlight application as the target for deploying mesh-enabled.
For example, we add basic elements to page. XAML:
< Grid X : Name = "Layoutroot" Background = "Azure"> < Stackpanel Margin = "10, 20, 10, 20" Orientation = "Vertical" Horizontalalignment = "Center"> < Textblock Fontsize = "20"> Hello, my Silverlight app in live mesh. </ Textblock > < Textbox X : Name = "Txtinput" Width = "300" Height = "60"/> < Button X : Name = "Btnhello" Content = "Hello, mesh" Width = "200" Height = "50" Click = "Btnhello_click"/> < Textblock Horizontalalignment = "Center" Fontsize = "20" Foreground = "Red"> 2009, anytao.com </ Textblock > </ Stackpanel > </ Grid >
And add a simple operation:
// Release: code01, 2009/02/25 // Author: anytao, http://www.anytao.com // list: page. XAML. CSPrivate voidBtnhello_click (ObjectSender,RoutedeventargsE ){MessageBox. Show (string. isnullorempty (txtinput. Text )?"Hello, mesh": Txtinput. Text );}
It is conceivable that the running Silverlight application will output the text of the input box in the form of a dialog box. More complex applications can be implemented, and the business changes as needed will have your own.
- After compilation, run F5 and enter the running status. The run deployment dialog box is displayed to guide us in the first deployment and release process of anytao. livemesh. app project:
Create a live Service Project
- The tips show that the main operation steps include 3. First, create the Live service: Live framework CTP project on the developers portal. For detailed methods, refer to [second: My first cloud application: hello, Cloud!], Of course, the premise is that you must have the corresponding permissions.
- After you click Create LIVE service: Live framework CTP, the first time you enter Terms of Use, of course, select "I accept.
- Go to Project Creation, enter project lable and description, and go to the next step:
- Select "Create a mesh-eabled web application" as the project type to go to the next step. Here, you can download the live framework ctp sdk and tools, select "CREATE" to create the corresponding project:
- After the project is created, a new "anytaomesh" project is generated, which contains the basic information of the project. You can also select "delete" and click "Upload package" to enter the deployment process:
Deploy the project package
- Go back to Visual Studio and enter Step 2 in sequence. Click "Copy full path of anytao.livemesh.app.zip to clipcoard". Of course, you can also manually find the project compressed package and upload it in the next step:
- Select "Browser", copy your compressed package directory, and click "deploy" for deployment:
- This will be a long deployment process, because your beloved Silverlight application is gradually entering the cloud from the local device. This process is worth waiting for, isn't it?
- After deployment, "application Self Links" will be generated. This URL can be seen as your application has found the organization in the mesh, copied the address, and used in the next step:
- Return to the deployment box of visual stuido, copy "application Self Links" to the input box in step 3, and click OK.
- Don't worry. There is another progress process. Well, there are still a lot of processes. Let's wait, because after the deployment, our first mesh-based Silverlight application was finished :-)
Running in Cloud
- After the deployment is complete, Visual Studio automatically opens the mesh, which is loaded by Silverlight and the mesh desktop we are familiar with. We have reason to believe that we are running our own Silverlight app in the mesh:
- I will not talk much about it. The rest is appreciation:
More exciting
- After deployment, authorized users can log on to the mesh to enter applications and choose their own Web applications for management. You can add different devices to your mesh so that all your connected devices can run their own applications.ProgramIn addition to running in Cloud, you can use running in client.
- Finally, I couldn't help but share my surprise with Dudu, dingxue, and terrylee, so I can send an invite members to share my Silverlight mesh-enabled web application with my friends:
So far, we have completed a good mesh Changyou. How do you feel? Try it on your own.
4 Conclusion
It seems cool to you. The most important thing is that any application update and modification will be synchronized to any connected device or any accessible member endpoint. This is the charm of live mesh, can we say that live mesh is only network storage? The answer is clearly displayed. Stay tuned for discussion :-)
Finally, we will provide some valuable references for you to choose from:
- Azure services developer portal
- Developer documentation
- Live framework White Paper
- Livefxposter.pdf
CodeDownload:Here
References
- Http://silverlight.net/learn/learnvideo.aspx? Video = 167357
Anytao | 2009 anytao.com
2009/02/26 | http://anytao.cnblogs.com/| http://www.cnblogs.com/anytao/archive/2009/02/26/anytao_azure_03_siverlightinmesh.html
This document is provided as "the status quo" without any guarantee and does not grant any rights. | This posting is provided "as is" with no warranties, and confers no rights.
The copyright of this article belongs to the author. You are welcome to repost this article, but you must keep this statement without the consent of the author.ArticleThe original text connection is clearly displayed on the page. Otherwise, the legal liability is retained.