利用 ASP.NET MVC 提升您的 Web 應用程式

Slides:



Advertisements
Similar presentations
Web Role 的每台虚机运行有 IIS ,用于处理 Web 请求 Worker Role 用于运行后台进程 Cloud Service 是什么? 支持多层架构的应用容器 由多个 Windows 虚拟机集群构成 集群有两种类型: Web 和 Worker Cloud Service 做什么 进行应用的自动化部署.
Advertisements

应用技术 陕西华辉科技有限公司.
泛舆情管理平台 ——助力媒体业务创新 新模式 新格局 创新盈利增长点 2/26/2017 1:59 AM 屈伟: 创始人,总裁
中国银行业前置端操作系统移植研究.
3/3/ :01 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
请点击以下链接下载WinHEC的演讲材料
借助公有云实现游戏的弹性运营 Shaun Fang (方兴) Azure开发技术顾问
Windows Hyper-V与集群共享卷
请点击以下链接下载WinHEC的演讲材料
Eliyas Yakub 首席开发经理 US-Device & Storage
1. 设定愿景,确定业务场景 Microsoft Corporation
广东省广州市花都区教育局教研室 汤少冰 优化评估方式, 促进中学英语的教与学 广东省广州市花都区教育局教研室 汤少冰
張書源 Microsoft MVP MCT 趨勢科技 技術經理 網酷科技 資深顧問 集英信誠 資深顧問
Office 2013 全新功能介紹 台灣微軟 Office 大使 楊承恩 Marcus Microsoft Office
講師姓名:黃信嘉、黃振宇 職稱:微軟技術支援副理 公司名稱:台灣微軟 課程代碼:WCL305
四川省集体林权流转平台 中国西部林权交易网
全国信息技术标准化技术委员会 (SAC/TC28)工作交流
Windows 10 混合现实 Mingfei Yan 高级项目经理
W371 如何使网络设备更好的和Windows Vista工作
MBL 340 Tablet PC SDK:在您的应用程序中使用数字墨水
資料檔案的安全性管理 羅英嘉 2007年4月.
今天很高兴能够利用Web Cast和大家讲解嵌入式XP的新增功能。
什麼是電子軟體下載 Electronic Software Download (ESD).
OFC 302 InfoPath2007新特性及解决方案.
最新 Windows Server 徽标 要求和计划
Windows Mobile 轻松接轨GPS
Microsoft Office SharePoint Server 2007 事件追蹤與專案管理
SOLUTIONACCELERATORS Windows Vista Hardware Assessment 1
MSG 321 统一消息架构和PBX集成.
朝雲端專業DBA邁進: 深入剖析 Windows Azure SQL Database 完整資料庫管理、雲端報表建立、建置分散式雲端資料庫
利用最新Hyper-V Replica 功能達成Hyper-V 災難備援機制
Windows Server 2008 NAP整合802.1x網路安全控管
互聯網安全資訊 助您達至更安全的網上體驗.
服務啟用、導入流程、 郵件移轉步驟簡介 Microsoft Office 12/2/2018
MBL 325 开发跨平台的 Windows Mobile应用程序
MBL 327 Windows Mobile开发中的异构系统集成
Cameron Brodeur Program Manager US-Device & Storage PM
David Edfeldt Senior Program Manager Windows Logo Program
构建 Windows TV Tuner 产业 生态环境的重要观点
微软新一代云计算 面向企业的 Office 365 客户培训大纲
1/2/ :39 PM 讀經 以弗所書 4:31-32 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may.
1/2/ :38 PM 耶利米書 33:1-3 約翰福音 14:12-14 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
使徒行傳 21:17-23章「保羅的見證(一)」 引言 預言保羅為主的名受許多的苦難的實現
超完美整合 SQL Server 2008 MOSS 2007 及 Excel 2007 打造好用又省錢的 企業商業智慧解決方案
2/24/2019 5:40 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Exchange 2007 系統部署 -- 儲存預測與測試
教师课堂教学能力提升培训 ---“互联网+教育”考勤小测验 Plickers 洛阳理工学院
Microsoft SQL Server 2008 報表服務_設計


橫跨電腦、手機與軟體的全方位端點管控解決方案
请点击以下链接下载WinHEC的演讲材料
CON223 UDDI:服务的发现和搜索.
呂政周 精誠恆逸教育訓練處 資深講師 Windows PowerShell 呂政周 精誠恆逸教育訓練處 資深講師
使用WPF创建Windows应用和Web应用
水深之處 Launch Out into the Deep
4/30/2019 7:40 AM 約翰福音 15:9;17:20-23 加拉太書 6:1-2 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
DEV 343 VS2005超快速开发方案/EEP2006控件包.
5/4/2019 4:42 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
使徒行傳 24-26章 [ 保羅的見證(二)] 徒9:15 “  主 對 亞 拿 尼 亞 說 、 你 只 管 去 . 他 是 我 所 揀 選 的 器 皿 、 要 在 外 邦 人 和 君 王 並 以 色 列 人 面 前 、 宣 揚 我 的 名 。 ”]
TechEd /6/ :36 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows 徽标计划工具:综述与发展趋势
5/5/2019 7:06 PM 两跨框架梁截面配筋图的绘制 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may.
百万亿次超级计算机诞生记 姓名 Xiangyu Ye 职务 微软中国技术中心资深HPC顾问 公司 微软中国
5/15/2019 姓名: 公司名称: 云赛空间BP模板 Now let’s take a look at who we are, what we’re doing and why we’re doing it in China... This is an image of a technology.
DEV 343 VS2005超快速开发方案/EEP2006控件包.
MGT 213 System Management Server的昨天,今天和明天
Bob Combs Lead Program Manager Microsoft Corporation
Ron Jacobs 高级技术专员 Microsoft
Windows Workflow Foundation CON 230
Presentation transcript:

利用 ASP.NET MVC 提升您的 Web 應用程式 Tech·Days 4/6/2019 6:07 AM 利用 ASP.NET MVC 提升您的 Web 應用程式 董大偉 David@studyhost.com 台灣微軟MSDN講座講師 TechED 2007, 2008講師 © 2009 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.

Develop Web Application with ASP.NET MVC 本場次大綱 4/6/2019 6:07 AM Develop Web Application with ASP.NET MVC 本場次大綱 從5W1H看ASP.NET MVC 什麼是MVC? 透過這樣的架構開發的應用程式有何優點? ASP.NET MVC Framework又是什麼? 和ASP.NET WebForm技術不同嗎? 如何利用ASP.NET MVC來開發MVC應用程式? 如何撰寫出較好的Web應用程式? © 2007 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.

解決方案總是從問題而來 - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 解決方案總是從問題而來 - Develop Web Application with ASP.NET MVC ASP.NET MVC的 5W 1H WHAT - 什麼是ASP.NET MVC? WHEN - 何時需要使用ASP.NET MVC? WHY - 為何要使用ASP.NET MVC? WHO - 誰適合來使用ASP.NET MVC? WHERE - 在些場合中需要使用ASP.NET MVC? HOW - 如何開發ASP.NET MVC 應用程式? © 2007 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.

什麼是MVC? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 什麼是MVC? - Develop Web Application with ASP.NET MVC MVC… 是一種設計模式。 MVC這個Pattern要求我們在開發程式的時候,把我們要透過程式碼達成的一個功能,在設計時切割成Model、View、Controller這三個部分(的程式碼)。 每一個部分可以獨立互不干涉,但執行時可以互相合作,已達成功能,開發時亦可由不同的開發人員進行開發、同時也便於Unit Test。 目的: 降低程式碼之間的相依性、提高重用性 便於多人開發、單元測試、降低開發成本 結構清晰、利於後續維護 … © 2007 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.

什麼是MVC? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 什麼是MVC? - Develop Web Application with ASP.NET MVC Controller Model View © 2007 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.

什麼是MVC? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 什麼是MVC? - Develop Web Application with ASP.NET MVC ASP.NET MVC 微軟平台上新提供的MVC開發架構,透過這組類別庫,開發人員可以MVC架構來建立Web應用程式。這組MVC架構可以同時提高程式的延展性與彈性,降低.aspx頁面與後端資料庫、商業邏輯之間的相依性,達成大型專案的快速開發、高重用性、容易調整與維護的目的。 © 2007 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.

什麼是ASP.NET MVC Framework - Develop Web Application with ASP.NET MVC 架構在ASP.NET技術上的一組Framework。 讓開發人員得以輕鬆建立出MVC架構的應用程式。 提供建構MVC應用程式所需的基礎類別、以及相關工具(Helper) 。 概念上與ASP.NET WebForm並不相同,不支援事件驅動、Web Controls、或是Postback…等機制。 支援了一些ASP.NET過去相當優秀的設計,例如Master-Page、MemberShip、UserControl等機制。 © 2007 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.

ASP.NET MVC Framework View Controller Model 負責與UI顯示有關的部分,在這個部分當中的程式碼,只應該與UI(或UI上的操作)有關,不應該有任何與商業邏輯、後端資料庫有關的任何程式碼,對於Web應用程式來說,就是Render出HTML與前端JavaScript操作的部分。 View 這個部分的程式碼可以是部分的商業邏輯、可以是應用程式當中所需要的運算規則或演算法、Controller中的程式碼可以依照實際的需求(功能)決定調用(或存取)哪一個Model、可以動態的決定用哪一個View來呈現運算後的結果,Controller同時也負責回應前端View所產生的事件(或需求)。 Controller 一般來說就是Data Model,同時負責了實際資料庫存取的部分,這部分的程式碼負責把後端資料庫給封裝起來,讓Controller或View可以完全不(需要)知道(或不在乎)後端資料庫的長相究竟為何,只需要透過Model即可正確的存取後端資料庫。 Model 降低相依性, 不能假設View知道Controller, 或Contoller知道View, 僅依照ViewData交換資料, Contoller可以決定用哪一 個View或Model…

ASP.NET MVC Framework Models Views Controllers Bmi HR Data Model Post .aspx Data Model Member HR Bmi Get LinqToSql(.dbml) .aspx 降低相依性, 不能假設View知道Controller, 或Contoller知道View, 僅依照ViewData交換資料, Contoller可以決定用哪一 個View或Model… .aspx ViewData ADO.NET Entity Framework (.edmx)

MVC三合一應用程式  這種程式我們稱為:MVC三合一寫法 『一氣呵成』、從前端殺到後端的『直搗狂龍式』寫法ClassicBmiWebAP 4/6/2019 6:07 AM MVC三合一應用程式  Protected Sub Button_GetBMI_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button_GetBMI.Click Dim BMI As Single Dim height, weight As Single '從UI取得身高體重 height = Me.TextBox_Height.Text weight = Me.TextBox_Weight.Text '計算BMI(主要邏輯運算) BMI = weight / (height / 100) ^ 2 '顯示BMI Me.Label_Result.Text = "計算結果 BMI=" & BMI ‘將資料儲存到資料庫 SqlDataSource1.InsertCommand = "Insert into BmiData (Height,Weight,BMI) values (@Height,@Weight,@BMI)" SqlDataSource1.InsertParameters.Add("Height", height) SqlDataSource1.InsertParameters.Add("Weight", weight) SqlDataSource1.InsertParameters.Add("BMI", BMI) '顯示訊息 If SqlDataSource1.Insert() > 0 Then ClientScript.RegisterStartupScript(Me.GetType, "", "alert('儲存成功');", True) Else ClientScript.RegisterStartupScript(Me.GetType, "", "alert('儲存失敗');", True) End If Dim query As System.Data.Services.Client.DataServiceQuery(Of crNorthWindModel.客戶) = DirectCast(result.AsyncState, System.Data.Services.Client.DataServiceQuery(Of crNorthWindModel.客 戶)) '將抓取到的資料填入DataGrid DataGrid1.ItemsSource = query.EndExecute(result).ToList() '顯示訊息 Windows.Browser.HtmlPage.Window.Alert("OK") 這種程式我們稱為:MVC三合一寫法 『一氣呵成』、從前端殺到後端的『直搗狂龍式』寫法ClassicBmiWebAP © 2007 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.

MVC三合一的問題 - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM MVC三合一的問題 - Develop Web Application with ASP.NET MVC 在同一個事件當中, 又處理UI, 又處理邏輯, 又存取DB 前端.aspx頁面與後端資料庫密不可分 前端.aspx頁面與後端商業邏輯程式碼難分難捨 即使具有DataAccess Class也難免保證開發人員遵循(*) 牽一髮而動全身 © 2007 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.

MVC三合一的問題 - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM MVC三合一的問題 - Develop Web Application with ASP.NET MVC 應該如何改進? 將Business Logic獨立出來 將資料庫存取部分獨立出來 結果: 程式碼相依性降低、可重用性提高 程式碼變多? 效能會提升嗎? © 2007 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.

DEMO:調整MVC三合一程式,使之 將Business Logic獨立出來 將資料庫存取部分獨立出來 程式碼相依性降低、可重用性提高 4/6/2019 6:07 AM DEMO:調整MVC三合一程式,使之 將Business Logic獨立出來 將資料庫存取部分獨立出來 程式碼相依性降低、可重用性提高 介紹現成 做一個Login視窗的Demo SimpleLogin D:\MyDoc\0T.教育訓練\Microsoft MSDN講座-ASP.NET MVC\ClassicBmiWebAP2 © 2007 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.

MVC的目的 - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM MVC的目的 - Develop Web Application with ASP.NET MVC 避免在同一段程式碼當中, 又處理UI, 又處理邏輯, 又存取DB… 降低程式之間的相依性、提高重用性 讓程式碼結構更加清晰 不同的模塊可由擅長該技術的專職開發人員進行開發,降低開發成本,提高產能 便於Unit Test、使TDD成為可能 © 2007 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.

DEMO:建構第一個MVC應用程式 建立ASP.NET MVC Web Application 4/6/2019 6:07 AM DEMO:建構第一個MVC應用程式 建立ASP.NET MVC Web Application 建立BMI Controller與Index Action 建立ViewPage(含欄位) 撰寫BMI Class 在Controller中接收參數 調用BMI Class, 輸出結果 介紹現成 做一個Login視窗的Demo SimpleLogin D:\MyDoc\0T.教育訓練\Microsoft MSDN講座-ASP.NET MVC\BmiMvcApp © 2007 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.

ASP.NET MVC Framework MVC希望在程式面達成的效果 View與Business Login、Model之間徹底脫鉤絕緣 透過Controller轉派 資料來源: http://images.google.com.tw/imgres?imgurl=http://ash-mvc.org/media/Image/ash-mvc-architecture.gif&imgrefurl=http://ash-mvc.org/&h=301&w=351&sz=15&hl=zh-TW&start=2&tbnid=SgcaMgMTQ1kRfM:&tbnh=103&tbnw=120&prev=/images%3Fq%3DMVC%26gbv%3D2%26complete%3D1%26hl%3Dzh-TW

認識Controller - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Controller - Develop Web Application with ASP.NET MVC 負責接收Browser端透過HTTP GET/POST傳來的Request Url可決定該Request由哪一個Controller、哪一個Action來負責 Controller當中可以進行各種運算、亦可能包含商業邏輯、各種演算法…等程式碼。 如果有需要,可調用Model來進行後端資料庫存取的動作。 最後決定由哪一個View來處理結果的呈現。 同時將View需要呈現的資料透過ViewData傳遞給View。 © 2007 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.

關於URL Routing - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 關於URL Routing - Develop Web Application with ASP.NET MVC URL Routing機制負責將Browser傳來的Request對應到Controller與Action。 在這種設計架構下,我們可以用同一個『頁面』負責同一種『工作』 。 可降低頁面的數量,每一個頁面(View)清楚的負責一種『功能』,不需要撰寫許多頁面負責同樣的功能(例如不同資料表的顯示)。 URL直接對應到『功能』 ,在邏輯上更加直覺。 http://localhost:50302/bmi/index Web Site Controller Action © 2007 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.

認識Controller - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Controller - Develop Web Application with ASP.NET MVC Controller中程式碼的撰寫方式, 同名處理不同的Verbs ' HTTP GET: /Bmi/Index Function Index() As ActionResult (…略…) Return View() End Function ' HTTP POST: /Bmi/Index <AcceptVerbs(HttpVerbs.Post)> _ Function Index(ByVal TxbHeight As Single, ByVal TxbWeight As Single) As ActionResult 使用預設的View(也就是BMI/Index.aspx)來回應 從View欄位接收參數 © 2007 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.

關於URL Routing - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 關於URL Routing - Develop Web Application with ASP.NET MVC 例如,底下的URL可以用來顯示編號為17的產品: 請注意Global.asax檔案(設定Url Route, 底下為預設) http://store.abc.com/product/ShowDetails/17 Web Site Controller Action ID routes.MapRoute( _ "Default", _ "{controller}/{action}/{id}", _ New With {.controller = "Home", .action = "Index", .id = ""} _ ) © 2007 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.

認識Controller - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Controller - Develop Web Application with ASP.NET MVC Controller中程式碼的撰寫方式 各種ActionResult ViewResult, EmptyResult, RedirectResult, JavaScriptResult, ContentResult, FileContentResult, FilePathresult, FileStreamResult, … ' GET: /product/ShowDetails Function ShowDetails(ID As Integer) As ActionResult '取得ID '透過Data Model抓取資料庫中的內容 ‘將資料傳遞給ViewPage Return View() End Function © 2007 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.

Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 抓取ViewPage上的欄位值 ' POST: /Bmi/Index <AcceptVerbs(HttpVerbs.Post)> _ Function Index(ByVal TxbHeight As Single, ByVal TxbWeight As Single) As ActionResult (…略…) '使用預設的VIew Return View() End Function © 2007 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.

Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 透過ViewData將資料傳給ViewPage ' POST: /Bmi/Index <AcceptVerbs(HttpVerbs.Post)> _ Function Index(ByVal TxbHeight As Single, ByVal TxbWeight As Single) As ActionResult Dim BMI As Single Dim MyBMI As New BMI '使用BMI類別進行運算 MyBMI.Height = TxbHeight MyBMI.Weight = TxbWeight BMI = MyBMI.GetBMI() '將執行結果傳遞給View ViewData("result") = BMI '使用預設的VIew Return View() End Function © 2007 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.

Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM Controller如何與View溝通? - Develop Web Application with ASP.NET MVC 透過ViewData將資料傳給ViewPage ' POST: /Bmi/Index <AcceptVerbs(HttpVerbs.Post)> _ Function Index(ByVal TxbHeight As Single, ByVal TxbWeight As Single) As ActionResult (…略…) Return View(Model) End Function 可傳遞任何的物件給ViewPage © 2007 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.

認識Controller - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Controller - Develop Web Application with ASP.NET MVC 建立在Controllers資料夾中 繼承自System.Web.Mvc.Controller 負責回應Browser的各種Request 如何從ViewPage接收參數? 透過ID、透過ViewPage上的欄位 如何傳遞參數給ViewPage? 透過ViewData、透過ViewResult的Model參數 © 2007 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.

認識ViewPage - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識ViewPage - Develop Web Application with ASP.NET MVC 負責展示層UI的顯示。 與商業邏輯運算、後端資料庫均無關。 在這個部分當中可以有程式碼,但程式碼只應該與UI(或UI上的操作)有關,不應該有任何與商業邏輯、後端資料庫有關的任何程式碼,對於Web應用程式來說,主要就是Render出HTML與前端JavaScript操作的部分。 繼承於System.Web.Mvc.ViewPage 。 可透過ViewData取得來自Controller的資料。 可透過Model取得來自Controller的複雜資料。 具有HtmlHelper可使用,便於開發。 © 2007 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.

認識ViewPage - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識ViewPage - Develop Web Application with ASP.NET MVC 與過去ASP類似的程式撰寫方式 可透過HTML Helper協助產生需要的Html Element 不支援Web Controls 可透過ViewData抓取到Controller傳遞過來的資料 <% Using Html.BeginForm() %> <br/>身高:<% =Html.TextBox("TxbHeight") %> <br/>體重:<% =Html.TextBox("TxbWeight") %> <input type="submit" value="Calculate" /> <% End Using%> <% If ViewData("result") IsNot Nothing Then Response.Write("BMI:" & ViewData("result")) %> © 2007 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.

認識ViewPage - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識ViewPage - Develop Web Application with ASP.NET MVC Html Helper支援… Html.ActionLink(linkText,ActionName,ControllerName) Html.TextBox(name) Html.TextArea(name) Html.RadioButton(name,value) Html.BeginForm() Html.Encode(value) … © 2007 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.

DEMO:將MVC應用程式加入資料庫存取 4/6/2019 6:07 AM DEMO:將MVC應用程式加入資料庫存取 使用先前的BmiMvcApp 加入資料庫 調整ViewPage(新增欄位) 加入LinqToSql Data Model(封裝資料庫) 介紹現成 做一個Login視窗的Demo SimpleLogin D:\MyDoc\0T.教育訓練\Microsoft MSDN講座-ASP.NET MVC\BmiMvcAppWithDB © 2007 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.

認識Model - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Model - Develop Web Application with ASP.NET MVC 負責了實際資料庫存取的部分。 這部分的程式碼負責把後端資料庫給封裝起來,讓Controller或View可以完全不(需要)知道(或不在乎)後端資料庫的長相究竟為何,只需要透過Model即可正確的存取後端資料庫。 有效的隔離展示層程式碼與後端資料庫 可透過Bind修飾字將ViewPage上的資料繫結到Controller的參數,以便於儲存到DB Contoller中可透過ViewResult的Model參數將從DB取得的資料以物件型態傳遞給ViewPage。(請注意ViewPage須設定泛型型別) © 2007 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.

認識Model - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Model - Develop Web Application with ASP.NET MVC Contoller中可透過ViewResult的Model參數將從DB取得的資料,以物件型態傳遞給ViewPage。(請注意ViewPage須設定泛型型別) Dim db As New AddressBookDBDataContext ' ' HTTP GET: /AddressBook/ Function Index() As ActionResult Return View(db.AddressBook.ToList) End Function © 2007 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.

認識Model - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Model - Develop Web Application with ASP.NET MVC 承接的ViewPage,需要設定泛型型別,以便於取得資料 <%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of IEnumerable (Of AddressBookMvcApp.AddressBook))" %> <% For Each item In Model%> <tr> <td> <%=Html.ActionLink("Edit", "Edit", New With {.id = item.uid})%> | <%=Html.ActionLink("Details", "Details", New With {.id = item.uid})%> </td> <td> <%= Html.Encode(item.uid) %> </td> <td> <%= Html.Encode(item.cName) %> </td> <td> <%= Html.Encode(item.cTel) %> </td> <td> <%= Html.Encode(item.cMemo) %> </td> </tr> <% Next%> </table> </asp:Content> © 2007 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.

認識Model - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 認識Model - Develop Web Application with ASP.NET MVC 儲存(回寫)資料時,亦可透過Bind修飾字將ViewPage上的資料繫結到Controller的參數,以便於儲存到DB。 'Post: /Home/Create <AcceptVerbs(HttpVerbs.Post)> _ Function Create(<Bind(exclude:="uid")> ByVal TableData As AddressBookMvcApp.AddressBook) As ActionResult db.AddressBook.InsertOnSubmit(TableData) db.SubmitChanges() Return RedirectToAction("Index") End Function © 2007 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.

DEMO:建立資料庫處理MVC應用程式 AddressBookMvcApp 加入資料庫AddressBookDB.mdf 4/6/2019 6:07 AM DEMO:建立資料庫處理MVC應用程式 AddressBookMvcApp 加入資料庫AddressBookDB.mdf 建立Data Model 建立並規劃AddressBook Controller Index – 顯示所有紀錄 Create– 建立資料 建立相對應的ViewPage(可用Wizard) 撰寫Controller程式碼 介紹現成 做一個Login視窗的Demo SimpleLogin D:\MyDoc\0T.教育訓練\Microsoft MSDN講座-ASP.NET MVC\AddressBookMvcApp © 2007 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.

關於Unit Test - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 關於Unit Test - Develop Web Application with ASP.NET MVC 由於View與Business Logic已經切割開來, 有助於Unit Test的進行。 <TestMethod()> Public Sub TestMethod1() Dim theBmiController As New BmiController Dim theViewResult As ViewResult = theBmiController.Index(170, 70) Assert.AreEqual("24.22145", theViewResult.ViewData("result").ToString) End Sub D:\MyDoc\0T.教育訓練\Microsoft MSDN講座-ASP.NET MVC\BmiMvcApp © 2007 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.

解決方案總是從問題而來 - Develop Web Application with ASP.NET MVC 4/6/2019 6:07 AM 解決方案總是從問題而來 - Develop Web Application with ASP.NET MVC ASP.NET MVC的 5W 1H WHAT - 什麼是ASP.NET MVC? WHEN - 何時需要使用ASP.NET MVC? WHY - 為何要使用ASP.NET MVC? WHO - 誰適合來使用ASP.NET MVC? WHERE - 在些場合中需要使用ASP.NET MVC? HOW - 如何開發ASP.NET MVC 應用程式? © 2007 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.

Summary MVC架構有助於降低程式碼相依性,提高重用性 讓系統便於測試、可同時多人開發、降低開發成本 4/6/2019 6:07 AM Summary MVC架構有助於降低程式碼相依性,提高重用性 讓系統便於測試、可同時多人開發、降低開發成本 程式碼長度(數量)並不會減少、效能不一定會提升 適合大型(或超大型)的應用系統 MVC著重於架構、並非開發的速度、但當系統規模大到一定程度之後,MVC架構有助於提高產能 將適合的技術用在適當的場合… © 2007 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.

ASP.NET MVC相關資源 筆者 BLOG http://blog.studyhost.com/ 4/6/2019 6:07 AM ASP.NET MVC相關資源 筆者 BLOG http://blog.studyhost.com/ 筆者 RUN!PC ASP.NET 3.5 SP1-4.0專欄 ASP.NET網站MVC篇: http://www.asp.net/mvc/ © 2007 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.

4/6/2019 6:07 AM © 2009 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. © 2007 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.