Upload
bruce-chen
View
134
Download
0
Embed Size (px)
Citation preview
ASP.NET MVC 5 Overview
陳傳興( Bruce)
http://mvc.tw 2
twMVC 核心成員
現任微軟最有價值專家
TechDay & MSDN 講師
著有《 ASP.NET MVC4 網站開發美學》
著有《 ASP.NET MVC 5 網站開發美學》
譯有《 Bootstrap 2 》中文教材
https://kkbruce.tw
@Bruce
http://mvc.tw 3
M == Model (模型)
V == View (檢視)
C == Controller (控制器)
MVC 既不是程式語言也不是框架,而是一種設計模式。
ASP.NET MVC 是符合(與實作) MVC Pattern 的框架。
What’s MVC ?
http://mvc.tw 4
將一個 Web 應用程式劃分成三個主要元件 Model
View
Controller
三分天下之計
Model
Controller
View
http://mvc.tw 5
關注點分離( Separation of concerns )
計一: SOC
http://mvc.tw 6
習慣取代配置( Convention over Configuration )
計二: CoC
http://mvc.tw 7
攻略一: Model 為重
Model ==
http://mvc.tw 8
資料來源的存取操作( CURD )
Model 責任
Model
Controller
View
DataSource
http://mvc.tw 9
資料庫的存取操作( CURD )
資料結構的定義
Model 責任
Model
Controller
View
DataSource
http://mvc.tw 10
資料庫的存取操作( CURD )
資料結構的定義
資料格式的驗證
Model 責任
Model
Controller
View
DataSource
http://mvc.tw 11
Model 使用的技術 for MS
Model
DataSource
ADO.NET Entity Framework
12
Demo
Model – Entity Framework
http://mvc.tw 13
Controller == 上上下下左左右右 BA
攻略二: Controller 為謀
http://mvc.tw 14
Controller 是屬於一種協調( coordinator )的角色。
水鏡八奇
http://mvc.tw 15
You
16
demo
ASP.NET MVC 基架系統
http://mvc.tw 17
View ==
攻計三: View = 美人計
http://mvc.tw 18
呈現所接收的資料。
View 的三個範圍
http://mvc.tw 19
呈現所接收的資料。
回傳所需要的資料。
View 的三個範圍
http://mvc.tw 20
呈現所接收的資料。
回傳所需要的資料。
含【顯示邏輯】程式碼。
View 的三個範圍
21
demo
Bootstrap 3
http://mvc.tw 22
http://mvc.tw 23
學習 ASP.NET MVC 5 的好書 :D
謝謝各位
• 本投影片所包含的商標與文字皆屬原著作者所有。• 本投影片使用的圖片皆從網路搜尋。• 本著作係採用姓名標示 - 非商業性 - 相同方式分享 3.0 台灣授權。閱讀本授權條款,請到
http://creativecommons.org/licenses/by-nc-sa/3.0/tw/,或寫信至 Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
http://mvc.tw