微软客户端技术纵览

77

Upload: ntoskrnl

Post on 14-May-2015

1.329 views

Category:

Technology


12 download

TRANSCRIPT

微软客户端技术纵览

喻 勇开发平台合作部

微软 ( 中国 ) 有限公司[email protected]

http://blogs.technet.com/fyu

资源链接

Windows 7 开发新特性

IE8 新特性

WPF & Silverlight

内容提要

Windows 7 开发新特性

演 示Windows 7 的用户界面

多点触摸Jump Lists

Ribbon User InterfaceFederated Search

多点触摸技术

Surface Hardware

Windows 7

Surface Hardware

Windows VistaWindows 7

NativeWin32

Application

WPF 3.5

Surface SDK1.0

Managed Wrapper and Interop

Managed Wrapper and Interop

WinForms Application

WPF 3.5 SP1

WPF 4.0

Surface SDK2.0

WPF Application

Surface Application

Multi-Touch Controls

Multi-Touch API

Surface Multi-Touch

Controls & API

Multi-Touch API

Multi-Touch API and Controls

多点触摸的开发技术路线图

Good Better BestAPIs For Free!

•Panning/zoom gestures•Right click gesture

•Gesture notifications•Pan/zoom/rotate/etc

•Raw touch data•Manipulation and

Inertia processors

Native Win32

•Controls with standard scrollbars

•WM_GESTURE message •WM_TOUCH•COM based

Manipulation and Inertia Processors

WPF •WPF 4.0 pan support in ScrollViewer

•Gesture events• Inertia configuration

• Touch events•Manipulation and Inertia

Processors

WinForms •Controls with standard scrollbars

•WM_GESTURE message• P/Invoke

•Manipulation and Inertia Processors in Microsoft.Ink.DLL•Real-time Stylus or Ink

Collector

多点触摸的开发 API 选择

Windows 7 的任务条

Enhanced Taskbar Jump Lists Thumbnail Toolbars Custom Switchers Icons Overlay Icons Progress Bars

运行中 未运行 活动窗口 多个窗口

Windows 7 Taskbar – Jump Lists

每个程序的定制“开始菜单 " 内容可自定义 可以通过右键和拖拽访问

Destinations(“nouns”)

Tasks(“verbs”)

Known categories

Custom categories

User Tasks

Taskbar Tasks

Pinned category

Windows 7 Taskbar – Jump Lists

自定义 Jump ListStep 1: Hello World

• 把程序跟文档进行关联• 文件对话框• 最近打开的文档列表

SHAddToRecentDocs(SHARDW_PATH, "file.ext");

RH.RegisterFileAssociations(...);OpenFileDialog ofd = ...; ofd.ShowDialog();JumpListManager jlm = ...;jlm.AddToRecent("file.ext");

自定义 Jump List Step 2: 添加任务

• 用户希望– 以特定的参数或者命令行启动应用程序– 启动其他应用程序

• IShellLink objects– 可以包括参数、工作路径、图标等

自定义 Jump List Step 2: 添加任务

IObjectCollection* poc = ...;IShellLink* task = ...;poc.AddObject(task);ICustomDestinationList* pcdl = ...;pcdl.BeginList(...);IObjectArray* poa = ... poc;pcdl.AddUserTasks(poa);pcdl.CommitList();

JumpListManager jlm = ...;jlm.AddTask(new ShellLink { Path=..., ... });

自定义 Jump List Step 3: 添加类别

• 文档需要分类嘛?– 常用文档不够用?– E.g. Inbox, Outbox, Sales, Marketing …

• IShellItem or IShellLink objects

自定义 Jump List Step 3: 添加类别

IObjectCollection* poc = ...;IShellItem* item = ...;poc.AddObject(item);ICustomDestinationList* pcdl = ...;pcdl.BeginList(...);IObjectArray* poa = ... poc;pcdl.AppendCategory(L"Sales", poa);pcdl.CommitList();JumpListManager jlm = ...;jlm.AddCustomDestination( new ShellItem { Path=..., Category=... });

Windows 7 Taskbar – Thumbnails

Windows 7 Taskbar – Custom Switchers

Windows 7 Taskbar – Icons

Application Menu

Quick Access Toolbar

Tab Contextual Tab SetContextual Tab

Help

Group (aka “Chunk”) Dialog Launcher

• Windows 7 内置, Vista 可以安装• 使用 Win32 API• 与 Office 2007/WPF Ribbon 类似

Windows Ribbon

Microsoft’s Ribbon Strategy

MFC ScenicWPF

Target:Managed

Target:MFC native

Target:Native

needs .NET 3.5 Win2K or newer Vista or newer

Office 2007 & Windows styles

Office 2007 & Windows styles1

Windows visual style

Coming soon…Official release in 2009

Available now in Visual Studio 2008 SP1

Coming soon…Ships with Windows 7

Windows Ribbon 的路线图

Categorized Menus

Tabs & Groups

Color Pickers

Mini Toolbar &Contextual Menu

Dropdown GalleriesTooltips

Check Boxes

Spinners

Font Control

Group Dialog Launchers

“In-Ribbon” Galleries

Combo Boxes

Buttons & Split Buttons

Windows Ribbon 的控件

Federated Search

Document Repository

Enterprise Data Store

Enterprise Application

How Federated Search Works

富文本 (Rich client) 体验 预览 , 元数据 , 拖拽 浏览器友好

简单和轻量级的集成 无需客户端代码 任意的服务器平台

基于标准的 OpenSearch 1.1 RSS and ATOM

认证 集成认证或自定义

1. Search Connector (.osdx) Installed

2. Windows sends search terms as HTTP request

3. RSS results returned from server

Federated Search

你的搜索源应该 : 接受 URL 请求

例如 : http://www.contoso.com/q={searchTerms} 定义 Rich Items 返回 RSS 格式结果

Windows 7 的实现 : XML 搜索容器 属性匹配 (Property mapping)

例如 : BookAuthor System.Author 缩略图和预览 自定义视图

回家作业

立刻下载安装 Windows 7 beta立刻下载安装 Windows 7 beta SDK开发一个 Jump List 应用开发一个 Federated Search 应用

IE8 新特性

兼 容 W3C 标 准 改 进 对 RSS , CSS , A JAX 的 支 持 优 化 J avaSc r ip t 性 能 。 新 增 加 速 器 , 网 页 快 讯 以 及 可 视 化 搜 索 隐 私 浏 览 和 SmarSc reen 反 仿 冒 过 滤

IE8 : Accelerators

今天的用户上网习惯选中内容

复制

切换到指定网页

登陆(如果需

要)

复制文本

执行操作

返回之前浏览的页

Accelerators 的流程

在加速器中预览

视图中的结果

安装加速器Accelerato

rs选中内容

选择加速器Accelerato

rs

执行Accelerato

rs

转到服务页面

Accelerators 的流程

OpenService XML Description

Serialize Content

Navigate URL

HTML

在加速器中预览

视图中的结果

安装加速器Accelerato

rs选中内容

选择加速器Accelerato

rs

执行Accelerato

rs

转到服务页面

Accelerators 的格式

上下文 (Context) Accelerators 所选中的文字内容

Accelerators 的格式

上下文 (Context) Accelerators 所选中的文字内容

分类加速器的分类

Accelerators 的格式

上下文 (Context) Accelerators 所选中的文字内容

分类加速器的分类

预览返回结果的快速察看窗口

Accelerators 的格式

上下文 (Context) Accelerators 所选中的文字内容

分类加速器的分类

预览返回结果的快速察看窗口

执行服务接口,用来向后端服务发起请求

OpenService 的格式<?xml version="1.0" encoding="utf-8" ?> <openServiceDescription

xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0"> <homepageUrl>http://maps.live.com</homepageUrl> <display> <name>Map with Live Maps</name> <icon>http://maps.live.com/favicon.ico</icon> </display> <activity category="Map"> <activityAction context="selection"> <execute method="get“

action="http://maps.live.com/default.aspx?where1={selection}" /> <preview method="get" action="http://maps.live.com/geotager.aspx"> <parameter name="b" value="{selection}" />

<parameter name="clean" value="true" /> <parameter name="w" value="320" /> <parameter name="h" value="240" /> <parameter name="format" value="full" />

</preview> </activityAction> </activity></openServiceDescription>

Accelerators 的部署

//check the user agent string if client is MSIE 8.0//for more info:

http://msdn2.microsoft.com/en-us/library/ms537509.aspx

//check whether service is already installed

window.external.IsServiceInstalled(‘http://maps.live.com/livemaps.xml’, ‘map’);

//if false, display button to add service

window.external.AddService(‘http://maps.live.com/liveMaps.xml’) ;

回家作业

1. 考虑如何用 Accelerators 与你的网站服务进行结合

2. 创建一个 OpenService 格式的 Accelerators

3. 广而告之,找人安装使用你的 Accelerators

参考资料: http://www.microsoft.com/windows/internet-explorer/beta/features/accelerators.aspx

IE8 : Web Slice

最简单的例子

<div class=”hslice” id=”1” >

<p class=”entry-title”>Amazon Kindle, Unopened</p><div class=”entry-content”>

<img src=”pic.jpg”><p>Current bid: US $282.11</p>

</div></div>

Top-Level NotificationBold on updated contentItalic for expiring contentGrey on expired content & errors

Details FlyoutHTML extracted from webpage (static content)Imported basic HTML stylingClick-thru access to website

Favorites BarContains Favorite links, feeds, &WebSlices Organize content through folders

RSS Feed 和 WebSlices

WebSlices 的工作流程

Windows Feeds Platform supports feeds and WebSlices

Converts WebSlice HTML as Atom feed

Sanitizes content no script basic styling: imported stylesheet,

style blocks, & direct styles

Content stored locally, accessible by Feed API

Download Feed (XML)

Download HTML with WebSlice

Convert to Atom Feed (XML)

Feed Parser

compare downloaded

data with stored data

Mark Feed as Updated

`

Download Engine

如何实现 WebSlices

将你提供webSlices订阅的网页内容,放在一个 class为“ entry-content” 的容器内,当浏览器将鼠标移动到这个区域就会出现 webSlices 的订阅图标。

Feed

WebSlice

WebSlice

Feed

WebSlice

Feed

Feed

WebSlice

WPF & Silverlight

Silverlight 概览

跨浏览器跨平台插件 .NET丰富媒体体验丰富的交互式应用 (RIA)

Silverlight 2 的运行时功能2D, GraphicsAudio, VideoAnimationsText, Text Input*Controls*Layout*Styles/Templates*Data Binding*NetworkingHTTP/S and Sockets*

* New in Silverlight 2

.NET Support*C# and VB.NET*LINQ*XML APIs*Generics*HTML Integration*JSON SerializerLocal storage*Crypto APIs (AES)*Threading*

设计师和开发者 : 用相同的语言

设计者和开发者的体验

设计师设计如下

设计师和开发者 : 用不同的语言

开发者完成业务逻辑

设计师 开发者

Expression Studio

Expression Design

Expression Blend

Expression Encoder

Media vs. Media Encoder

Light video editing

Video export

Video overlays

Silverlight典型应用模式

演 示Silverlight播放高清视频http://www.smoothhd.com/

演 示Silverlight 广告路虎广告

演 示Deepzoom 和 Hard Rock Memorabiliahttp://memorabilia.hardrock.com/

演 示淘宝网闪光店铺http://list.mall.taobao.com/promotion/activity/silverlight.htm

更好的用户体验 更多的商业机会 更丰富的技术

.NET Framework子集

样式模板

内置控件

全面网络支持

高清视频

Deep Zoom

DRM

增强服务器扩展能力

Silverlight小结

资源链接

http://blogs.technet.com/fyu

www.microsoft.com/windows

http://www.microsoft.com/ie7

http://www.silverlight.com/

答疑解惑

感谢您参与此会场!您的意见与建议对我们非常重要。

请您填写反馈表。

© Microsoft Corporation. All rights reserved. Microsoft Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions. It should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.