`
baiguomeng
  • 浏览: 998319 次
文章分类
社区版块
存档分类
最新评论

公布Windows Azure Toolkit for Windows 8

 
阅读更多

Windows Azure Toolkit for Windows 8旨在使开发人员能更容易地创建一个Windows Metro style 应用程序,这个应用程序能赋予 Windows Azure计算和存储源源不绝的力量。它包含Windows 8 Cloud Application project template for Visual Studio,这使得开发人员更容易地创建一个利用Windows Azure服务的Windows Metro style应用程序。该模板生成一个Windows Azure project、一个 ASP.NET MVC 3 project和 Windows Metro style JavaScript application project。这些立即就让它与众不同,客户端和云计算项目整合到一起来启用随同Windows Push Notification Service (WNS)的推动通知服务。此外,Windows Azure项目演示了如何使用WNS方法以及如何利用Windows Azure Blob 和 Table 存储。

Windows Azure Toolkit for Windows 8可供下载

Push Notification Cloud Service架构

对于那些熟悉使用Windows Phone 7 和Microsoft Push Notification Service (MPNS)的人来说,这是一个好消息,因为它与Windows Push Notification service (WNS)颇为相似。让我们来看看WNS工作的鸟瞰图。

发送通知需要几个步骤:

  1. 请求一个通道。利用 WinRT API 从 WNS 请求一个Channel Uri。这个 Channel Uri将成为你发送通知到每一个应用程序实例的唯一标示符。
  2. 使用你的 Windows Azure cloud service注册通道. 一旦你拥有了一个通道,你可以随即存储它并将它与任一应用程序的特定数据关联起来(例如用户配置文件等),直到你的服务决定发送一个通知到特定通道。
  3. WNS的身份验证. 发送通知到你第一次所需的Channel URI来进行WNS的身份验证(使用OAuth2来获取你推向WNS的每一个紧随其后的通知的标记)。
  4. 发送通知到通道接受者. 一旦你拥有了自己的通道,通知有效负载和 WNS 访问令牌,然后,你就可以执行HttpWebRequest将通知发送到WNS来交付给你的客户端。

幸运的是,Windows Azure Toolkit for Windows 8通过提供一系列项目模板使你通过简单的新建项目的操作就能从Windows Azure cloud service开始交付通知,这加速了项目的开发。让我们来看看这些toolkit组件。

Toolkit 组件

Windows Azure Toolkit for Windows 8包含一系列丰富的东西,包括Dependency Checker、Windows Push Notification Service recipe、 Dev 11 project templates、VS 2010 project templates 和示例应用程序 。

Dependency Checker

Dependency Checker旨在帮助识别并安装开发Windows 8上的Windows Metro style 应用程序 和Windows Azure 解决方案所需的但缺少的那些dependency。

Dev 11 Windows Metro style app

Dev 11 Windows Metro style app提供简单的UI和提供阐述怎样使用WinRT API从WNS请求一个通道所需的所有代码。例如,下面是从WNS请求一个Channel URI的相关代码:

一旦你拥有了自己的通道,然后,你需要将这个通道注册到你的Windows Azure cloud service上。为此,示例应用程序调用updateChannelUri,在那里我们构建了一个简单的JSON有效负荷并使用WinJS.xhr
API 将它POST到Windows Azure里运行的WCF REST service上。

VS 2010 Windows Azure Cloud Project Template

该解决方案提供的Windows Azure Cloud project演示了为交付推送通知服务而构建Windows Azure service的几个有利条件。这些有利条件包括:

1. 客户端应用程序的WCF REST service注册通道并演示了如何使用TableServiceContext将他们存储在Windows Azure 表存储里。以下代码列出了该项目暴露出的简单的WCF REST接口。

2. ASP .NET MVC 3 portal构建并使用WNS recipe向客户端发送Toast、Tile 和 Badge 通知。

3.如何利用Tile的Blob存储和Toast notification image的示例。

4. Portal使用的Windows Push Notification Recipe提供了WNS验证的简单托管API、构建有效负荷并发送通知到WNS。

5.正如你所看到的,Windows Push Notification Recipe简化了发送通知所需的代码,简化后只需3行。

每个asset中网络端点的净结果都是一个通知,类似于下图阐述的那样,该图是使用Windows Azure Toolkit for Windows 8的一个Toast交付的截图。

作为练习,建议你花一些时间利用网站搜索每个Toast、Tile 和Badge 通知类型一系列的可用模板。

示例应用程序

目前该toolkit中还包含两个示例应用程序,演示了其他Windows Azure功能的用法:

  1. PNWorker: 该示例说明了如何利用Windows Azure存储队列来将交付通知的工作转移到Windows Azure Worker Role上。更多详细信息,请参阅CodePlex文档。
  2. ACSMetroClient: 该示例是关于怎样在Windows Metro style应用程序中使用ACS。更多详细信息,请参阅Vittorio Bertocci的这个帖子
  1. Margie’sTravel: 如John Shewchuk的示例主旨中那样,Margie’s Travel示例程序演示了Metro style app是如何与Windows Azure一同工作的。更多详细信息,请参阅Wade Wegner的这个帖子。这个例子会在//Build大会之后加入。

总结

Windows Azure Toolkit for Windows 8为开发人员提供了一套丰富的可重复使用的asset,演示了如何从Windows 8的Metro style应用程序中快速地学会使用Windows Azure。下载该工具包并查看一步一步的演练,请参阅Windows Azure Toolkit for Windows 8

Nick Harris 是Windows Azure的技术专员。Follow Nick吧!@cloudnick

本文翻译自:http://blogs.msdn.com/b/windowsazure/archive/2011/09/14/announcing-the-windows-azure-toolkit-for-windows-8.aspx

分享到:
评论

相关推荐

    Windows Azure Tools for Microsoft Visual Studio中文版

    Windows Azure Tools for Microsoft Visual Studio中文版是一款专为Visual Studio设计的扩展工具,旨在帮助开发者在Windows Azure平台上构建、测试、运行和部署可扩展的服务。该工具集提供了对Azure Cloud Service的...

    Windows Azure

    ### Windows Azure 应用程序服务平台详解 #### 一、Windows Azure 概述 Windows Azure 是由微软提供的公有云应用程序平台,在中国大陆区域的服务由世纪互联运营。该平台旨在为企业和个人开发者提供灵活、强大的...

    Windows Azure入门教学系列

    Windows Azure 入门教学系列 本教程系列旨在帮助初学者快速入门 Windows Azure 平台,学习如何创建、部署和管理云端应用程序。通过本系列教程,读者将了解 Windows Azure 的基本概念、开发工具和部署流程。 知识点...

    走进云计算Windows Azure实战手记光盘

    全书共12章,内容包括云计算概论、云计算技术概观、初探Windows Azure、Windows Azure应用程序开发基础、Windows Azure应用程序开发:Table存储服务、Windows Azure应用程序开发:BLOB存储服务、Windows Azure应用...

    Windows Azure Mobile Services for Windows 8 and Windows Phone 8

    Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8 A short, fast and focused guide to enhance your Windows 8 applications by leveraging the power of Windows Azure Mobile ...

    Building.Clouds.with.Windows.Azure.Pack.178

    In this book, we will learn about planning and deployment of Cloud Fabric for Windows Azure Pack, Azure Pack components, VM Clouds and IaaS offerings, PaaS Offering including WebSites & Service Bus, ...

    Windows Azure 概述

    Windows Azure 概述

    70-583 Windows Azure 题库

    - **问题背景**:在尝试初始化一个Windows Azure Queue连接时,不断收到错误消息。 - **解决方法**:确保队列名称中不包含非法字符。 - **技术要点**: - **队列名称规则**:Windows Azure Queue服务对队列名称有...

    Windows Azure使用入门 第二课:建立自己的网站.pdf

    ### Windows Azure 使用入门:建立自己的网站 #### 一、Windows Azure 中的网站概念 随着互联网技术的发展,网站已经成为企业和组织对外展示形象、提供服务的重要窗口。传统的网站搭建往往需要自行购买服务器、...

    Windows Azure快速入门——为什么选择Windows Azure

    ### Windows Azure 快速入门 —— 为什么选择 Windows Azure? #### Windows Azure 是什么? Windows Azure,作为微软的云服务平台,提供了广泛的服务,旨在帮助企业轻松搭建、部署并管理各种解决方案,几乎能满足...

    windows azure platfrom for english

    ### Windows Azure Platform与云计算知识点详解 #### 一、引言:云计算背景下的企业挑战 在2009年,随着企业对于快速部署和维护自建应用程序的需求日益增长,传统IT基础设施和服务模式面临着巨大挑战。例如,在一...

    Windows Azure技术简介

    ### Windows Azure技术简介 #### 一、概述 随着移动互联网时代的到来,企业面临着前所未有的机遇与挑战。一方面,用户数量激增,应用需求多样化;另一方面,传统的IT系统往往难以适应这种变化,导致成本上升、效率...

    Windows Azure云平台概述.pdf

    Windows Azure 是微软提供的一个全面的云服务平台,旨在帮助企业快速构建、部署和管理应用程序,同时提供了高度可扩展性和灵活性。该平台的核心在于其云计算模型,这种模型改变了传统的IT资源分配方式,通过按需分配...

    微软WindowsAzure云应用开发实践整理.pdf

    使用Visual Studio进行云应用开发,可以使用Windows Azure Tools for Microsoft Visual Studio 1.1扩展工具包,下载地址是http://www.microsoft.com。 云计算平台的优点 微软云计算平台的优点包括: * 能够有效...

    Windows+Azure实战

    《Windows Azure实战》一书是针对云计算平台Windows Azure的实践指南,旨在帮助读者掌握如何在Azure平台上构建、部署和管理应用程序。这本书源自华章出版社,提供了丰富的实例和详细的操作步骤,使得读者能够深入...

    WINDOWS AZURE从入门到精通

    《Windows Azure从入门到精通》针对微软的云计算平台windows azure,循序渐进地介绍了如何构建和管理云端的可扩展应用,一次一个知识点,同时辅之以适当的练习,可帮助读者轻松掌握基本的编程技能,掌握windows ...

    Windows Azure使用入门 第一课:创建虚拟机.pdf

    ### Windows Azure 使用入门:创建虚拟机 #### 一、Windows Azure 虚拟机概述 在探讨如何在 Windows Azure 平台上创建虚拟机之前,我们首先需要了解什么是 Windows Azure 虚拟机以及它为何重要。 **Windows Azure...

    Microsoft.WindowsAzure.Storage-7.2.1.0

    《Microsoft.WindowsAzure.Storage SDK 7.2.1.0:深入了解云存储的基石》 Microsoft.WindowsAzure.Storage 是微软为开发者提供的一个关键库,用于与 Azure 存储服务进行交互,包括 Blob 存储、表存储、队列存储以及...

Global site tag (gtag.js) - Google Analytics