We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19
HTTP
HTTP stands for HyperText Transfer Protocol, is
standard application-level protocol used for exchanging files on the World Wide Web. Communication between client computers and web servers is done by sending HTTP Requests and receiving HTTP Responses. Web browsers are HTTP clients that send file requests to Web servers, which in turn handle the requests via an HTTP service. HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web. The default port is TCP 80, but other ports can be used as well. Communication between clients and servers is done by requests and responses: A client (a browser) sends an HTTP request to the web A web server receives the request The server runs an application to process the request The server returns an HTTP response (output) to the browser The client (the browser) receives the response Features HTTP is simple : The HTTP protocol is designed to be plain and human- readable.
HTTP is connectionless: The HTTP client, i.e., a browser initiates an
HTTP request and after a request is made, the client waits for the response. The server processes the request and sends a response back after which client disconnect the connection. So client and server knows about each other during current request and response only. Further requests are made on new connection like client and server are new to each other.
HTTP is media independent: It means, any type of data can be sent by
HTTP as long as both the client and the server know how to handle the data content. It is required for the client as well as the server to specify the content type using appropriate MIME-type. HTTP is stateless: As mentioned above, HTTP is connectionless and it is a direct result of HTTP being a stateless protocol. The server and client are aware of each other only during a current request. Afterwards, both of them forget about each other. Due to this nature of the protocol, neither the client nor the browser can retain information between different requests across the web pages. HTTP Messages HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server. Request message and Response message Request Format Response Format Common Web Application Architectures monolithic application All-in-one applications Layered Architecture Traditional "N-Layer" architecture applications Clean architecture Monolithic Application A monolithic application is one that is entirely self-contained, interms-of its behavior. It may interact with other services or data stores in the course of performing its operations, but the core of its behavior runs within its own process and the entire application is typically deployed as a single unit. If such an application needs to scale horizontally, typically the entire application is duplicated across multiple servers or virtual machines. All-in-one Applications
The smallest possible number of
projects for an application architecture is all-in-one. In this architecture, the entire logic of the application is contained in a single project, compiled to a single assembly, and deployed as a single unit. A new ASP.NET Core project, whether created in Visual Studio or from the command line, starts out as a simple "all-in-one" monolith. It contains all of the behavior of the application, including presentation, business, and data access logic. In a single project scenario, separation of concerns is achieved through the use of folders. The default template includes separate folders for MVC pattern responsibilities of Models, Views, and Controllers, as well as additional folders for Data and Services. Figure shows the file structure of a single- project app. Layered Architecture The layered architecture is one of the most common architectural styles,where modules or components with similar functionalities are organized into horizontal layers. As a result, each layer performs a specific role within the application. The layered architecture style does not have a restriction on the number of layers that the application can have, as the purpose is to have layers that promote the concept of separation of concerns. The layered architecture style abstracts the view of the system as a whole while providing enough detail to understand the roles and responsibilities of individual layers and the relationship between them. Layerd Architecture Clean Architecture Clean architecture is a software design guideline that separates the elements of a design into ring levels. An important goal of clean architecture is to provide developers with a way to organize code in such a way that it encapsulates the business logic but keeps it separate from the delivery mechanism. The primary idea to keep the core business logic and application domain at the center of the solution structure. Clean Architecture ASP.NET CORE Architecture ASP.NET Core architecture is similar o "N" tier/layer architecture, the only difference is that ASP.NET Core defines the layers as the core component of the platform which relieves the developer from redefining it in order to make a solution more modular and reusable. The main business logic and UI logic are encapsulated in ASP.NET Core Web App layer, while the database access layer, cache services, and web API services are encapsulated in infrastructure layer and common utilities, objects, interfaces and reusable business services are encapsulated as micro-services in application core layer. ASP.NET Core that brings the benefit of a pre-built architectural framework that eases out tier deployment of the project along with providing pre-build Single Page Application (SPA) design pattern, Razor Pages (Page based more cleaner MVC model) design pattern, and traditional MVC (View based model) design pattern. ASP.NET MVC
Building Modern Web Applications with ASP.NET Core Blazor: Learn how to use Blazor to create powerful, responsive, and engaging web applications (English Edition)