狠狠撸

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

More Related Content

What's hot (19)

twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
?
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
twMVC
?
ASP.NET MVC Model 的設計與使用 twMVC#10
ASP.NET MVC Model 的設計與使用 twMVC#10ASP.NET MVC Model 的設計與使用 twMVC#10
ASP.NET MVC Model 的設計與使用 twMVC#10
twMVC
?
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
twMVC
?
輕鬆上手Asp.net web api 2.1-twMVC#14
輕鬆上手Asp.net web api 2.1-twMVC#14輕鬆上手Asp.net web api 2.1-twMVC#14
輕鬆上手Asp.net web api 2.1-twMVC#14
twMVC
?
動手打造 application framework-twMVC#15
動手打造 application framework-twMVC#15動手打造 application framework-twMVC#15
動手打造 application framework-twMVC#15
twMVC
?
一小時可以打造什麼服務Plus twMVC#18
一小時可以打造什麼服務Plus twMVC#18一小時可以打造什麼服務Plus twMVC#18
一小時可以打造什麼服務Plus twMVC#18
twMVC
?
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
twMVC
?
ASP.NET MVC 5 新功能探索
ASP.NET MVC 5 新功能探索ASP.NET MVC 5 新功能探索
ASP.NET MVC 5 新功能探索
Will Huang
?
Study4 love.2016.2.20.ionic
Study4 love.2016.2.20.ionicStudy4 love.2016.2.20.ionic
Study4 love.2016.2.20.ionic
Kyle Shen
?
twMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC#29 | 當.Net Core 遇到AWS LambdatwMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC
?
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC
?
twMVC#19 | opserver監控服務的解決
twMVC#19 | opserver監控服務的解決twMVC#19 | opserver監控服務的解決
twMVC#19 | opserver監控服務的解決
twMVC
?
專案分層架構 twMVC#18
專案分層架構 twMVC#18專案分層架構 twMVC#18
專案分層架構 twMVC#18
twMVC
?
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC
?
SignalR實戰技巧 twmvc#17
SignalR實戰技巧 twmvc#17 SignalR實戰技巧 twmvc#17
SignalR實戰技巧 twmvc#17
twMVC
?
架構設計入門 twMVC#11
架構設計入門 twMVC#11架構設計入門 twMVC#11
架構設計入門 twMVC#11
twMVC
?
twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC#22 | 一個微信專案從0到.000的效能調教之路twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC
?
Angular js twmvc#17
Angular js twmvc#17Angular js twmvc#17
Angular js twmvc#17
twMVC
?
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC
?
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
ASP.NET MVC 內建驗證擴充與活用技巧 -twMVC#3
twMVC
?
ASP.NET MVC Model 的設計與使用 twMVC#10
ASP.NET MVC Model 的設計與使用 twMVC#10ASP.NET MVC Model 的設計與使用 twMVC#10
ASP.NET MVC Model 的設計與使用 twMVC#10
twMVC
?
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
ASP.NET MVC 新增、查詢、修改、刪除 基本功實戰 -twMVC#3
twMVC
?
輕鬆上手Asp.net web api 2.1-twMVC#14
輕鬆上手Asp.net web api 2.1-twMVC#14輕鬆上手Asp.net web api 2.1-twMVC#14
輕鬆上手Asp.net web api 2.1-twMVC#14
twMVC
?
動手打造 application framework-twMVC#15
動手打造 application framework-twMVC#15動手打造 application framework-twMVC#15
動手打造 application framework-twMVC#15
twMVC
?
一小時可以打造什麼服務Plus twMVC#18
一小時可以打造什麼服務Plus twMVC#18一小時可以打造什麼服務Plus twMVC#18
一小時可以打造什麼服務Plus twMVC#18
twMVC
?
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
twMVC
?
ASP.NET MVC 5 新功能探索
ASP.NET MVC 5 新功能探索ASP.NET MVC 5 新功能探索
ASP.NET MVC 5 新功能探索
Will Huang
?
Study4 love.2016.2.20.ionic
Study4 love.2016.2.20.ionicStudy4 love.2016.2.20.ionic
Study4 love.2016.2.20.ionic
Kyle Shen
?
twMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC#29 | 當.Net Core 遇到AWS LambdatwMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC#29 | 當.Net Core 遇到AWS Lambda
twMVC
?
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC#19 | 微信公眾平台申請與wechat api 開發血淚史
twMVC
?
twMVC#19 | opserver監控服務的解決
twMVC#19 | opserver監控服務的解決twMVC#19 | opserver監控服務的解決
twMVC#19 | opserver監控服務的解決
twMVC
?
專案分層架構 twMVC#18
專案分層架構 twMVC#18專案分層架構 twMVC#18
專案分層架構 twMVC#18
twMVC
?
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC#20 | ASP.NET MVC View 開發技巧小錦囊
twMVC
?
SignalR實戰技巧 twmvc#17
SignalR實戰技巧 twmvc#17 SignalR實戰技巧 twmvc#17
SignalR實戰技巧 twmvc#17
twMVC
?
架構設計入門 twMVC#11
架構設計入門 twMVC#11架構設計入門 twMVC#11
架構設計入門 twMVC#11
twMVC
?
twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC#22 | 一個微信專案從0到.000的效能調教之路twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC#22 | 一個微信專案從0到.000的效能調教之路
twMVC
?
Angular js twmvc#17
Angular js twmvc#17Angular js twmvc#17
Angular js twmvc#17
twMVC
?

Similar to KSDG-ASP.NET MVC 5 Overview (偽三國誌) (20)

twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC#10 | ASP.NET MVC Model 的設計與使用twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC
?
與 Asp.net mvc 的第一次親密接觸 - twMVC#1
與 Asp.net mvc 的第一次親密接觸 - twMVC#1與 Asp.net mvc 的第一次親密接觸 - twMVC#1
與 Asp.net mvc 的第一次親密接觸 - twMVC#1
twMVC
?
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練42016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
Duran Hsieh
?
Asp.net mvc 基礎
Asp.net mvc 基礎Asp.net mvc 基礎
Asp.net mvc 基礎
Gelis Wu
?
利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式
Chui-Wen Chiu
?
ASP.NET MVC介绍
ASP.NET MVC介绍ASP.NET MVC介绍
ASP.NET MVC介绍
Du Wanzhi
?
ASP.NET MVC The Begining
ASP.NET MVC The BeginingASP.NET MVC The Begining
ASP.NET MVC The Begining
Simon Huang
?
础蝉辫.苍别迟+尘惫肠4框架揭秘
础蝉辫.苍别迟+尘惫肠4框架揭秘础蝉辫.苍别迟+尘惫肠4框架揭秘
础蝉辫.苍别迟+尘惫肠4框架揭秘
Zhenhua Tang
?
前端惭惫肠探讨及实践
前端惭惫肠探讨及实践前端惭惫肠探讨及实践
前端惭惫肠探讨及实践
enmaai
?
前端惭惫肠探讨及实践
前端惭惫肠探讨及实践前端惭惫肠探讨及实践
前端惭惫肠探讨及实践
taobao.com
?
ASP.NET MVC 快速上手
ASP.NET MVC 快速上手ASP.NET MVC 快速上手
ASP.NET MVC 快速上手
Study4TW
?
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101
Jollen Chen
?
twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有
twMVC
?
ASP.NET MVC 5線上課程(入門前三天)
ASP.NET MVC 5線上課程(入門前三天)ASP.NET MVC 5線上課程(入門前三天)
ASP.NET MVC 5線上課程(入門前三天)
MIS2000 Lab.
?
twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC#05 | ASP.NET MVC 之實戰架構探討twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC
?
ASP.NET MVC之實戰架構探討 -twMVC#5
ASP.NET MVC之實戰架構探討 -twMVC#5ASP.NET MVC之實戰架構探討 -twMVC#5
ASP.NET MVC之實戰架構探討 -twMVC#5
twMVC
?
20130823微软云端平台开发者日
20130823微软云端平台开发者日20130823微软云端平台开发者日
20130823微软云端平台开发者日
twMVC
?
twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC#14 | 輕鬆上手ASP.NET Web API 2twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC
?
Asp.Net MVC 一教就上手
Asp.Net MVC 一教就上手Asp.Net MVC 一教就上手
Asp.Net MVC 一教就上手
Study4TW
?
twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC#10 | ASP.NET MVC Model 的設計與使用twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC#10 | ASP.NET MVC Model 的設計與使用
twMVC
?
與 Asp.net mvc 的第一次親密接觸 - twMVC#1
與 Asp.net mvc 的第一次親密接觸 - twMVC#1與 Asp.net mvc 的第一次親密接觸 - twMVC#1
與 Asp.net mvc 的第一次親密接觸 - twMVC#1
twMVC
?
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練42016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
2016年逢甲大學資訊系:ASP.NET MVC 4 教育訓練4
Duran Hsieh
?
Asp.net mvc 基礎
Asp.net mvc 基礎Asp.net mvc 基礎
Asp.net mvc 基礎
Gelis Wu
?
利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式
Chui-Wen Chiu
?
ASP.NET MVC介绍
ASP.NET MVC介绍ASP.NET MVC介绍
ASP.NET MVC介绍
Du Wanzhi
?
ASP.NET MVC The Begining
ASP.NET MVC The BeginingASP.NET MVC The Begining
ASP.NET MVC The Begining
Simon Huang
?
础蝉辫.苍别迟+尘惫肠4框架揭秘
础蝉辫.苍别迟+尘惫肠4框架揭秘础蝉辫.苍别迟+尘惫肠4框架揭秘
础蝉辫.苍别迟+尘惫肠4框架揭秘
Zhenhua Tang
?
前端惭惫肠探讨及实践
前端惭惫肠探讨及实践前端惭惫肠探讨及实践
前端惭惫肠探讨及实践
enmaai
?
前端惭惫肠探讨及实践
前端惭惫肠探讨及实践前端惭惫肠探讨及实践
前端惭惫肠探讨及实践
taobao.com
?
ASP.NET MVC 快速上手
ASP.NET MVC 快速上手ASP.NET MVC 快速上手
ASP.NET MVC 快速上手
Study4TW
?
Single-Page Application Design Principles 101
Single-Page Application Design Principles 101Single-Page Application Design Principles 101
Single-Page Application Design Principles 101
Jollen Chen
?
twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有
twMVC
?
ASP.NET MVC 5線上課程(入門前三天)
ASP.NET MVC 5線上課程(入門前三天)ASP.NET MVC 5線上課程(入門前三天)
ASP.NET MVC 5線上課程(入門前三天)
MIS2000 Lab.
?
twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC#05 | ASP.NET MVC 之實戰架構探討twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC#05 | ASP.NET MVC 之實戰架構探討
twMVC
?
ASP.NET MVC之實戰架構探討 -twMVC#5
ASP.NET MVC之實戰架構探討 -twMVC#5ASP.NET MVC之實戰架構探討 -twMVC#5
ASP.NET MVC之實戰架構探討 -twMVC#5
twMVC
?
20130823微软云端平台开发者日
20130823微软云端平台开发者日20130823微软云端平台开发者日
20130823微软云端平台开发者日
twMVC
?
twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC#14 | 輕鬆上手ASP.NET Web API 2twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC#14 | 輕鬆上手ASP.NET Web API 2
twMVC
?
Asp.Net MVC 一教就上手
Asp.Net MVC 一教就上手Asp.Net MVC 一教就上手
Asp.Net MVC 一教就上手
Study4TW
?

More from Bruce Chen (6)

一个微信专案从0到000的效能调教
一个微信专案从0到000的效能调教一个微信专案从0到000的效能调教
一个微信专案从0到000的效能调教
Bruce Chen
?
ReSharperReSharper
ReSharper
Bruce Chen
?
OWASP Top 10 (2013) 正體中文版
OWASP Top 10 (2013) 正體中文版OWASP Top 10 (2013) 正體中文版
OWASP Top 10 (2013) 正體中文版
Bruce Chen
?
网站自动化测试
网站自动化测试网站自动化测试
网站自动化测试
Bruce Chen
?
@Connect(); microsoft visual studio vnext & azure
@Connect(); microsoft visual studio vnext & azure@Connect(); microsoft visual studio vnext & azure
@Connect(); microsoft visual studio vnext & azure
Bruce Chen
?
2014 Global Windows Bootcamp - 笑cc讓網站上雲端
2014 Global Windows Bootcamp - 笑cc讓網站上雲端2014 Global Windows Bootcamp - 笑cc讓網站上雲端
2014 Global Windows Bootcamp - 笑cc讓網站上雲端
Bruce Chen
?
一个微信专案从0到000的效能调教
一个微信专案从0到000的效能调教一个微信专案从0到000的效能调教
一个微信专案从0到000的效能调教
Bruce Chen
?
ReSharperReSharper
ReSharper
Bruce Chen
?
OWASP Top 10 (2013) 正體中文版
OWASP Top 10 (2013) 正體中文版OWASP Top 10 (2013) 正體中文版
OWASP Top 10 (2013) 正體中文版
Bruce Chen
?
网站自动化测试
网站自动化测试网站自动化测试
网站自动化测试
Bruce Chen
?
@Connect(); microsoft visual studio vnext & azure
@Connect(); microsoft visual studio vnext & azure@Connect(); microsoft visual studio vnext & azure
@Connect(); microsoft visual studio vnext & azure
Bruce Chen
?
2014 Global Windows Bootcamp - 笑cc讓網站上雲端
2014 Global Windows Bootcamp - 笑cc讓網站上雲端2014 Global Windows Bootcamp - 笑cc讓網站上雲端
2014 Global Windows Bootcamp - 笑cc讓網站上雲端
Bruce Chen
?

KSDG-ASP.NET MVC 5 Overview (偽三國誌)

Editor's Notes

  • #6: 以 OO / DP 來說:單一職責原則(Single Responsibility Principle)
  • #7: 让大家有一致的习惯,而不是每个人有每个人的配置。
  • #8: 屯粮攒兵
  • #9: Data Source 不專指 Database。
  • #12: 存取技術有很多: Entity Framework 、Nhibernate、LINQ to SQL、強型別的 DataSet(Typed DataSet)、ADO.NET
  • #13: http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false
  • #15: 軍師的角色 運籌帷握
  • #18: 擦脂抹粉
  • #21: 这是绝不是义大麵。
  • #22: http://bootswatch.com/