You are on page 1of 15

INTRODUCTION TO THE

SERVER SIDE
World Wide Web

“The World Wide Web (WWW) is The Web is a distributed information system based on hypertext via the Internet.
With a web browser, one can vie web pages that may contain text, images, videos, and other multimedia, and navigate
between them.

Most Web documents are hypertext documents formatted via the HyperText Markup Language (HTML)
HTML documents contain
• text along with font specifications and other formatting instructions.
• hypertext links to other documents, which can be associated with regions of the text.
• forms, enabling users to enter data which can then be sent back to the Web server.
The Internet
Web browsers communicate with web servers using the HyperText Transfer Protocol (HTTP). When you click a
link on a web page, submit a form, or run a search, an HTTP request is sent from your browser to the target server.

Web servers wait for client request


messages, process them when they
arrive, and reply to the web browser with
an HTTP response message. The
response contains a status line indicating
whether or not the request succeeded.
The body of a successful response to a
request would contain the requested
resource (e.g. a new HTML page, or an
image), which could then be displayed
by the web browser.
What is client-side development?
Client-side development is a type of development that involves programs that run on a client or user's device.
Client-side developers focus on creating the part of a website that the user can interact with. Sometimes, client-side
development is also referred to as front-end development, as it focuses on the "front" part of an application that
users can see.
Client-side developers complete a variety of tasks, including:

•Creating website layouts

•Designing user interfaces

•Adding form validation

•Adding visual elements like colors and fonts


What is client-side development?

Some common client-side languages include:


•HTML: HTML, which stands for Hypertext Markup Language, is a markup language that is the standard
language for web development. HTML builds a website's structure and renders a website in a browser.
•CSS: CSS, which stands for Cascading Style Sheets, is a design language that developers can use to add
visual design elements to a website coded in HTML. Developers can use CSS to make their websites look
visually appealing on users' devices.
•JavaScript: JavaScript is a scripting language that developers can use for web development, web
applications and other purposes. Developers can use JavaScript to make websites dynamic and
interactive.
What is server-side development?
Server-side development is a type of development that involves programs that run on a server. Server-
side developers focus on behind-the-scenes development, and server-side development is also referred
to as "back-end" development. This type of programming is important because web browsers, or
clients, interact with web servers to retrieve information.

Common server-side tasks include:

•Coding dynamic websites

•Developing web applications

•Connecting websites to databases


What is server-side development?
Server-side developers can use many different programming languages, including:

•Java: Java is an object-oriented programming language that developers can use for a variety of purposes,
including software and application development. Java is one of the most popular server-side programming
languages.

•Python: Python is an object-oriented, general-purpose programming language that developers can use for web
development, application development, operating systems and other purposes. Python has applications in data
science, finance, computing and other fields.

•SQL: SQL, which stands for Structured Query Language, is the industry-standard language for interacting with
databases. Developers can use SQL to manipulate data in databases, including updating, retrieving and deleting
data.

•PHP: PHP, which stands for Hypertext Preprocessor, is a scripting language developers use to create websites and
web applications. PHP can connect to databases to display their content on websites.
web server’s responsibilities:
1. Stores and secures website data:
In web hosting services, a web server stores all website data and secures it from
unauthorized users when it is properly configured.
2. Provides web database access:
A web server’s responsibility is to provide access to websites that are hosted. Web hosting
service providers own some web servers that are used in variable ways to provide
different web hosting services, such as backend database servers.
3. Serve the end user requests:
Web servers accept requests from different users connected over the internet and serve
them accordingly.

4. Server side web scripting:


This feature of web server enables the user to create dynamic web pages. The
popular server side scripting languages include Perl, Ruby, Python, PHP, and ASP
etc.
Static sites
a static site is one that returns the same hard-coded content from the server whenever a particular resource is
requested. When a user wants to navigate to a page, the browser sends an HTTP "GET" request specifying its
URL.
The server retrieves the requested document from its file system and returns an HTTP response containing the
document and a success status. If the file cannot be retrieved for some reason, an error status is returned.

The diagram below shows a basic web server architecture for a static site
Uniform Resources Locators

On the Web, functionality of pointers is provided by Uniform Resource Locators (URLs).


URL example:

http://www.acm.org/sigmod
The first part indicates how the document is to be accessed
“http” indicates that the document is to be accessed using the Hyper Text Transfer Protocol.
The second part gives the unique name of a machine on the Internet.
The rest of the URL identifies the document within the machine.
The local identification can be:
The path name of a file on the machine, or
An identifier (path name) of a program, plus arguments to be passed to the program

E.g., http://www.google.com/search?q=silberschatz
Dynamic sites
A dynamic website is one where some of the response content is generated dynamically, only when
needed. On a dynamic website HTML pages are normally created by inserting data from a database
into placeholders in HTML templates (this is a much more efficient way of storing large amounts of
content than using static websites).

Most of the code to support a dynamic website must run on the server. Creating this code is
known as "server-side programming" (or sometimes "back-end scripting"). The diagram
below shows a simple architecture for a dynamic website.
PHP
• Php is a scripting language – it gets interpreted instead of being compiled like C++ and Java.
* Unlike JavaScript which is executed by the web browser, all PHP code is executed on the web server.

* The syntax is very similar to Perl and C. Variables are case sensitive, function names are not, and statements must
be terminated with a semicolon.

* PHP code should be placed between <? code ?> or <?php code ?> tags. There is no limitation as to where PHP code
can be inserted.

* To see information about how PHP is configured, version information, and the settings of all environment variables
(e.g., HTTP_USER_AGENT and QUERY_STRING), call the phpinfo() function in any script.

You might also like