Top Banner
40

Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

May 28, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程
Page 2: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Platform 开发入门

蒋建华Blog:http://yungboy.cnblogs.comEmial:[email protected]

Page 3: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

本次课程内容包括

云计算概述

Windows Azure Platform简介

Windows Azure Platform开发环境与过程

云计算应用开发实战

Page 4: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云计算概述

•云计算的概念及分类

•云计算的特点和优点

什么是云计算

•应用场景云计算的应用场景

Page 5: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

什么是云计算云计算概念

2007年3月Google提出

传统计算机技术和网络技术融合的产物

Forester Research观点

一种标准化的IT能力,资源易扩展且虚拟化

通过Internet技术以按需和自助的方式提供服务

云计算的分类按部署方式分:

公有云

私有云

混合云

按服务模式分:

IaaS(Infrastructure as a Service)基础设施作为服务

PaaS(Platform as a Service)平台作为服务

SaaS(Software as a Service)软件作为服务

Page 6: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云计算的特点及优点

云计算的特点:超大规模使用虚拟化技术高可靠性可扩展性通用性按需、自助服务高性价比

云计算的优点集中计算资源,实现自动管理,有利于降低成本提供了可靠、安全的数据中心来存储数据对用户端设备要求低,PC、手机、电视均可接入不同设备间的数据与应用共享无限可能的网络应用

Page 7: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云计算的应与开发用场景

应用场景

工作负载

计算

存储

通信

部署和管理

Page 8: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Platform简介

• 计算

• 存储

• 管理

Windows Azure

• 关系型数据

• 管理SQL Azure

• 服务总线

• 访问控制AppFabric

Page 9: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure计算

Window Azure Storage:Blob、Queue、Table

Fabric Controller

Page 10: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

SQL Azure

基础设施层:存储OS

服务管理

平台层:SQL Server实例SQL Server Fabric

管理服务

服务层:数据提供(Provisioning)

账单和计量(Billing and 、Metering)连接路由(Connection Routing)

客户端层:使用了当前客户端上安装的SQL Server的功能

Page 11: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure AppFabric

是一个基础架构服务

能被自有软件和云服务使用

AppFabric最常用的一个场景是:Web Role和Worker Role之间的通信

AppFabric最强大的地方在于能够跨平台

Service Bus 和Access Control

Page 12: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

开发环境与开发过程

• 按开发类型分

• 按微软云计算平台分开发场景

• Visual Studio

• SQL Express

• Windows Azure Tool

• SDK

开发环境介绍

• 开发

• 配置

• 测试

• 部署

开发、测试和部署过程

Page 13: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

开发场景

按开发类型分:

Web 应用程序:传统的 Web 应用程序或交互式应用程序和服务

并行计算:并行大规模计算任务

分析应用程序:数据挖掘、报表、商务智能

按 Windows Azure platform组成分:

Windows Azure Storage:Blob、Queue、Table

Web Role 和Worker Role开发

SQL Azure开发

AppFabric开发

Page 14: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

开发环境

VS 2008 SP1以上\VS 2010(推荐)SQL Express 2005以上Windows Azure Tools for Microsoft Visual Studio 1.1

Windows Azure SDK

Windows Azure AppFabric SDK V1.0

Windows Azure Platform Training Kit - June Update

其它(开发人员中心):Java SDK、PHP SDK、Ruby SDK

Page 15: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

开发部署过程

在VS 2010中,云应用开发主要包含6个步骤:

创建云服务

编写云服务代码

配置云服务

生成云服务

运行和调试服务

发布服务

Page 16: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云应用开发实战

云中的hello world

Web Role与Worker Role的开发

Windows Azure Storage开发

连接SQL Azure

迁移现有SQL Server数据库至SQL Azure

Page 17: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云中的hello world

1. 创建云计算项目

2. 浏览工程

3. 编写WebRoleHelloWorld代码

4. 设置启动项目、起始页

5. 设置服务定义和服务配置文件

6. 编译

7. 设置断点调试

8. 测试通过后部署

Page 18: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云中的hello world

Page 19: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云中的hello world

Page 20: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

云中的Hello World

Page 21: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Web Role Worker Role开发

1. 创建云计算服务项目

2. 编写Web Role功能

3. 编写Worker Role功能

4. 编译项目,使用Development Fabric模拟真实环境进行调试和运行

Page 22: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Web Role Worker Role开发

效果图

Page 23: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Web Role Worker Role开发

Page 24: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Storage-blob1. 创建DemoStoragBlob、BlobWebRole

2. 添加WebRole程序代码

1. 实体

2. ASPX

3. 后台代码

3. 配置应用程序:两种方法

4. 设置调试环境

5. 调试运行

Page 25: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Storage-blob

Page 26: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Storage-blob

Page 27: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

连接SQL Azure

使用SQL管理工具连接SQL Azure数据库

使用SQL 命令连接SQL Azure数据库

使用ADO.Net连接SQL Azure数据库

Page 28: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

SQL管理工具连接SQL Azure

Page 29: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

SQL CMD连接SQL Azure

Sqlcmd –U <userlogin@servername> -P <passwords> -S <Fully Qualified

ServerName> -D <database name>

执行示例命令行:sqlcmd -U sqladmin@ unjikh4kim -P pass@word -S

unjikh4kim.database.windows.net -d TestDB

Page 30: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

ADO.Net连接SQL Azure

private string GetDbConnection()

{

SqlConnectionStringBuilder connBuilder =

new SqlConnectionStringBuilder();

string server = "unjikh4kim.database.windows.net";

connBuilder.DataSource = server;

connBuilder.InitialCatalog = "TestDB";

connBuilder.Encrypt = true;

connBuilder.TrustServerCertificate = true;

connBuilder.UserID = "sqladmin";

connBuilder.Password = "pass@word";

return connBuilder.ToString();

}

using (SqlConnection conn = new SqlConnection(GetDbConnection()))

Page 31: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

迁移SQL Server至 Azure

SSMS

Page 32: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

迁移SQL Server至 Azure

Page 33: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

迁移SQL Server至 Azure

SQLAzureMW

1. 下载安装

2. 运行SQLAzureMW

3. 连接数据库

4. 选择数据库

5. 选择生成的脚步对象

6. 保存脚本文件

Page 34: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

迁移SQL Server至 Azure

Page 35: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

迁移SQL Server至 Azure

Page 36: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Demo

Page 37: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Platform学习资源

官方资源Windows Azure

http://msdn.microsoft.com/en-us/windowsazure/default.aspx微软云计算中文博客

http://blogs.msdn.com/b/azchina/

微软云计算解决方案白皮书Windows Azure Platform

http://msdn.microsoft.com/en-us/library/dd163896.aspx

开发人员中心(英)http://msdn.microsoft.com/en-us/azure/cc994380.aspx

开发人员中心(中)http://msdn.microsoft.com/zh-cn/azure/default.aspx

Windows Azure SDK

http://msdn.microsoft.com/en-us/library/dd179367.aspx

Channel 9上的视频Channel 9: Introducing Windows Azure - Manuvir Das

http://channel9.msdn.com/posts/Charles/Manuvir-Das-Introducing-Windows-Azure/

Channel 9: Windows Azure for Developers - Steve Marx

http://channel9.msdn.com/posts/Charles/Steve-Marx-Windows-Azure-for-Developers/

PDC: Developing and Deploying Your First Windows Azure Service

http://channel9.msdn.com/pdc2008/ES01/

PDC: Windows Azure: Cloud Service Development Best Practices

http://channel9.msdn.com/pdc2008/ES03/

Page 38: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Windows Azure Platform学习资源

WebcastWebcast-云起龙骧系列云时代的Windows Mobile开发系列课程微软技术创新日系列--云中开发,成就未来

书籍Windows Azure Architecture Guide - Part 1 (Microsoft Patterns & Practices)

Windows Azure Platform (Tejaswi Redkar)

Programming Windows Azure (Sriram Krishnan)

Cloud Computing with the Windows Azure Platform (Roger Jennings)

Azure in Action (Chris Hay & Brian Prince)

其它代码库

http://code.msdn.microsoft.com/Project/ProjectDirectory.aspx?TagName=azure

codeplex上的Azure资源http://www.codeplex.com/site/search?TagName=azure

Page 39: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

两个人交换一个苹果,每个人得到一个苹果。两个人交换思想,每个人得到两个思想。

Page 40: Windows Azure Platform 开发入门 - cnblogs.com · 2010-07-19 · Windows Azure Platform学 习资源 Webcast Webcast-云起龙骧系列 云时代的Windows Mobile开发系列课程

Thank you !!