You are on page 1of 7

What is HTTP?

HTTP is short for Hyper Text Transfer Protocol. HTTP is the


underlying protocol used by the World Wide Web and this protocol
defines how messages are formatted and transmitted, and what
actions Web servers and browsers should take in response to
various commands.
HTTP is called a stateless protocol because each command is
executed independently, without any knowledge of the
commands that came before it. This shortcoming of HTTP is
being addressedSessions and Cookies.

Http Status Code


200 OK
The request is OK.
500
Internal Server Error
403 Forbidden Access is forbidden to the requested page.
404 Not FoundThe server cannot find the requested page.

What is URL?
URL is the abbreviation of Uniform Resource Locator
ex: http://www.google.com
The first part of the URL is called a protocol identifier and it
indicates what protocol to use.
The second part is called a resource nameand it specifies the IP
address or the domain name where the resource is located.
IP address is short for Internet Protocol (IP) address. An IP
addresss
an
identifier for a computer or device on
a TCP/IP network.

Web Browser is the Client who requests the service / files from
the server, the server responds back with the appropriate
files/service if cleint has appropriate priviledges.
The URL is Converted into IP address by DNS(Domain Name

Server)

Examples of Servers: Apache | IIS from Microsoft

XAMPP stands for


X: Cross Platform
A: Apache Server
M: MariaDB | MySQL (Database) [MySQL was replaced
with MariaDB on 19-10-2015]
P: PHP (Server Side Scripting Language)
P: Perl (Server Side Scripting Language)
DOCTYPE :
it is an instruction to the web browser about what version of
HTML the page is written in.

HTML :

HTML is the standard markup language for creating Web


pages. HTML stands for Hyper Text Markup Language.
HTML describes the structure of Web pages using markup.

XHTML:
Extensible HyperText Markup Language
HTML is SGML(Standard Generalized Markup Language) based
while XHTML is XML(Xtensible Markup Language) based.
XHTML was derived from HTML to conform to XML standards.
Hence XHTML is strict when compared to HTML and does not
allow user to get away with lapses in coding and structure.

CSS(Cascading Style Sheet) :


CSS is a language that describes the style of an HTML
document.
CSS describes how HTML elements should be displayed.
CSS comes in three types:

In a separate file (external)

At the top of a web page document (internal)

Right next to the text it decorates (inline)

Java Script :

Javascript is Client Side Programming language that make the


web page dynamic.
It is also used for following purpose
JavaScript Can Change HTML Content :
One of many JavaScript HTML methods is getElementById().
This example uses the method to "find" an HTML element (with
id="demo") and changes the element content (innerHTML) to
"Hello JavaScript":

document.getElementById("demo").innerHTML = "Hello
JavaScript";
JavaScript Can Change HTML Styles (CSS)
document.getElementById("demo").style.fontSize = "25px";
Make your web pages responsive - events
Create cookies.
Validate web form data.

XML :
XML stands for eXtensible Markup Language.
XML was designed to store and transport

data

Difference b/w XML & HTML

XML was designed to carry data - with focus on what data


is
HTML was designed to display data - with focus on how
data looks
XML tags are

XSLT

not predefined like HTML tags are

XSL (EXtensible Stylesheet Language) is a styling language


for XML.
CSS can also be used to style XML

XSLT stands for XSL Transformations.

XSLT

(Extensible Stylesheet Language


Transformations) is a language for
transforming XML documents into

other XML documents, or other formats such as HTML,

plain text , PDF, PostScript and PNG.


An XML document with
Formed".

correct syntax is called "Well

An XML document validated against a DTD | XML Schema is


both "Well Formed" and "Valid".

DTD :
A DTD is a Document Type Definition.
A DTD defines the structure and the legal elements and
attributes of an XML document.
XML documents are made up by the following building blocks:

Elements
Attributes

Entities

PCDATA

PCDATA is text that WILL be parsed by a


parser. The text will be examined by the parser for
entities and markup

CDATA

CDATA is text that will NOT be parsed by a parser. Tags


inside the text will NOT be treated as markup and
entities will not be expanded.

XML SCHEMA

An XML Schema describes the structure of an XML

document
The purpose of an XML Schema is to define the legal building
blocks of an XML document:

the elements and attributes that can appear in a document


the number of (and order of) child elements

data types for elements and attributes

default and fixed values for elements and attributes

Difference Between DTD and XML Schema

XML Schemas that it must be written in the XML, while DTDs


didnt written is XML.
As compared to the DTD, the XML Schema is strongly typed.

You will not find the derived and built-in data types in the
DTD as these are available in the XML Schema only.

The DTD is considered to be less powerful than XML schema.

With the help of the DTD, you can obtain the basic structure
or grammar for the main aim of defining a XML document.
You will discover the methods to define the constraints on
the data contained in the document while using XML
schema.

PHP

The PHP Hypertext Preprocessor (PHP) is a server side


scripting language that allows web developers to create
dynamic content that interacts with databases.

HTTP is Stateless Proctocol. To overcome that we use :


PHP Cookies
A cookie is often used to identify a user. A cookie is a
small file that the server embeds on the user's computer.
Each time the same computer requests a page with a
browser, it will send the cookie too. With PHP, you can both
create and retrieve cookie values.
A cookie is created with the setcookie() function.
setcookie(name, value, expire, path, domain, secure,
httponly);

PHP Sessions
To make data accessible across the various pages of an
entire website we use a PHP Session.
When you work with an application, you open it, do some
changes, and then you close it. This is much like a Session.
The computer knows who you are. It knows when you start
the application and when you end. But on the internet there
is one problem: the web server does not know who you are
or what you do, because the HTTP address doesn't maintain
state.
Session variables solve this problem by storing user
information to be used across multiple pages (e.g.
username, favorite color, etc). By default, session variables
last until the user closes the browser.
So; Session variables hold information about one single
user, and are available to all pages in one application.

Difference between Cookies and Sessions


The main difference between a session and a cookie is that

session data is stored on the server, whereas


cookies store data in the visitors browser.
Sessions are more secure than cookies as it is stored in
server.Cookie can be turn off from browser.
Data stored in cookie can be stored for months or years
depending on the life span of the cookie.But the data in the
session is lost when the web browser is closed.
For more differences refer the URL below:
http://www.phpcubes.com/what-is-the-difference-betweensession-and-cookies.html

CGI :
CGI stands for Common Gateway Interface.
CGI defines a standard way in which information may be
passed to and from the browser and server.

PERL (Practical Extraction and Report Language):


Perl is a programming language developed by Larry Wall,
especially designed for text processing.
Perl is a stable, cross platform programming language.

Ruby on Rails

Ruby on Rails, or simply Rails, is a server-side web


application framework written in Ruby.

You might also like