a) Explain the following with the help of a diagram/example, if needed:
(i) Client Server model
(ii) HTTP methods
(iii) Dynamic web pages
(iv) Role of Model View Controller in MVC architecture
(v) Role of HTTP server and web container
i)
Client Server model:
Client-server model is a shared architecture where several clients (remote system) send many requests and finally to obtained services from the centralized server machine (host system). Client machine delivers user-friendly interface that helps to users to fire request services of server computer and finally to show your output on client system.
ii)
HTTP methods:
GET
The GET method is used to retrieve information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.
HEAD
Same as GET, but transfers the status line and header section only.
POST
A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.
PUT
Replaces all current representations of the target resource with the uploaded content.
DELETE
Removes all current representations of the target resource given by a URI.
CONNECT
Establishes a tunnel to the server identified by a given URI.
OPTIONS
Describes the communication options for the target resource.
TRACE
Performs a message loop-back test along the path to the target resource.
iii)
A dynamic page displays different content for different users while retaining the same layout and design. Such pages, usually written in CGI, AJAX, ASP or ASP.NET, take more time to load than simple static pages. Once they upload content into the database, it is retrieved by the website in response to a user request.
iv)
The Controller is responsible for controlling the application logic and acts as the coordinator between the View and the Model. The Controller receives an input from the users via the View, then processes the user's data with the help of Model and passes the results back to the View.
v)
Web server refers to an execution infrastructure that handles. HTTP requests and responses; a servlet container refers to a component that. handles the lifecycle for servlets; an application server refers to a. framework (servlet container, EJB container, JSP engine, MQ container, etc.)
Comments
Leave a comment