Bài giảng Lập trình web: ASP.NET MVC - Nguyễn Hà Giang
lượt xem 12
download
Những nội dung chính trong chương gồm: Overview of Web Application Development, introduction to ASP.NET MVC, architecture of ASP.NET MVC App, creating an ASP.NET MVC Project, structure of an ASP.NET MVC Project. Mời các bạn tham khảo.
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Bài giảng Lập trình web: ASP.NET MVC - Nguyễn Hà Giang
- ASP.NET MVC Nguyen Ha Giang
- Introduction Overview of Web Application Development Introduction to ASP.NET MVC Architecture of ASP.NET MVC App Creating an ASP.NET MVC Project Structure of an ASP.NET MVC Project
- Overview of Web Application Development Web Application Are programs that are executed on a Web server and accessed from a Web browser. Allows you to share and access information over the Internet that can be accessed globally at any time. Enable you to perform commercial transactions known as E commerce application.
- Web Application Layers Web apps are typically divided into 3 layers: Presentation layer: Enable users to interact with the app Business logic layer: Enables to control the flow of execution and communication between the presentation layer and data layer. Data layer: Enables to provide the app data stored in DBs to the business logic layer. Web Application Layers Presentation Business Logic Layer Layer Data Layer
- Web App Architectures Architecture of an application depends on the system in which the layers of the application are distributed and communicated to each other. An application can be based on one of the following types of architectures: Singletier: In this architecture, all the three layers are integrated together and installed on a single computer. Twotier: In this architecture, the three layers are distributed over two tiers, a client and a server. Threetier: In this architecture, the three layers of the application are distributed across different computers. Ntier: In this architecture, the components of the threetier are
- Types of Web Pages A Web app consists of Web pages. A Web page can be categorized on the following two types: Static Web page: Consist of only HTML to present content to users Dynamic Web page: Consists of HTML in combination with serverside and clientside scripts to respond to user actions.
- Evolution of ASP.NET MVC ASP.NET MVC is a framework for developer dynamic Web app using the .NET Framework Prior to ASP.NET MVC, dynamic Web app based on the .NET Framework were developed using the following: ASP.NET Web Forms ASP.NET Web Pages
- ASP.NET Applications ASP.NET Is a serverside technology that enables you to create dynamic Web applications using advanced features. Are comprised of .aspx Web pages that combine both client side and serverside scripts to build dynamic Websites. App can deployed on a Web server such as IIS, which is the Web server for the Windows platform
- ASP.NET Applications The requestresponse process for an ASP.NET Web page contains the following steps: Browser sends a request for an ASP.NET Web page. When the request arrives, the IIS server intercepts the request, loads the requested file, and forwards it to the ASP.NET runtime for processing. The ASP.NET runtime that contains the ASP.NET script engine processes the requested ASP.NET page and generates the response. The IIS server sends back the response to the Web server that requested the page.
- ASP.NET Applications Following figure shows the requestresponse flow for an ASP.NET Web page: IIS Web Server ASP.NET Runtime 1 2 Browser 3 4 ASP.NET Web page
- ASP.NET Web Forms The traditional ASP.NET Web app gradually evolved to ASP.NET Web Forms to simplify development of dynamic Web app. In ASP.NET Web Forms: You can drag and drop User Interface (UI) controls to design your UI. You can specify how the form and its control should respond at runtime. ASP.NET Web Forms: Uses a combination of HTML, server controls, servercode, and allows users to request through browser.
- ASP.NET MVC Based on the MVC design pattern that allows you to develop software solutions. MVC design pattern: Allows you to develop Web App with loosely coupled components Enable separating data access, business, and presentation logic from each other. While using the MVC design pattern, a Web app can be divided into following types: Model: Represents information about a domain that can be the app data of a Web app.
- ASP.NET MVC Following figure shows the communications between the model, view and controller components: View View Controller Model
- ASP.NET MVC As ASP.NET MVC is based on the MVC design pattern, it provides the following benefits: Separation of concerns: Enables you to ensure that various app concerns into different and independent software components. Simplified testing and maintenance: Enable you to test each component independently. Thus, it allows you to ensure that it is working as per the requirement of the app and then, simplifies the process of testing, maintenance, and troubleshooting procedures. Extensibility: Enables the model to include a set of independent components that you an easily modify or replace based on the app requirement.
- History of MVC The versions that depict the history of MVC are as follows:
- Architecture of ASP.NET MVC App The basic architecture of an ASP.NET MVC app involves the following components: MVC Framework Route engine Route configuration Controller Model View Engine View Each of these preceding components communicates
- Architecture of ASP.NET MVC App The steps that the components of the ASP.NET MVC Framework performs while handling an incoming request includes: The browser sends a request to an ASP.NET MVC app. The MVC Framework forwards the request to the routing engine. The route engine checks the route configuration of the app for an appropriate controller to handler the request. When a controller is found it is invoked When a controller is not found an error to the browser The controller communicates with the model
- Architecture of ASP.NET MVC App 1 2 Route 3 Route Engine Configuration 5 Browser ? 4 9 6 Controller Model 8 7 View Engine
- Supporting Technologies ASP.NET MVC app support various technologies to create dynamic and responsive Web app. Some of the supporting technologies that you can use while creating an ASP.NET MVC application are as follows: JavaScript JQuery AJAX IIS Windows Azure
- JavaScript Is a clientside scripting language that enables a Web app to respond to user requests without interacting with a Web server. Allows creating responsive Web app that enhances user experience. Allows implementing functionalities, such as an easy to use UI, quick response to user’s request, and run in all available browsers. Allows your Web applications to respond to user requests without interacting with a Web server.
CÓ THỂ BẠN MUỐN DOWNLOAD
-
Bài giảng Lập trình Web ASP.NET: Chương 1 - ĐH Lạc Hồng
64 p | 137 | 27
-
Bài giảng Lập trình Web ASP.NET: Chương 4 - ĐH Lạc Hồng
70 p | 133 | 26
-
Bài giảng Lập trình Web ASP.NET: Chương 5 - ĐH Lạc Hồng
33 p | 110 | 21
-
Bài giảng Lập trình Web ASP.NET: Chương 6 - ĐH Lạc Hồng
46 p | 127 | 20
-
Bài giảng Lập trình Web ASP.Net: Chương 7 - Dương Thành Phết
58 p | 107 | 20
-
Bài giảng Lập trình Web ASP.NET: Chương 3 - ĐH Lạc Hồng
63 p | 93 | 18
-
Bài giảng Lập trình Web ASP.Net: Chương 1 - Dương Thành Phết
56 p | 125 | 13
-
Bài giảng Lập trình Web ASP.NET: Chương 7- ĐH Lạc Hồng
20 p | 90 | 13
-
Bài giảng Lập trình Web ASP.Net: Chương 6 - Dương Thành Phết
25 p | 118 | 12
-
Bài giảng Lập trình Web ASP.Net: Chương 3 - Dương Thành Phết
54 p | 84 | 12
-
Bài giảng Lập trình Web ASP.Net: Chương 2 - Dương Thành Phết
26 p | 102 | 12
-
Bài giảng Lập trình Web ASP.NET: Chương 8- ĐH Lạc Hồng
24 p | 77 | 11
-
Bài giảng Lập trình Web ASP.Net: Chương 9 - Dương Thành Phết
3 p | 110 | 11
-
Bài giảng Lập trình Web ASP.Net: Chương 5 - Dương Thành Phết
66 p | 92 | 10
-
Bài giảng Lập trình web với ASP
0 p | 73 | 10
-
Bài giảng Lập trình website ASP.NET: Phần 1 - Trường ĐH Công nghiệp Quảng Ninh
78 p | 19 | 8
-
Bài giảng Lập trình website ASP.NET: Phần 2 - Trường ĐH Công nghiệp Quảng Ninh
62 p | 26 | 8
-
Bài giảng Lập trình web: Tổng quan về lập trình web phía Server Asp.Net
56 p | 51 | 3
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn