Welcome to the Session, Introduction to ASP.NET MVC.
Web applications have revolutionized the way business is conducted. These applications enable organizations to share and access information from anywhere and at any time. Web applications have evolved from traditional Web application that served static content to Web applications that are dynamic and responsive. To create such dynamic and responsive Web application, you can use ASP.NET MVC.
ASP.NET MVC 5 has evolved from traditional ASP.NET Web pages and ASP.NET Web Form to provide an implementation of the Model View Controller (MVC) design pattern.
Visual Studio 2013 provides support to create ASP.NET MVC 5 applications. When you create an ASP.NET MVC 5 application in the Visual Studio 2013 IDE, the IDE automatically creates the required application directory structure and the minimal files required to run the application.
In this Session, you will learn to:
- Define and describe the layers of Web application.
- Explain the structure of an ASP.NET MVC application
- Explain the evaluation of Web application
- Explain and describe how to create Web application in Visual Studio 2013
1.1 Overview of Web Application Development
Web applications are programs that are executed on a Web server and accessed from a Web browser. These Web applications allows you to share and access information over the Internet that can be accessed globally at any time. In addition, you can create Web applications for performing commercial transactions, such as buying or selling products in an online store. This type of Web application that implements such commercial transactions is known as E-commerce application.
A Web application is composed of separate layers. The layers that you need to implement in a Web application depends on the application requirements. The different Web application layers are discussed in the following topics.
1.1.1 Web Application Layers
Web applications are typically divided into three layers, where each layer performs different functionalities.
The three layers of a Web application are as follows:
Figure 1.1: Three Layers of Web Application
In this figure, the Web application has the following three layers:
- Presentation layer: Enable users to interact with the application.
- Business logic layer: Enables controlling the flow of execution and communication between the presentation layer and data layer.
- Data layer: Enables providing the application data stored in databases to the business logic layer.
1.1.2 Web Application Architectures
The architecture of an application depends on the system in which the layers of the application are
distributed and communicated to each other. Most of the applications are built by using these layers. An application can be based on one of the following types of architectures:
distributed and communicated to each other. Most of the applications are built by using these layers. An application can be based on one of the following types of architectures:
- Single-Tier Architecture: In this architecture, all the three layers are integrated together and installed on a single computer.
- Two-Tier Architecture: In this architecture, the three layers are distributed over two tiers, a client and a server. The presentation layer resides on each client computer, the business logic layer resides either on the client or on the server, and the data access layer resides on the server.
- Three-Tier Architecture: In this architecture, the three layers of the application are distributed across different computers. Each layer communicates with the other layers with the help of a request-response mechanism.
- N-Tier Architecture: In this architecture, the components of the three-tier are further separated. For example, any business logic that needs to be present in one of the layers is separated from that layer to enable increase in performance and scalability.
1.1.3 Types of Web Pages
A Web application consists of Web pages. Web pages can be of the following types:- Static Web page: Is a Web page that consists of only Hyper Text Markup Language (HTML) is a
static Web page. A static Web page only presents content to users. Such Web page cannot
respond to user actions. - Dynamic Web page: Is a Web page that can respond to user actions. For example, when you type some text to search in www.google.com and click the Search button, the Web page
responds by displaying you search results. This is an example of a dynamic Web page. You can create a dynamic Web page using HTML pages in combination with server-side and client-side scripts.
Note- Server-side scripts execute on a Web server to provide users with dynamic content that is based on the information generated through programming logic or retrieved from a database. Server-side scripts are written in server-side scripting languages, such as ASP.NET.
Note- Client-side scripts execute on the browser without interacting with the Web server that hosts the application. Client-side script can also provide users with dynamic content based on the information generated through programming logic that executes on the browser. Client-side scripts are written in client-side scripting languages, such as JavaScript.
0 nhận xét:
Đăng nhận xét