




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Internet Standards – Introduction to WWW – WWW Architecture – SMTP – POP3 – File Transfer Protocol - Overview of HTTP, HTTP request – response –– Generation of dynamic web pages. UNIT II UI DESIGN 9 Markup Language (HTML5): Basics of Html -Syntax and tags of Html- Introduction to HTML5 - Semantic/Structural Elements -HTML5 style Guide and Coding Convention– Html Svg and Canvas – Html API‟s - Audio & Video - Drag/Drop - Local Storage - Web socket API– Debugging and validating Html. Cascading Style Sheet (CSS3): The need for CSS – Basic syntax and structure Inline Styles – Embedding Style Sheets - Linking External Style Sheets - Introduction to CSS3 – Backgrounds - Manipulating text - Margins and Padding - Positioning using CSS - Responsive Web Design - Introduction to LESS/SASS UNIT III OVERVIEW OF JAVASCRIPT 9 Introduction - Core features - Data types and Variables - Operators, Expressions, and Statements Functions
UNIT V PHP 9 Introduction - How web works - Setting up the environment (LAMP server) - Programming basics Print/echo - Variables and constants – Strings and Arrays – Operators, Control structures and looping structures – Functions – Reading Data in Web Pages - Embedding PHP within HTML - Establishing connectivity with MySQL database. TOTAL : 45 PERIODS REFERENCES:
1) Define Internet. Internet is the network of computer networks. It makes it possible for any computer connected to it to send and receive data from any other computer connected to it. The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite (often called TCP/IP, although not all protocols use TCP) to serve billions of users worldwide. 2) What is the difference between node and hosts? A node is any addressable device connected to a network whereas the host is a more specific descriptor that refers to a networked general-purpose computer rather than a single purpose device (such as a printer). 3) What is IP address? The Internet address (or IP address) is 32 bits (for IPv4) that uniquely and universally defines a host or router on the Internet. The portion of the IP address that identifies the network is called the netid. The portion of the IP address that identifies the host or router on the network is called the hostid. An IP address defines a device’s connection to a network. 4) Explain various types of connecting devices? There are five types of connecting devices: repeaters, hubs, bridges, routers, and switches. Repeaters regenerate a signal at the physical layer. A hub is a multiport repeater. Bridges have access to station addresses and can forward or filter a packet in a network. They operate at the physical and data link layers. Routers determine the path a packet should take. They operate at the physical, datalink, and network layers.
5) What is a mail gateway? A machine that connects to two or more electronic mail systems and transfers mail messages among them. Mail gateways usually capture an entire mail message, reformat it according to the rules of the destination mail system, and then forward the message. 6) Define protocol. Why are the protocols layered? A protocol is a formal set of rules that must be followed in order to communicate. Layering protocols simplifies the task of communicating over the network and it allows for reuse of layers that are not specific to a particular application. 7) Define DNS. DNS stands for Domain Name System. DNS provides the service of translating a host name to the corresponding IP address. Example WWW.Yahoo.com is called as domain name. 8) Differentiate between Internet and WWW.
Internet World Wide Web Internet is the physical aspects computers, networks servers.
WWW is an abstraction and set of services on the top of internet Internet provides access to mail, network news and its with information resources
WWW makes it easier to use the internet by providing graphical interface wide and rapidly growing amount of information 9) Define port. What do you mean by well-known ports? A port is a logical channel to an application running on a host. i.e., the applications running on the host machines are uniquely identified by port numbers. Port numbers can range from 1 to 65535; however ports 1 to 1023 are reserved. These reserved ports are referred to as well-known ports because the Internet Assigned Numbers authority publicly documents the applications that use them. 10) What is FTP and the features provided by FTP? The TCP/IP standard, high level protocol for transferring files from one machine to another. s a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. FTP is built on client-server architecture and utilizes separate control and data connections between the client and server. 11) Give few commands for FTP. ftp> help Is Is list contents of remote directory ftp> help cdup cdup change remote working to parent directory. ftp> help glob glob toggle metacharacter expansion of local file names ftp> help bell bell beep when command completed To execute a command name: ftp> bell Bell mode on.
12) What is meant by Name Resolution? Name Resolution is the process of mapping a hostname to its corresponding IP Address. One way to translate a hostname to an IP address is to look it up in a simple text file. The second way is the domain name service, which is a distributed database containing all registered hostnames on the Internet and their IP addresses. 13) Define URI, URL, and URN.
In simplest terms, static Web pages are those with content that cannot change without a developer editing its source code, while dynamic Web pages can display different content from the same source code. When it comes to using static or dynamic pages for parts of your company's website, having the most advanced code on each of your pages is not important. What is important is the purpose each page serves for your website. 26) What is WWW?(MAY2015) WWW is an abstraction and set of services on the top of internet. WWW makes it easier to use the internet by providing graphical interface wide and rapidly growing amount of information. 27) What is dynamic web page? (MAY2015) A dynamic web page is a kind of web page that has been prepared with fresh information (content and/or layout), for each individual viewing. It is not static because it changes with the time (ex. a news content), the user (ex. preferences in a login session), the user interaction (ex. web page game), the context (parametric customization), or any combination of the foregoing. 28) What is the primary goal of ARPANET? (MAY 2016) The main purpose of ARPANET was to provide a communication network to the various branches of armed forced during and after a nuclear attack. **UNIT – II
Lis t out the types of formatting tags.
7) What is cellpadding and cell spacing attributes? The cellpadding allows to have some space between the contents of each cell and its borders. The distance between each cell is called cell spacing. 8) What is the need of using form in HTML? Form is a typical layout on the web page by which user can interact with the web page. The components that can be placed on the form are text box, check box, radio buttons, and push
S.no Standalone Container 1 Only start tag is present and no end tag. Both start and end tag will be present 2 Can have only attributes and no parameters Can have both attributes and parameters. 3 Example: Example:…..
buttons and so on. Thus form is typically used to create an interactive Graphical User Interface. 9)What is the purpose of using frames in HTML? The HTML frames allows the web designer to present the web document in multiple views. Using multiple views one can keep the formation visible and at the same time other views can be scrolled or replaced. 10) What is the need for special character in HTML? There are some symbols that cannot be used directly in HTML document. For example <(less than) because this symbol is also used along with the tag. Hence this is called a special symbol and can be denoted with the help of entity reference. 11) State how an unrecognized element or attribute treated by the HTML document? If any unrecocognized element or attribute is written then the HTML document simply displays the contents. For example testing will display the string “testing” on the web page. It will not display it as a title of the web page. 12) What is the use of hyperlink tag in HTML? The hyperlink tag is used to link logically with other page. Using this tag a web link can be specified. The tag is used to specify the hyperlink in HTML. To logically link one page with another, use of link to enhance readability of the web document, the navigation from one page to another is possible. 13) What is BODY in HTML document? The effects which we want in the window are mentioned with the help of tags in the body. It is the place where the actual data is written in html. All the changes can be viewed by changing the tags content in the body whereas the head part is the introduction part and the body is the actual content part.data content
14) What is an image map? An image map allows you to link to several web pages through one image. Simply define shapes within images and link these to the pages you want. Here’s a video to help you learn more about images and links in HTML. 15) What is CSS file? The cascading style is many times defined in a separate file. This file is called CSS file. In CSS file one or more style rules are given. 16)What are style sheets? The style sheets are the collection of styles that can be either embedded within the HTML documents or can be externally applied. The Cascading style sheet is a markup language used to apply the styles to HTML elements. 17)What is selector string? Specify any three forms of selectors. The rule set in CSS consists of selector string which is basically an HTML element. These selectors can be defined with the help of properties and values. 18) Mention the need for cascading style sheet. The cascading style sheet allows separation between the information contained in a document and its presentation. Hence any change in presentation can be made without distributing the information of the document. The cascading style sheet allows the developer to give the consistent appearance to all elements of the web page. 19) Enlist various categories of properties used in CSS. The various categories of properties in CSS are
used to specify the formatting are called tags. HTMLis a an example of a widely known and used markup language.
**UNIT- III
5) What are the primitive data types in javascript? JavaScript supports five primitive data types: number, string, Boolean, undefined, and null. These types are referred to as primitive types because they are the basic building blocks from which more complex types can be built. Of the five, only number, string, and Boolean are real data types in the sense of actually storing data. Undefined and null are types that arise under special circumstances. 6) What are the Escape Codes Supported in JavaScript? The Escape codes supported in javascript are \b Backspace,\t Tab (horizontal), \n Linefeed (newline),\v Tab (vertical),\f Form feed,\r Carriage return," Double quote ' Single quote,\ Backslash. 7) Define Composite Types. An object is a composite type that can contain primitive and composite types an object is a collection that can contain primitive or composite data, including functions and other objects. The data members of an object are called properties, and member functions are known as methods. 8) Define Array in JavaScript. An array is an ordered list that can contain primitive and complex data types. Arrays are sometimes known as vectors or list in other programming languages and are actually Array objects in JavaScript. The members of an array are called elements. Array elements are numbered starting with zero. That is, each element is assigned an index, a non-negative integer indicating its position in the array. 9) Define Function in JavaScript. A function is another special type of JavaScript object, one that contains executable code. A function is called (or invoked) by following the function name with parentheses. Functions can take arguments (or parameters), pieces of data that are passed to the function when it is invoked. Arguments are given as a comma-separated list of values between the parentheses of the function call. 10) What is meant by identifiers? An identifier is a name by which a variable or function is known. In JavaScript, any combination of letters, digits, underscores, and dollar signs is allowed to make up an identifier. 11) Define Operators in JavaScript. JavaScript supports a variety of operators. Some of them, like those for arithmetic and comparison, are easy for even those new to programming to understand. Others, like the bitwise AND (&), increment ( ++ ), and some conditional (? : ) operators. 12) What is JavaScript name spacing? How and where is it used? Using global variables in JavaScript is evil and a bad practice. That being said, namespacing is used to bundle up all your functionality using a unique name. In JavaScript, a namespace is really just an object that you’ve attached all further methods, properties and objects. It promotes modularity and code reuse in the application. 13) How many looping structures can you find in javascript?
If you are a programmer, you know the use of loops. It is used to run a piece of code multiple times according to some particular condition. Javascript being a popular scripting language supports the following loops: for, while, do-while loop 14) Mention The Various Java Script Object Models. Math Object, String Object, Date Object, Boolean and Number Object, Document Object window Object. 15) How Scripting Language Is Differs From Html.
HTML is used for simple web page design, HTML with FORM is used for both form design and Reading input values from user, Scripting Language is used for Validating the given input values weather it is correct or not, if the input value is incorrect, the user can pass an error message to the user, Using form concept various controls like Text box, Radio Button, Command Button, Text Area control and List box can be created.
16) What are the different types of objects in JavaScript? Type Example Implementation Provided By Governing Standard User- defined
Programmer defined Customer or Circle
Programmer None
Built-in Array, Math The browser via engine its JavaScript
Browser Window, Navigator The browser None (though some portions adhere to an adhoc standard) Document Image, HTMLInputElement
The browser via its DOM engine
17) Justify “JavaScript” is an event-driven programming” Javascript supports event driven programming. when user clicks the mouse or hit the keys on the keyboard or if user submits the form then these events and response to them can be handled using javascript. Hence javascript is mainly used in web programming for validating the data provided by the user. 18) What is the use of pop up boxes in java script? There are three types of popup boxes used in javascript. Using these popup boxes the user can interact with the web application. 19) What is DOM? Document Object Model (DOM) is a set of platform independent and language neutral application interface (API) which describes how to access and manipulate the information stored in XML, XHTML and javascript documents.
20) Enlist any four mouse events. The MouseEvent are-mousedown, mouseup, mouseover, mousemove, mouseout. 21) List ad various level of document object modeling. Various levels of DOM are DOM0, Dom1, Dom2, and Dom 22) Define Math Object. The Math object holds a set of constants and methods that enable more complex. The math object is static, so properties are accessed directly. For example, to compute the square root of 10, the sqrt() method is accessed through the Math object directly. 23) What you meant BY Date Pickers? HTML5 introduces a number of new form fields for selecting date and time 24) What are the three possible choices for form validation? They are three possible choice are before they happen, as they happen, after they happen 25) What are they validation properties and methods? Validation properties and methods are checkvalidity (), validaionMessage, customerror, patternMismatch, rangeOverflow, rangeUnderflow, tooLong. 26) Define event bubbling. Suppose, there is an element present inside another element. Then during the event handling, if the event which is present in the inner element is handled and then the event of the outer element is handled. This process of event handling is called event bubbling 27) How to create arrays in Javascript? We can declare an array like this Var scripts = new Array(); We can add elements to this array like this
This example calls a function which performs a calculation, and returns the result: 30) Write JavaScript to display current time on the status bar.(MAY 2015)
date formate
CURRENT DATE DISPLAY ON STATUS BAR
31) Name and mention the use of any four methods in JavaScript Math Object.(MAY 2015) The Math object holds a set of constants and methods that enable more complex. The math object is static, so properties are accessed directly. For example, to compute the square root of 10, the sqrt() method is accessed through the Math object directly., ceil ,round, Floor. 32) What are the core features of JavaScript?(MAY 2016) A lightweight, interpreted programming language. Designed for creating network-centric applications. Complementary to and integrated with Java. Complementary to and integrated with HTML. Open and cross-Platform. 33) What is the need for event Handling?(MAY 2016) They are two ways of using Event Handlers are Event Handlers as Attributes. Event Handlers as Properties.
1) What are the different types of detection categories? Technical issues ex: javascript support, Visual issues, Delivery issues, user issues 2) Define media queries. A media query takes the CSS media attribute and extends it with conditions that avoid using javascript for simple device capability detection. For example, web developers commonly are familiar with one style rule for print and one one for screen. 3) What are the navigator properties for visual detection? The navigator properties for visual detection are availHeight, availleft, availTop, availWidth, colorDepth, Pixel dept 4) What is a Cookie? A cookie is a variable that is stored on the visitor's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With JavaScript, you can both create and retrieve cookie values. 5) What are the two different types of cookies? Name cookie - The first time a visitor arrives to your web page, he or she must fill in her/his name. The name is then stored in a cookie. Next time the visitor arrives at your page, he or she could get a welcome message like "Welcome John Doe!" The name is retrieved from the stored cookie
Date cookie - The first time a visitor arrives to your web page, the current date is stored in a cookie. Next time the visitor arrives at your page, he or she could get a message like "Your last visit was on Tuesday August 11, 2005!" The date is retrieved from the stored cookie. 6) What is meant by event handlers? A function or method containing program statements that are executed in response to an event. An event handler typically is a software routine that processes actions such as keystrokes and mouse movements. With Web sites, event handlers make Web content dynamic. JavaScript is a common method of scripting event handlers for Web content. 7) Define Protocol Handlers and content handlers.. Protocol handlers are implemented as subclasses of the URLStreamHandler class. The URLStreamHandler class defines four access methods that can be overridden by its subclasses, but only theopenConnection () method is required to be overridden. Content handlers are give the ability to register a mime type to be handled by a specific URL, There are some Content Handler Generic, Word, Embed, and Sanitize. 8) What are the advantages and disadvantages of cookie? Used to store user-specific information with in user system to reduce burden on server. ie, user-specific information can be credentials(unam and pwd), sessionid, security token.
Cookies can be disabled on user browsers , Cookies are transmitted for each HTTP request/response causing overhead on bandwidth, No security for sensitive data 9) What does Rollover mean? Rollover is a JavaScript technique used by Web developers to produce an effect in which the appearance of a graphical image changes when the user rolls the mouse pointer over it. Rollover also refers to a button on a Web page that allows interactivity between the user and the Web page. It causes the button to react by either replacing the source image at the button with another image or redirecting it to a different Web page. 10) What is meant by animating the canvas? Animation involves repeatedly clearing the canvas and drawing an image on it. To create smooth animations, you need to minimize the time between clearing the canvas and completing the new drawing, and you need to keep the changes relatively small from image to image. For smooth animation, use the following sequence:
12) What is meant by Augmenting classes in JavaScript? JavaScript’s prototype-based inheritance mechanism is dynamic: an object inherits properties from its prototype, even if the prototype changes after the object is created. This means that we can augment JavaScript classes simply by adding new methods to their prototype objects. 13) What is the difference between SessionState and ViewState? ViewState is specific to a page in a session. Session state refers to user specific data that can be accessed across all pages in the web application. 14) How to create a function using function constructor? The following example illustrates this It creates a function called square with argument x and returns x multiplied by itself. var square = new Function ("x","return x*x"); 15) Define Class in Javascript with examples. A new JavaScript class is defined by creating a simple function. When a function is called with the new operator, the function serves as the constructor for that class. Internally, JavaScript creates an Object, and then calls the constructor function. Inside the constructor, the variable this is initialized to point to the just created Object. This code snippet defines a new class, Foo, and then creates a single object of that class. function Foo() { this.x = 1;
Post: XmlHttpObject.Open("POST", "file2.txt", true); 27) What are the extender controls? The extender controls uses a block of JavaScript code to add new and enhanced capabilities to ASP.NET. The developers can use a set of sample extender controls through a separate download - AJAX Control Toolkit (ACT). 28) List out the advantages and limitations of AJAX. (May 2014) Advantages : Better interactivity, Easier navigation, Compact, Backed by reputed brands Disadvantages: It is difficult to bookmark a particular state of the application, Function provided in the code-behind file do not work because the dynamic pages cannot register themselves on browsers history engine automatically. 29)Define the super classes and subclasses with example.(MAY 2015) Every class can have a super class from which it inherits properties and methods. Any class can be extended, or sub-classed so the resulting subclass can inherit its parent's behavior. As we have seen, JavaScript supports prototype inheritance instead of class based. It's possible for inheritance to happen other ways, however.
30) What is the use of Constructor?(MAY 2016) JavaScript constructors are special methods that create and initialize the properties for newly created objects. A constructor must be able to reference the object on which it is to operate.
1) What is PHP? PHP is a powerful tool for making dynamic and interactive Web pages, PHP stands for Hypertext Preprocessor, PHP is a server-side scripting language, like ASP, PHP scripts are executed on the server, PHP supports many databases (MySQl, ORACLE), and PHP is open source software. 2) How PHP works for the web? Understanding how the World Wide Web works is necessary to understand how PHP works for web. The Web is a network of computers that offer Web pages. Millions of Web sites are on the Web. To enable Web surfers to find the Web sites they want to visit, each Web page has an address, called a URL. This includes the Web site’s domain name and the filename, such as www.mycompany. com/welcome.html. When Web surfers want to visit a Web page, they type the URL into their Web browsers. The following process is set in motion: The Web browser sends a message out onto the Web, requesting the Web page and the message is sent to the computer at the address specified in the URL. 3) What is meant by LAMP server? LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP.
4) What are the steps to set a LAMP server? Step One—Install Apache Apache is free open source software which runs over 50% of the world’s web servers. To install apache, open terminal and type in these commands: Step Two—Install MySQL MySQL is a widely-deployed database management system used for organizing and retrieving data. Step Three—Install PHP PHP is an open source web scripting language that is widely used to build dynamic webpages. Step Four—RESULTS: See PHP on your Server Although LAMP is installed, we can still take a look and see the components online by creating a quick php info page 5 ) What is a PHP File? PHP files can contain text, HTML, CSS, JavaScript, and PHP code, PHP code are executed on the server, and the result is returned to the browser as plain HTML, PHP files have extension ".php" 6) What are the main functions for PHP? PHP can generate dynamic page content, PHP can create, open, read, write, and close files on the server,PHP can collect form data,PHP can send and receive cookies,PHP can add, delete, modify data in your database,PHP can restrict users to access some pages on your website,PHP can encrypt data. 7) What is the basis of PHP? PHP is a server side scripting language used on the Internet to create dynamic web pages. It is often coupled with MySQL, a relational database server that can store the information and variables the PHP files may use. Together they can create everything from the simplest web site to a full blown business web site, an interactive web forum, or even an online role playing game. 8) What is the difference between Print and Echo Statements? Differences between echo and print, is echo - can output one or more strings, print - can only output one string, and returns always 1 9) Define Variables in PHP. PHP variables must begin with a “$” sign,Case-sensitive ($Foo != $foo != $fOo) Global and locally-scoped variables, Global variables can be used anywhere, Local variables restricted to a function or class, Certain variable names reserved by PHP, they are two types one is Form variables ($_POST, $_GET), and second one is Server variables ($_SERVER) 10) Write short notes on Constants in PHP. A constant is an identifier (name) for a simple value. A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
11) What are the Formatting and Printing Strings available in PHP?
Function Description printf() Displays a formatted string sprintf() Saves a formatted string in a variable fprintf() Prints a formatted string to a file number_format() Formats numbers as strings 12)What are the Operators available in PHP? Arithmetic Operators: +, -, *,/ , %, ++, --,Assignment Operators: =, +=, - =, *=, /=, %=
statements; return return_value } function and return are keywords, function_ name is the user given name to the function $arg1, $arg2…… are the parameters passed to the function. The arguments can be both variables and arrays return_value is the value returned from the function Function is called by giving the name of function and giving the arguments within parentheses. If the function returns a value, it is assigned to a variable 20)Define References in PHP. References are nothing but pointers. That is these are variables that hold the address of another variable. If one variable changes the value, then it will be reflected in the other variable also. $val = 4; $ref = & $val; $ref++; echo $val Here the output will be 5 since both $ref and $val point to the same memory location 21) What are the two different forms tag attributes to reading data from a webpage? A form is a construct in HTML which enables users to interact and enter data that can be further processed on the server, Form tag has two attributes Method: specifies the way in which data is to be sent to the server (GET or POST) Action: specifies the URL where the data is to be sent, If action attribute is not specified, then data is sent to the same URL. 22) How to handle text areas in PHP? Handling text area Text areas are used for multiline text input Input tag:
In PHP $data = $_REQUEST[‘text’]; 23) How to handle checkboxes in PHP? Handling Check Boxes These are square shaped controls that can be selected or deselected with a mouse. These are used typically when we want the user to give input in terms of Yes/No, ,The string specified for the value attribute “Yes” is sent to the PHP script with the form ,data and the value can be accessed through the name attribute “check”, • The value of the checkbox can be accessed only if the checkbox has been ticked. We can check whether the check box has been ticked using the isset() function. The isset function takes a variable name as parameter and checks whether the variable exists or not. PHP script: If(isset($_REQUEST[‘check’])) echo $_REQUEST[‘check’]; else echo “Checkbox was not ticked”; 24) How to handle radio buttons in PHP? Handling Radio Buttons Check boxes are useful if we want the user to select multiple items from a number of Choices, Radio buttons are useful if we want user to select only one item from a number of choices All the radio buttons that form a group should have the same name attribute,
if(isset($_REQUEST[‘sex’])) echo “You are a $_REQUEST[‘sex’]”; 25)Write short notes on embedding PHP within HTML. PHP script may be embedded within HTML documents ie meaning PHP and HTML code can both happily co-exist in the same file. All embedded PHP code must be contained within tags so it can be readily recognized by the PHP engine for interpretation.
Typically the PHP code will write content into the body section of the html document. This is then sent to web browser. 26)Define MYSQL. MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.The official MySQL Workbench is a free integrated environment developed by MySQL AB that enables users to graphically administer MySQL databases and visually design database structure. 27) What are things to be considered for PHP with MYSQL? There are five things you want to be able to do from within PHP in relation to a MySQL database they are Connect to the MySQL database,Disconnect from the MySQL database,Execute MySQL queries, Work with the results from an SQL query ,Check the status of your MySQL command. 28) write down the general structure for each looping structure in PHP. (May 2014) for - loops through a block of code a number of times for/in - loops through the properties of an object while - loops through a block of code while a specified condition is true do/while - also loops through a block of code while a specified condition is true The for loop has the following syntax: for (statement 1; statement 2; statement 3) { code block to be executed } while loops are the simplest type of loop in PHP. They behave just like their C counterparts. The basic form of awhile statement is: While(expr) statement 29)when print/echo statement used in PHP? (May 2014) There are some differences between echo and print: echo - can output one or more strings print - can only output one string, and returns always 1 echo is marginally faster compared to print as echo does not return any value. 30) State how web works ( MAY 2015). The Web works on a client / server model in which client software (Browser) runs on a local computer. The Server software runs on a web host. To use the web you must make an Internet connection and then launch your web browser.
PART B UNIT I
SMTP stands for Simple Mail Transfer Protocol. It is simple ASCII protocol. This protocol establishes the TCP connection to port 25, act as client, waits for the receiving machine operating as the server to talk first. The server starts by sending a line of text giving its identify and telling whether it is prepared to revive mail. If it is not, the client releases the connection and tries again later. If the server is willing to accept email, the client announces whom the email is coming from and whom the message is returned to. If such a recipient exist the server gives the client the go ahead to send the message and the server acknowledge it. No checksum are needed because TCP provides a reliable byte stream. When all the email has been exchanged in both directions the connections is released. Example dialog for sending the message including the numerical codes used by SMTP. S: Server C:Client- S:220xyz.com SMTP service ready C:HELO abod.com S:250 xyz.com says hello to abed.com C:MAIL FROM:[email protected] S:250 sender ok C:RCPT TO:[email protected] S:250 recipient ok C:DATA S:354 send mail; end with “,”On a line by itself C: from:[email protected] C:To [email protected] C:MIME_version:1. C: Messages_id:[email protected] C:Content_Type:Multiport/alternative C:Subject:Hi Son C:Content_Type:text/enriched C:Happy birthday to you Joseph C: Content_type:audio/basic C:Content_transfer_encoding:base C: S:250 message accepted C:QUIT S:221 xyz.com closing connection The commands used are 1.Hello- to Establish Connection. 2.RCPT- to send a single message to multiple receivers.
Data Transfer Connection Steps:
FTP: The File transfer protocol sets the rules for transferring files between computers. When user wants to download a file from the server FTP is used. There are various issues that must be solved during such file transfer. These issues can be described as follows Client must have an authority to download particular file. The hardware and software on both the computers might be different. The data interpretation and data formats on client and server might be different. FTP provides the mechanism to handle these issues internally and user remains free different. FTP uses two connections between client and server. One connection is used for actual data transfer and other is used for control information. This separation of data and commands makes the FTP more Efficient.
When client makes a request for particular file download then using the data transfer connection actual data gets transmitted form server to the client. AT the same time server keeps track of how much data is sent so far and how much is remaining. This tracking can be done using the control transfer connection. Hence during the file downloading/uploading we can see a message about how many bytes are getting transferred and how much time is remaining .Various commands used in FTP are
S.No Command Meaning of the command 1 USER It identifies the user 2 PASS Password 3 QUIT For Logging off 4 CWD Change to another directory 6 DELE Delete the file 7 LIST Display the contents of the directory 8 RETR Retrieves files from server to client 9 STOR Stores file from client to server 10 APPE Appending the existing file 11 HELP Asking for the help