Web Technologies
Web Technologies
co
1
Page 1
www.gradeup.co
WED TECHNOLOGIES
1 HTML5
1. HTML
Hypertext Mark-up Language (HTML) is the standard mark-up language for webpages. It is
usually aided by technologies such as Cascading Style Sheets (CSS) and scripting languages
such as JavaScript and VBScript.
Web browsers receive HTML documents from a web server or from local storage and render
the documents into multimedia web pages. HTML describes the structure of a web page.
1.1. Basic HTML Document
<!DOCTYPE html>
<html>
<head>
<title>Title Goes Here</title>
</head>
<body>
<h1>Heading</h1>
<p>Text content here</p>
</body>
</html>
1.2. HTML Tags
HTML is a mark-up language and makes use of various tags to format the content. These
tags are enclosed within angle braces (e.g., <body>…</body>). Except few tags, most
of the tags have their corresponding closing tags. For example, <html> has its closing
tag </html>.
1.3. HTML Element
An HTML element is a type of HTML document component. Tags are used to delimit the
start and end of elements in the mark-up.
1.4. Attributes
Attributes in HTML are used to define the characteristics of an HTML element and are
placed inside the element's opening tag. All attributes are made up of two parts − a name
and a value:
2
Page 2
www.gradeup.co
2. TAGS IN HTML
• <code> </code>
• <cite> </cite>
• <address> </address>
• <em> </em>
• <strong> </strong>
3
Page 3
www.gradeup.co
2.3. Links
• <a href="URL">clickable text</a>
Creates a hyperlink to a Uniform Resource Locator (URL)
• <a href="mailto: EMAIL_ADDRESS">clickable text</a>
Creates a hyperlink to an email address
• <a name="NAME">
Creates a target location within a document
• <a href="#NAME">clickable text</a>
Creates a link to that target location
2.4. Formatting
• <p> </p>
Creates a new paragraph
• <br>
Inserts a line break (carriage return)
• <blockquote> </blockquote>
Puts content in a quote - indents text from both sides
• <div> </div>
Used to format block content with CSS
• <span> </span>
Used to format inline content with CSS
2.5. Graphical elements
• <hr>
Inserts a horizontal rule
• <img src="URL" alt = “alternate text”/>
Adds image; it is a separate file located at the URL. ‘alt’ sets the alternate text for
situations where image cannot be processed
2.6. Lists
• <ul> </ul>
Creates an unordered list
• <ol start=?> </ol>
Creates an ordered list (start=xx, where xx is a counting number)
• <li> </li>
Encompasses each list item
• <dl> </dl>
Creates a definition list
• <dt>
Precedes each definition term
• <dd>
Precedes each definition
4
Page 4
www.gradeup.co
2.7. Tables
• <table> </table>
Creates a table
• <tr> </tr>
Sets off each row in a table
• <td> </td>
Sets off each cell in a row
• <th> </th>
Sets off the table header (a normal cell with bold, centred text)
• <td rowspan=?>
Sets number of rows a cell should span
• <td colspan=?>
Sets number of columns a cell should span
2.8. Forms
• <form action="scriptURL" method=?> </form>
Defines a form; action points to the backend script ready to process the data and
method specifies the method to be used to upload data (usually GET or POST)
• <select multiple name=? size=?> </select>
Creates a scrolling menu; size sets the number of menu items visible before user needs
to scroll
• <select name=?> </select>
Creates a pulldown menu
• <option>
Sets off each menu item
• <textarea name=? cols="x" rows="y"></textarea>
Creates a text box area; columns set the width; rows set the height
• <input type="checkbox" name=? value=?>
Creates a checkbox
• <input type="radio" name=? value=?>
Creates a radio button
• <input type="text" name=? size=?>
Creates a one-line text area; size sets length (in characters)
• <input type="submit" value=?>
Creates a submit button; value sets the text in the submit button
• <input type="image" name=? src=? border=? alt=?>
Creates a submit button using an image
• <input type="reset">Creates a reset button
5
Page 5
www.gradeup.co
3. CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of
a document written in a mark-up language.
CSS separates the presentation (including layout, colours, and fonts) and content in a web
document.
Use of CSS has following advantages:
• Enhances content accessibility
• Provides more flexibility and control in the specification of presentation characteristics
• Enables multiple web pages to share formatting by specifying the relevant CSS in a
separate .css file
• Reduces complexity and repetition in the structural content
• Makes it feasible to present the same mark-up page in different styles for different
rendering methods, such as on-screen, in print etc.
3.1. CSS Syntax
A CSS rule-set consists of a selector and a declaration block.
• Selector points to the HTML element(s) to be styled
• Declaration block contains one or more declarations separated by semicolons
• Each declaration includes a CSS property name and a value, separated by a colon
• Multiple CSS declarations are separated with semicolons
• Declaration blocks are surrounded by curly braces
Selector
In CSS, selectors declare which part of the mark-up a style applies to by matching tags
and attributes in the mark-up itself.
Selectors may apply to the following:
1. All elements of a specific type, e.g. the second-level headers h2
2. Elements specified by attribute, in particular:
• id: an identifier unique within the document
• class: an identifier that can annotate multiple elements in a document
3. Elements depending on how they are placed relative to others in the document tree
Example:
h1 {
color: blue;
text-align: left;
}
In this example all <h1> elements will be left-aligned, with a blue text colour.
3.2. Adding CSS to HTML
There are four methods to include CSS in an HTML document:
• Inline CSS
• Embedded CSS
6
Page 6
www.gradeup.co
• External CSS
• Imported CSS
3.2.1. Inline CSS
Inline CSS rules can be defines using the ‘style’ attribute of an HTML element. Inline style
rules are applied only to the HTML element where rules are defined. Multiple CSS rules
are separated with semicolons.
Example:
<html>
<head>
</head>
<body>
<h1 style = "color:#36C;">
Inline CSS Example
</h1>
</body>
</html>
3.2.2. Embedded CSS
Embedded CSS is written in the <head> element using <style> tag.
Example:
<!DOCTYPE html>
<html>
<head>
<style type = "text/css" media = "all">
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
<h1>Embedded CSS Example</h1>
<p>Some text here</p>
</body>
</html>
7
Page 7
www.gradeup.co
8
Page 8
www.gradeup.co
• Any rule defined in <style>...</style> tags will override rules defined in any external
style sheet file.
• Any rule defined in external style sheet file takes lowest priority, and rules defined in
this file will be applied only when above two rules are not applicable.
4. XML
Extensible Mark-up Language (XML) is a mark-up language that defines a set of rules for
encoding documents in a format that is both human-readable and machine-readable. It is a
text-based mark-up language derived from Standard Generalized Mark-up Language (SGML).
XML tags identify the data and are used to store and organize the data, rather than specifying
how to display it like HTML tags, which are used to display the data.
Rules for XML syntax:
• All XML elements must have a closing tag.
• XML tags are case sensitive.
• All XML elements must be properly nested.
• All XML documents must have a root element.
• Attribute values must always be quoted.
4.1. XML Tree Structure
XML documents are formed as element trees. An XML tree starts at a root element and
branches from the root to child elements. All elements can have sub elements (child
elements):
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
The terms parent, child, and sibling are used to describe the relationships between
elements. Parents have children. Children have parents. Siblings are children on the same
level.
All elements can have text content and attributes.
4.2. XML Prolog
A prolog defines the XML version and the character encoding:
<?xml version="1.0" encoding="UTF-8"?>
The XML prolog is optional. If it exists, it must come first in the document.
4.3. XML Element
Everything from (including) a start tag to (including) the corresponding end tag is an
element
(e.g., <price>29.99</price>). An element can contain text, attributes, other elements
or a mix of these.
9
Page 9
www.gradeup.co
10
Page 10
www.gradeup.co
Syntax:
Following is the syntax for external DTD:
<!DOCTYPE root-element SYSTEM "file-name">
where file-name is the file with .dtd extension.
Example:
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM "note.dtd">
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
note.dtd -
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
4.6. XML Schema
XSD (XML Schema Definition) specifies how to formally describe the elements in an
Extensible Mark-up Language (XML) document. It can be used by programmers to verify
each piece of item content in a document. They can check if it adheres to the description
of the element it is placed in. Like all XML schema languages, XSD can be used to express
a set of rules to which an XML document must conform in order to be considered "valid"
according to that schema.
XML Schemas use XML Syntax, i.e., they are written in XML. Another strength of XML
Schemas is its support for data types.
XSD Example
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
****
11
Page 11
www.gradeup.co
12
Page 12
www.gradeup.co
1
Page 13
www.gradeup.co
WED TECHNOLOGIES
2 CLIENT-SERVER COMPUTING
1. CLIENT-SERVER MODEL
Client–server model is a distributed application structure that partitions tasks between two
entities, namely, servers (the providers of a resource or service) and clients (service
requesters). Often clients and servers communicate over a computer network on separate
hardware, but both client and server may reside in the same system. A server host runs one
or more server programs, which share their resources with clients. A client does not share any
of its resources, but it requests content or service from a server. Clients, therefore, initiate
communication sessions with servers, which await incoming requests.
Client: It is a computer (Host) which is capable of receiving information or using a particular
service from the service providers (Servers).
Server: It is a remote computer which provides information (data) or access to particular
services.
1.1. Working of Client-Server Model
Basically, the Client requests something and the Server serves it as long as it is present
in the database.
2
Page 14
www.gradeup.co
• In client server computing, a server is a central node that services many client nodes. On
the other hand, in a peer to peer system, the nodes collectively use their resources and
communicate with each other.
3
Page 15
www.gradeup.co
• In client server computing the server is the one that communicates with the other nodes. In
peer to peer to computing, all the nodes are equal and share data with each other directly.
• Client Server computing is believed to be a subcategory of the peer to peer computing.
3. SERVERS
A server is a computer or system that provides resources, data, services, or programs to other
computers, known as clients, over a network.
An individual system can provide resources and use them from another system at the same
time. This means that a device could be both a server and a client at the same time.
3.1. Working of a Server
To function as a server, a device must be configured to listen to requests from clients on
a network connection. This functionality can exist as part of the operating system as an
installed application, role, or a combination of the two.
When a client requires data or functionality from a server, it sends a request over the
network. The server receives this request and responds with the appropriate information.
A server will often perform numerous additional tasks as part of a single request and
response, including verifying the identity of the requestor, ensuring that the client has
permission to access the data or resources requested, and properly formatting or
returning the required response in an expected way.
3.2. Types of Servers
There are many types of servers that all perform different functions. Few of the most
• Web Server
At its core, a Web server serves static content to a Web browser by loading a file from a
disk and serving it across the network to a user's Web browser. This entire exchange is
mediated by the browser and server talking to each other using HTTP.
• Proxy Server
A proxy server sits between a client program (typically a Web browser) and an external
server (typically another server on the Web) to filter requests, improve performance, and
share connections.
• DNS servers
Domain Name System (DNS) servers are application servers that provide name resolution
readable IP addresses. When a client needs the address of a system, it sends a DNS
4
Page 16
www.gradeup.co
• FTP Server
One of the oldest of the Internet services, File Transfer Protocol makes it possible to move
one or more files securely between computers while providing file security and
organization as well as transfer control.
• Mail Server
Almost as ubiquitous and crucial as Web servers, mail servers move and store mail over
corporate networks (via LANs and WANs) and across the Internet.
• Database servers
Databases need to be accessible to multiple clients at any given time and can require
extraordinary amounts of disk space. Both of these needs lend themselves well to locating
such databases on servers. Database servers run database applications and respond to
numerous requests from clients.
• Application Server
Sometimes referred to as a type of middleware, application servers occupy a large chunk
of computing territory between database servers and the end user, and they often
connect the two.
• Print servers
Print servers allow for the management and distribution of printing functionality. Rather
than attaching a printer to every workstation, a single print server can respond to printing
requests from numerous clients.
4. WEB SERVER
A web server is server software, or hardware dedicated to running this software, that can
satisfy client requests on the World Wide Web. A web server can, in general, contain one or
more websites. A web server processes incoming network requests over HTTP and several other
related protocols.
The primary function of a web server is to store, process and deliver web pages to clients. The
communication between client and server takes place using the Hypertext Transfer Protocol
(HTTP). Pages delivered are most frequently HTML documents, which may include images, style
sheets and scripts in addition to the text content.
5. PROXY SERVER
A proxy server acts as a gateway between client and the internet. It’s an intermediary server
separating end users from the websites they browse. Proxy servers provide varying levels of
functionality, security, and privacy depending on the use case, needs, or company policy.
5
Page 17
www.gradeup.co
While using a proxy server, internet traffic flows through the proxy server on its way to the
address you requested. The request then comes back through that same proxy server, and
then the proxy server forwards the data received from the website.
Moreover, proxy servers act as a firewall and web filter, provide shared network connections,
and cache data to speed up common requests. A good proxy server keeps users and the internal
network protected from the bad stuff that lives out in the wild internet. Lastly, proxy servers
A transparent proxy tells websites that it is a proxy server and it will still pass along your
IP address, identifying you to the web server. Businesses, public libraries, and schools
often use transparent proxies for content filtering: they’re easy to set up both client and
server side.
An anonymous proxy will identify itself as a proxy, but it won’t pass your IP address to
the website – this helps prevent identity theft and keep your browsing habits private.
They can also prevent a website from serving you targeted marketing content based on
your location.
A distorting proxy server passes along a false IP address for you while identifying itself
as a proxy. This serves similar purposes as the anonymous proxy, but by passing a false
IP address, you can appear to be from a different location to get around content
restrictions.
High Anonymity proxy servers periodically change the IP address they present to the web
server, making it very difficult to keep track of what traffic belongs to who. High
anonymity proxies, like the TOR Network, is the most private and secure way to read the
internet.
****
6
Page 18
www.gradeup.co
7
Page 19
www.gradeup.co
1
Page 20
www.gradeup.co
WED TECHNOLOGIES
1. WEB ARCHITECTURE
Web architecture can be defined as the conceptual structure of the internet, or World Wide
Web. The WWW (or internet) is a constantly changing medium that enables communication
between different users and the technical interaction between different systems and
subsystems. The basis for this is different components and data formats, which are usually
arranged in tiers and built on each other. Overall, they form the infrastructure of the internet,
which is made possible by the three core components: data transmission protocols (TCP/IP,
HTTP, HTTPS), representation formats (HTML, CSS, XML), and addressing standards (URI,
URL).
2
Page 21
www.gradeup.co
3. WEB SERVICES
• A web service is any piece of software that makes itself available over the internet and uses
a standardized XML messaging system. XML is used to encode all communications to a web
service. For example, a client invokes a web service by sending an XML message, then waits
for a corresponding XML response. As all communication is in XML, web services are not
tied to any one operating system or programming language—Java can talk with Perl;
Windows applications can talk with Unix applications.
• Web services are self-contained, modular, distributed, dynamic applications that can be
described, published, located, or invoked over the network to create products, processes,
and supply chains. These applications can be local, distributed, or web-based. Web services
are built on top of open standards such as TCP/IP, HTTP, Java, HTML, and XML.
• Web services are XML-based information exchange systems that use the Internet for direct
application-to-application interaction. These systems can include programs, objects,
messages, or documents.
• A web service is a collection of open protocols and standards used for exchanging data
between applications or systems. Software applications written in various programming
languages and running on various platforms can use web services to exchange data over
computer networks like the Internet in a manner similar to inter-process communication on
a single computer. This interoperability (e.g., between Java and Python, or Windows and
Linux applications) is due to the use of open standards.
Web services are open standard (XML, SOAP, HTTP, etc.) based web applications that interact
with other web applications for the purpose of exchanging data. Web services can convert
existing applications into web applications.
3
Page 22
www.gradeup.co
4
Page 23
www.gradeup.co
5
Page 24
www.gradeup.co
The Common Gateway Interface (CGI) provides the middleware between WWW servers and
external databases and information sources. The Common Gateway Interface, or CGI, is a set
of standards that define how information is exchanged between the web server and a custom
script. The World Wide Web Consortium (W3C) defined the Common Gateway Interface (CGI)
and also defined how a program interacts with a Hyper Text Transfer Protocol (HTTP) server.
The Web server typically passes the form information to a small application program that
processes the data and may send back a confirmation message. This process or convention for
passing data back and forth between the server and the application is called the common
Features of CGI:
• CGI scripts are generally written in either Perl, C, or maybe just a simple shell script.
• CGI is the best method to create a counter because it is currently the quickest
Advantages of CGI:
• The advanced tasks are currently a lot easier to perform in CGI than in Java.
• It is always easier to use the code already written than to write your own.
• CGI specifies that the programs can be written in any language, and on any platform, as
• CGI-based counters and CGI code to perform simple tasks are available in plenty.
Disadvantages of CGI:
• In Common Gateway Interface each page load incurs overhead by having to load the
****
6
Page 25
www.gradeup.co
7
Page 26
www.gradeup.co
1
Page 27
www.gradeup.co
WED TECHNOLOGIES
The web application architecture describes the interactions between applications, databases,
and middleware systems on the web. It ensures that multiple applications work simultaneously.
As an instance, when the user hits the go button after typing a URL in the address bar of a web
browser, it requests for that particular web address. The server sends files to the browser as a
response to the request made. The browser then executes those files to show the requested
page. Finally, the user is able to interact with the website. The most important thing to note
here is that the code parsed by the web browser.
A web app works in a similar way. The code might or might not have specific instructions that
tell the browser how to respond with respect to the different types of user inputs. Hence, a web
application architecture has to include all the sub-components as well as the external
applications interchanges for the entire software application.
1.1. Web Application Components
• UI/UX Web Application Components – This includes activity logs, dashboards,
notifications, settings, statistics, etc. These components have nothing to do with the
operation of a web application architecture. Instead, they are part of the interface layout
plan of a web app.
• Structural Components – The two major structural components of a web app are
client and server sides.
• Client Component - The client component is developed in CSS, HTML, and JS. As it
exists within the user’s web browser, there is no need for operating system or device-
• Server Component - The server component can be build using one or a combination
of several programming languages and frameworks, including Java, .Net, NodeJS, PHP,
Python, and Ruby on Rails. The server component has at least two parts; app logic and
database. The former is the main control centre of the web application while the latter is
2
Page 28
www.gradeup.co
Depending on the total number of servers and databases used for a web application, the model
of a web app is decided. It can be any of the following three:
2.1. One Web Server, One Database
It is the simplest as well as the least reliable web app component model. Such a model
uses a single server as well as a single database. A web app builds on such a model will
go down as soon as the server goes down. Hence, it isn’t much reliable.
One web server, one database web application component model is not typically used for
real web applications. It is mostly used for running test projects as well as with the intent
of learning and understanding the fundamentals of the web application.
2.2. Multiple Web Servers, One Database
The idea with this type of web application component model is that the webserver doesn’t
store any data. When the webserver gets information from a client, it processes the same
and then writes it to the database, which is managed outside of the server. This is
sometimes also referred to as a stateless architecture.
At least 2 web servers are required for this web application component model. This is all
for avoiding failure. Even when one of the web servers goes down, the other one will take
charge.
All requests made will be redirected automatically to the new server and the web app
will continue execution. Hence, reliability is better as compared to the single server with
inherent database model. However, if the database crashes the web app will follow to
do the same.
2.3. Multiple Web Server, Multiple Databases
It is the most efficient web application component model because neither the web servers
nor the databases have a single point of failure. There are two options for this type of
model. Either to store identical data in all the employed databases or distribute it evenly
among them.
Not more than 2 databases are required typically for the former case, while for the latter
case some data might become unavailable in the scenario of a database crash. DBMS
normalization is used, however, in both scenarios.
3
Page 29
www.gradeup.co
• Single-Page Applications (SPAs) – Instead of loading completely new pages from the
server each time for a user action, single page web applications allow for a dynamic interaction
by means of providing updated content to the current page.
AJAX, a concise form of Asynchronous JavaScript and XML, is the foundation for enabling page
communications and hence, making SPAs a reality. Because single-page applications prevent
interruptions in user experience, they, in a way, resemble traditional desktop applications.
SPAs are designed in a way so that they request for most necessary content and information
elements. This leads to the procurement of an intuitive as well as interactive user experience.
• Microservices – These are small and lightweight services that execute a single functionality.
The Microservices Architecture framework has a number of advantages that allows developers
to not only enhance productivity but also speed up the entire deployment process.
The components making up an application build using the Microservices Architecture aren’t
directly dependent on each other. As such, they don’t necessitate to be built using the same
programming language.
Hence, developers working with the Microservices Architecture are free to pick up a technology
stack of choice. It makes developing the application simpler and quicker.
• Serverless Architectures – In this type of web application architecture, an application
developer consults a third-party cloud infrastructure services provider for outsourcing server
as well as infrastructure management.
The benefit of this approach is that it allows applications to execute the code logic without
bothering with the infrastructure-related tasks.
The Serverless Architecture is best when the development company doesn’t want to manage
or support the servers as well as the hardware, they have developed the web application for.
4. MVC ARCHITECTURE
4
Page 30
www.gradeup.co
5
Page 31
www.gradeup.co
Flow Steps
Step 1: The client browser sends request to the MVC Application.
Step 2: Global.ascx receives this request and performs routing based on the URL of the
incoming request using the RouteTable, RouteData, UrlRoutingModule and
MvcRouteHandler objects.
Step 3: This routing operation calls the appropriate controller and executes it using the
IControllerFactory object and MvcHandler object's Execute method.
Step 4: The Controller processes the data using Model and invokes the appropriate
method using ControllerActionInvoker object
Step 5: The processed Model is then passed to the View, which in turn renders the final
output.
4.2. Advantages of MVC
• Simultaneous development – Multiple developers can work simultaneously on the
model, controller and views.
• High cohesion – MVC enables logical grouping of related actions on a controller together.
The views for a specific model are also grouped together.
• Loose coupling – The very nature of the MVC framework is such that there is low
coupling among models, views or controllers.
• Ease of modification – Because of the separation of responsibilities, future development
or modification is easier.
• Multiple views for a model – Models can have multiple views.
• Testability - with the clearer separation of concerns, each part can be better tested
independently (e.g. exercising the model without having to stub the view).
4.3. Disadvantages of MVC
• Code navigability – The framework navigation can be complex because it introduces
new layers of indirection and requires users to adapt to the decomposition criteria of MVC.
• Multi-artifact consistency – Decomposing a feature into three artifacts causes
scattering. Thus, requiring developers to maintain the consistency of multiple
representations at once.
• Undermined by inevitable clustering – Applications tend to have heavy interaction
between what the user sees and what the user uses. Therefore, each feature's
computation and state tend to get clustered into one of the 3 program parts, erasing the
purported advantages of MVC.
• Excessive boilerplate – Due to the application computation and state being typically
clustered into one of the 3 parts, the other parts degenerate into either boilerplate shims
or code-behind that exists only to satisfy the MVC pattern.
6
Page 32
www.gradeup.co
5. SCRIPTING LANGUAGE
A scripting language is a language that uses a sophisticated method to bring codes to a runtime
environment. Scripting languages are made for specific runtime environments, and they
automate some of the code implementation. They do not require the compilation step and are
rather interpreted.
Types of Scripting Language:
5.1. JavaScript
JavaScript is used for client-side scripting of dynamic content of web pages. Client-side
scripting means that the script is part of the web page itself when you download it and is
executed by the browser software. This is in contrast to server-side scripting where the
scripts are run on a central computer server.
The name JavaScript is somewhat confusing, since the language is not related to another
programming language called Java - these languages have nothing in common other than
their name.
The most common use of JavaScript is to develop dynamic content within regular web
pages in HyperText Markup Language, or HTML, format. Basic HTML consists mostly of
text and images, and JavaScript can make things more interactive.
Basic Syntax:
<script>
document.write("Basic Print method in JavaScript");
</script>
Features
Features of JavaScript:
• A JavaScript variable is the simple name of storage location where data to be stored.
There are two types of variables in JavaScript which are listed below:
o Local variables: Declare a variable inside of block or function.
o Global variables: Declare a variable outside function or with window object.
• JavaScript operators are symbols that are used to compute the value or in other word
we can perform operations on operands. Arithmetic operators ( +, -, *, / ) are used to
compute the value and Assignment operator ( =, +=, %= ) are used to assign the values
to variables.
7
Page 33
www.gradeup.co
8
Page 34
www.gradeup.co
Typical examples of such requests are posting user contributions to Internet discussion
boards and the processing of customer orders. Website like Amazon.com and Craigslist
rely heavily on Perl scripting.
You can use Perl interpreter with -e option at command line.
A Perl file must be saved with a .pl or .PL file extension in order to be recognized as a
functioning Perl script.
Syntax:
$perl -e 'print "Hello World\n"'
This execution will produce the following result −
Hello, world
Features of Perl:
• A Perl program does not care about whitespaces
• A Perl variable name starts with either $, @ or % followed by zero or more letters,
underscores, and digits (0 to 9).
• Perl does not allow punctuation characters such as @, $, and % within identifiers. Perl
is a case sensitive programming language. Thus $Mango and $mango are two
different identifiers in Perl.
• As with any programming language, PERL offers an escape from your code via the '#'
sign.
• In PERL we use the backslash (\) character to escape any type of character that might
interfere with our code.
• Perl file name can contain numbers, symbols, letters and underscore (_), however
spaces are not allowed in the file name. for e.g. hello_world.pl is a valid file name but
hello world.pl is an invalid file name.
5.4. Bash: It is a scripting language to work in the Linux interface. It is a lot easier to use
bash to create scripts than other programming languages. It describes the tools to use
and code in the command line and create useful reusable scripts and conserve
documentation for other people to work with. The name is an acronym for the ‘Bourne
Again SHell’.
5.5. Node js: It is a framework to write network applications using JavaScript. Corporate
users of Node.js include IBM, LinkedIn, Microsoft, Netflix, PayPal, Yahoo for real-time
web applications. Node.js is a very powerful JavaScript-based platform built on Google
Chrome's JavaScript V8 Engine. It is used to develop I/O intensive web applications like
video streaming sites, single-page applications, and other web applications. Node.js is
open source, completely free, and used by thousands of developers around the world.
Node.js also provides a rich library of various JavaScript modules which simplifies the
development of web applications using Node.js to a great extent.
Node.js = Runtime Environment + JavaScript Library
9
Page 35
www.gradeup.co
Features of Node.js
• Asynchronous and Event Driven: All APIs of Node.js library are asynchronous, that
is, non-blocking. It essentially means a Node.js based server never waits for an API to
return data. The server moves to the next API after calling it and a notification
mechanism of Events of Node.js helps the server to get a response from the previous
API call.
• Fast: Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast
in code execution.
• Single Threaded but Highly Scalable: Event mechanism helps the server to respond
in a non-blocking way and makes the server highly scalable as opposed to traditional
servers which create limited threads to handle requests. Node.js uses a single threaded
program and the same program can provide service to a much larger number of requests
than traditional servers like Apache HTTP Server.
• No Buffering − Node.js applications never buffer any data. These applications simply
output the data in chunks.
• License − Node.js is released under the MIT licens
5.6. Ruby: There are a lot of reasons to learn Ruby programming language. Ruby’s flexibility
has allowed developers to create innovative software. It is a scripting language which is
great for web development.
Features of Ruby
• Ruby is an open-source and is freely available on the Web, but it is subject to a license.
• Ruby interprets newline characters(\n) and semicolons(;) as the end of a statement.
• Whitespace characters such as spaces and tabs are generally ignored in Ruby code,
except when they appear in a string, i.e. it ignores all spaces in a statement But
sometimes, whitespaces are used to interpret ambiguous statements.
• BEGIN statement is used to declare a part of code which must be called before the
program runs. END is used to declare a part of code which must be called at the end of
program.
• Ruby is a general-purpose, interpreted programming language.
• Ruby is a true object-oriented programming language.
• A comment hides some part of code, from the Ruby Interpreter. Comments can be
written in different ways, using hash character(#) at the beginning of a line.
• Identifiers are names of variables, constants and functions/methods.
• Ruby identifiers are case sensitive.
• Ruby identifiers may consists of alphanumeric characters and also underscore ( _
).
• Ruby is a server-side scripting language similar to Python and PERL.
10
Page 36
www.gradeup.co
11
Page 37
www.gradeup.co
12
Page 38
www.gradeup.co
13
Page 39