A Lab Report On HTTP Protocol, SMTP Protocol & Framework: Course Title: Course Code

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Page |1

Course Title: Software Project-III


Course Code: CSE226

A Lab Report on HTTP Protocol, SMTP Protocol & Framework

SUBMITTED TO:
Fabliha Haque
Department of CSE
Daffodil International University

SUBMITTED BY:

Name: Habiba Dewan Arpita


ID: 201-15-14042
Section: L
Department of CSE
Daffodil International University
Page |2

HTTP Protocol

Introduction: The complete form of HTTP is Hypertext Transfer Protocol.HTTP is a web


application layer protocol. Both the client and server use HTTP protocol for sending a request
and for getting a response message. HTTP is "stateless." The server doesn’t store any information
about past client requests.

The two main works of HTTP:

 HTTP adjusts the structure of how client and server requests and response messages will
go.

 HTTP also defines how the client and server exchange the message.

Working process of HTTP protocol:

HTTP uses TCP for network layer protocol because it is reliable and it doesn't lose any data. HTTP
client Initiates the TCP connection with the server at port number 80 by sending a request. There
is a socket interface between the Client and TCP and Server and TCP. The client and server both
can access the TCP with the help of the Socket Interface. HTTP client sends HTTP request message
(containing URL) into TCP connection socket. The HTTP request message is written in ASCII-7 bit.
HTTP server receives a request message, forms a response message containing the requested
object, and sends a message into its socket HTTP messages are exchanged between the browser
(HTTP client) and the server (HTTP server). After that, the TCP connection closed.
Page |3

Type of HTTP Connection:


There are two types of HTP connection.
Persistent HTTP: Every object has a separate TCP connection. At most, one object is sent
over one TCP connection.
Non-Persistent HTTP: We can send multiple objects over one TCP connection within the
client and server.

SMTP Protocol

Introduction: The complete form of SMTP is the Simple Mail Transfer Protocol.SMTP is part of
the application layer of the TCP protocol. SMTP is a PUSH protocol as it transfers a message from
one mail server to another. SMTP is "stateless." The server doesn’t store any information about
client.

Working Process of SMTP Protocol:

SMTP uses a Persistent connection. So at most, one object is sent over one TCP connection. SMTP
can work as both client and server. When the client wants to send the mail, it initiates a TCP
connection to the SMTP server and sends the mail over the connection. The SMTP server is always
on keep-alive mode. As soon as it receives a TCP connection from any client, the SMTP establishes
a TCP connection at port number 25. After establishing a TCP connection, the client sends the
mail immediately. SMTP requires that messages must be in 7-bit ASCII.SMTP server uses
CRLF.CRLF to determine the end of the message.
Page |4

SMTP transfer has three phases:

 Handshaking (greeting)
 Transfer of messages
 Closure

Commands/Response interaction of SMTP:

 Commands: ASCII text


 Response: status code and phrase

SMTP Commands:

 HELO
 MAIL FROM
 RCPT TO
 DATA
 QUIT

Framework

Introduction: A framework gives us a basic structure, and we do code with the base of the
design—it delicate which architecture of our project will follow.
Page |5

Advantage of using Framework:

The most significant advantage of the framework is its reusability. It has reusable
functions.
Framework gives ways of processing request
Framework gives function for managing routing system.
Framework always follows a new pattern.
We don’t need to start from scratch if we use a framework
It saves our time a lot
Third-party package and resources are embedded directly in the framework.
Framework has excellent expandability. We can reconstruct our application and also can
modify design easily with the help of a framework.

Difference between framework and library:

Framework Library
 The framework is pre-structured, so it  The library has no rules; we can work
has a fixed rule of which file will be with it in any Function.
Where.
 At first, the framework creates the  In the library, we can call any function
structure and then, it calls code. from our code.
 The framework is caller, and the code  We call the library from our code, so
is calling because we do code in the our code is caller, and the library is
framework. calling.
 The framework contains a lot of  The library doesn't contain any
libraries to make our work easier. framework.
 Examples:  .NET  CakePHP  Ruby on  Examples:  jQuery  Prototype  jsPHP
Rails

You might also like