8
Exploring ASP.NET MVC 4

Exploring ASP.NET MVC 4. Các mô hình phát triển Web ASP.Net Kiến trúc phát triển ứng dụng Web MVC Khám phá ASP.Net MVC Tổ chức, Cấu hình dự án

Embed Size (px)

Citation preview

Page 1: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Exploring ASP.NET MVC 4

Page 2: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Các mô hình phát triển Web ASP.Net Kiến trúc phát triển ứng dụng Web MVC

Khám phá ASP.Net MVC Tổ chức, Cấu hình dự án Web ASP.Net MVC

Lập trình ứng dụng Web ASP.Net MVC Triển khai ứng dụng lên WebServer

Page 3: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

ASP.NET

•Programming Models• Web Pages• Web Forms• MVC

•ASP.NET API• Configuration• Authentication and Authorization• Caching

ASP.NET

HTMLPages

Page 4: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Web Pages Applications

•Web Matrix or Visual Studio•Code in .CSHTML files•Control of HTML

<h2>Special Offers</h2> <p>Get the best possible value on Northwind specialty foods by taking advantage of these offers:</p> @foreach (var item in offers) { <div class="offer-card"> <div class="offer-picture"> @if (!String.IsNullOrEmpty(item.PhotoUrl)){ <img src="@Href(item.PhotoUrl) alt="@item.Title" /> } </div> </div> }

Page 5: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Web Forms Applications & MVC Application

•Web Forms Application• Visual Studio only• Code in .aspx files and code-behind files• Create a UI by dragging controls onto a page• Controls provider rich properties and events• Bind controls to data

• MVC Application• Visual Studio only • Control of HTML• Code in .cshtml and .cs files• Easy to use unit tests• Models encapsulate objects and data• Views generate the user interface• Controllers interact with user actions

Page 6: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

ASP.NET MVC 4

Models, Views, and Controllers

Demonstration: How to Explore an MVC Application•New Features of ASP.NET MVC 4

Page 7: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Models, Views, and Controllers

Browser

Controller

View Model

Database

Web Server HTTP

SQL

Page 8: Exploring ASP.NET MVC 4.  Các mô hình phát triển Web ASP.Net  Kiến trúc phát triển ứng dụng Web MVC  Khám phá ASP.Net MVC  Tổ chức, Cấu hình dự án

Features of ASP.NET MVC

• Jquery, Jquery mobile•Ajax•Annotation and validation•Web api•Authentication and Authorization, Caching•Display Modes•OAuth và OpenID•Bunding và Minification