1 / 29

ASP.NET: 移动Web应用程序的 构建技巧和窍门

ASP.NET: 移动Web应用程序的 构建技巧和窍门. 汪涛 Software Design Engineer Exchange Server Product Unit Microsoft Corporation. .NET Framework. ASP.NET. Windows Forms & .NET Compact Framework. Web Forms. Mobile Web Forms. Web Services. Services Framework. Base. Data. Debug. ….

elu
Download Presentation

ASP.NET: 移动Web应用程序的 构建技巧和窍门

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ASP.NET: 移动Web应用程序的构建技巧和窍门 汪涛 Software Design Engineer Exchange Server Product Unit Microsoft Corporation

  2. .NET Framework ASP.NET Windows Forms & .NET Compact Framework Web Forms Mobile Web Forms Web Services Services Framework Base Data Debug … Mobile Web Form Common Language Runtime System Services Mobile Internet Toolkit • 扩展ASP.NET方便移动Web应用程序的开发 • 和Visual Studio .NET 开发环境紧密结合易于使用 • 针对多种设备和Markup Language

  3. 第一版支持的设备 详细情况:http://msdn.microsoft.com/vstudio/device/mitdevices.asp • ACCESS Compact: NetFront 2.0, Fujitsu F503i, Mitsubishi D502i, Mitsubishi D503i, NEC N210i, NEC N502i, Sony SO503i • Ericsson 2.0: Ericsson R380, Ericsson R320, Ericsson R520m, Ericsson T20s • GoAmerica Go.Web: Compaq iPAQ H3650, Palm Vx, RIM Blackberry 857, RIM Blackberry 950, RIM Blackberry 957 • Microsoft Mobile Explorer: Sony CMD-Z5, Sony CMD-J5, Benefon Q • Microsoft Pocket Internet Explorer: Casio Cassiopeia E-125, Compaq iPAQ H3630, Compaq iPAQ H3650, HP Jornada 720, Compaq iPAQ H3670 • Nokia: Nokia 3330, Nokia 6210, Nokia 7110, Nokia 9110i • Openwave UP.Browser 3.x: Audiovox CDM-9000, Ericsson R280LX, Hitachi C407H, Kyocera QCP 2035A, Kyocera QCP 3035, LG V111, Mitsubishi T250, Motorola StarTAC 7868W, Motorola TimePort P8767, Samsung SCH-6100, Samsung SCH-850, Samsung SCH-8500, Samsung UpRoar M100, Sanyo C401SA, Sanyo SCP-4500, Sanyo SCP-5000, Sprint Touchpoint, Sprint Touchpoint 2200, Sprint Touchpoint 3000 • Openwave UP.Browser 4.x: Alcatel One Touch 701, Audiovox CDM-135, Audiovox CDM-9100, Motorola i1000plus, Motorola i2000plus, Motorola i50sx, Motorola i85s, Motorola T2288, Motorola TimePort P7382i, Motorola TimePort P7389, Motorola V100, Motorola V120c, Motorola V2288, Motorola V60c, Siemens C35i, Siemens S35i, Siemens SL45 • Miscellaneous Browsers: Handspring Visor Platinum (Qualcomm Eudora Internet Suite 2.1; Blazer 1.0 and Omnisky 2.1.0.15), IBM WorkPad c505 (ilinx Xiino 1.01J), Kyocera QCP 6035 (Qualcomm Eudora 2.0), Nokia 9210 (Symbian Crystal 6.0), Palm VII (MyPalm 1.0), Palm Vx (AU-Systems 2.12181.1 and Omnisky 2.0.04), Palm m505 (MyPalm 1.1), Panasonic P210i, Panasonic P502i, Sharp J-SH04 (Original Equipment Manufacturer's Version 3.0), Sharp Zaurus MI-E1 (Original Equipment Manufacturer's Version 6.1), Sony CLIE PEG-N700C (ilinz Palmscape 4.0SJ), Toshiba J-T05 (Original Equipment Manufacturer's Version 3.0), YY

  4. 日程安排 • 改变思维方式: 移动设备不是台式机 • 在移动设备上, 信息要少而精 • 设计完美的移动Web应用程序 • 使用Session State • 使用Mobile Forms Authentication • 自适应显示的技巧 • 本地化 • 为Pocket PC定制界面 • 使用DeviceSpecific • 使用Stylesheet用户控制

  5. 日程安排 • 改变思维方式: 移动设备不是台式机 • 在移动设备上, 信息要少而精 • 设计完美的移动Web应用程序 • 使用Session State • 使用Mobile Forms Authentication • 自适应显示的技巧 • 本地化 • 为Pocket PC定制界面 • 使用DeviceSpecific • 使用Stylesheet用户控制

  6. 台式机的思维方式 屏幕看起来应该是什么样的? 每个功能应该放在屏幕的哪个部分最好看 移动设备的思维方式 用户想要做什么? 功能排列的顺序至关重要 考虑移动设备 – 而不是台式机 基于功能的设计改变设计思维方式

  7. 演示 在移动设备上, 信息要少而精

  8. 日程安排 • 改变思维方式: 移动设备不是台式机 • 在移动设备上, 信息要少而精 • 设计完美的移动Web应用程序 • 使用Session State • 使用Mobile Forms Authentication • 自适应显示的技巧 • 本地化 • 为Pocket PC定制界面 • 使用DeviceSpecific • 使用Stylesheet用户控制

  9. Session State 技巧

  10. 演示 Session State管理技巧

  11. Mobile FormsAuthentication • 支持不能接收Cookie的设备 • 在配置文件中使用 cookie-less • 可以扩展以适应开发人员的不同需要 • 可以自己创建用户账户 • 在你的网站上使用 HTTPS • 客户设备到Gateway需要WTLS • “WAP GAP”

  12. 演示 Mobile Forms Authentication

  13. 自适应显示的技巧 • 使用表格 • Navigation 表格 • 使用 ObjectList 显示复杂数据 • 打开pagination • 关闭wrapping • 同一页上不要显示其他控制 • 输入表格 • 关闭 BreakAfter • 需要一个command提交表格 • 为 PocketPC 定制

  14. 演示 自适应显示的技巧

  15. 本地化 • ASP.NET 的本地化模型 • 把不同语言的资源放在各自的子目录下 • 例如:中文简体放在zh-cn子目录下, 法语放在fr-fr下 • 运行时根据HTTP请求中的Accept-Language属性选择适用的资源 • Moblie Internet Toolkit的特别处 • MIT生成的界面包含有文字 • 应用程序必须用本地化的资源改写这些文字 • 例如:Command.SoftkeyLabel, ObjectList.BackCommandText 等

  16. 日程安排 • 改变思维方式: 移动设备不是台式机 • 在移动设备上, 信息要少而精 • 设计完美的移动Web应用程序 • 使用Session State • 使用Mobile Forms Authentication • 自适应显示的技巧 • 本地化 • 为Pocket PC定制界面 • 使用DeviceSpecific • 使用Stylesheet用户控制

  17. 定制 • 确定“看起来的感觉” • 确定styles (例如字体、颜色、排放位置等) • 把这些styles集合在一个StyleSheet 里 • 特定设备显示 • 精确控制在某个设备上的显示 • 选择设备或一组设备 • 改写缺省属性 • 使用模板

  18. 特定设备显示 • 在开发时 • 定义一个过滤器来选择特定设备 • 在控制上加入DeviceSpecific结构 • 制定使用方式 • 改写缺省属性 • 模板 • 在运行时 • 过滤器筛选出特定设备 • 使用模板或者改写属性

  19. Property Override DeviceSpecific Tag Device-Specific Template Filter 特定设备显示 <mobile:List runat=server DataTextField=“Title”> <DeviceSpecific> <Choice Filter=“IsSmallScreen” DataTextField=“ShortTitle” /> <Choice Filter=“IsPocketPC”> <HeaderTemplate> … </HeaderTemplate> <ItemTemplate> … </ItemTemplate> … </Choice></mobile:List>

  20. 演示 特定设备显示

  21. StyleSheet • Mobile StyleSheet • 把所有Style信息组织起来放在一起 • 可以用在一个控制上或一个网页上 • 如果某个设备不支持这些设置它会不理这些设置 • 可以在整个网站上公用 <mobile:StyleSheet id="StyleSheet1" runat="server"> <mobile:Style Font-Size="Large" Font-Bold="True" Name="Header“/> <mobile:PagerStyle Font-Name="Verdana" Name="Form" BackColor="#C0FFFF“/> </mobile:StyleSheet>

  22. 演示 用Stylesheet定制用户控制

  23. 定制的选择 注意: Stylesheets 可以包含特定设备控制

  24. 总结 • 为特定设备定制 • 细致调整自适应显示 • 明智地使用session state 和mobile authentication • 改变思维方式

  25. 其他相关的讲座 • ASP.NET:定制和扩展Mobile Internet Toolkit(MBL401) • ASP.NET:移动Web应用程序的构建技巧和窍门(MBL402)

  26. 更多信息http://www.msdn.microsoft.com/vstudio/nextgen/technology/mitdefault.asp更多信息http://www.msdn.microsoft.com/vstudio/nextgen/technology/mitdefault.asp • 其他网站 • MMIT Download • MSDN Library • ASP.NET • MMIT VS.NET • IBuySpy Portal www.IBuySpy.com • 快速启动: www.gotdotnet.com • KB文章: MMIT PSS Web Site • 加入微软中国用户社区:http://www.microsoft.com/china/community/newsgroup.asp

  27. 感谢大家欢迎提问

  28. © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related