You are on page 1of 12

PHP

PHP is a server side scripting language. That is used to develop Static websites or Dynamic
websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for
Personal Home Pages.

PHP scripts can only be interpreted on a server that has PHP installed.

The client computers accessing the PHP scripts require a web browser only.

A PHP file contains PHP tags and ends with the extension ".php".

It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle,


Sybase, Informix, and Microsoft SQL Server.

PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on
the UNIX side. The MySQL server, once started, executes even very complex queries with
huge result sets in record-setting time.

PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making n-
tier development a possibility for the first time.

Common uses of PHP

 PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
 PHP can handle forms, i.e. gather data from files, save data to a file, through email
you can send data, return data to the user.
 You add, delete, and modify elements within your database through PHP.
 Access cookies variables and set cookies.
 Using PHP, you can restrict users to access some pages of your website.
 It can encrypt data.

Characteristics of PHP

Five important characteristics make PHP's practical nature possible −

 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity

Page 1
<html>

<head>
<title>Hello World</title>
</head>

<body>
<?php echo "Hello, World!";?>
</body>

</html>

It will produce following result −


Hello, World!

The server interprets the PHP code and outputs the results as HTML code to the web
browsers.

In order for the server to identify the PHP code from the HTML code, we must always
enclose the PHP code in PHP tags.

A PHP tag starts with the less than symbol followed by the question mark and then the words
“php”.

PHP is a case sensitive language, “VAR” is not the same as “var”.

The PHP tags themselves are not case-sensitive, but it is strongly recommended that we use
lower case letter. The code below illustrates the above point.

<?php … ?>

We will be referring to the PHP lines of code as statements. PHP statements end with a semi
colon (;). If you only have one statement, you can omit the semi colon. If you have more than
one statement, then you must end each line with a semi colon. For the sake of consistency, it
is recommended that you always end your statement(s) with a semi colon. PHP scripts are
executed on the server. The output is returned in form of HTML.

Page 2
PERL

Perl is a family of script programming languages that are similar in syntax to the C language,
including Perl 5 and Perl 6. Perl is an open source, general-use, interpreted language.

In general, Perl is easier to learn and faster to code in than the more structured C and C++
languages. Perl programs can, however, be quite sophisticated. It is often used for developing
common gateway interface (CGI) programs because it has good text manipulation facilities,
although it also handles binary files.

Perl includes a number of popular UNIX facilities such as sed, Awk, and tr. It can be
compiled just before execution into either C code or cross-platform bytecode. When
compiled, a Perl program is almost as fast as a fully precompiled C language program. A
plug-in can be installed for some servers, such as Apache, so that Perl is loaded permanently
in memory, thus reducing compile time and resulting in faster execution of CGI Perl scripts.

The first version of Perl was created in 1987 by programmer Larry Wall. The name was
originally said to stand for "Practical Extraction and Reporting Language," but that name is
no longer used. Wall prefers the usage of an upper-case "Perl" for the language itself and
lower-case "perl" for any interpreter or compiler of Perl.

As of May 2017, Perl is in its fifth release, Perl 5, which was first made available in 1994.
The current version is 5.24, released in May 2016.

Perl 6, while stemming from the same ancestor language, is a completely separate
programming language from Perl 5, and is developed by a separate organization. The project
began after the 2000 Perl Conference, but the first official version of the language, version
6.c, was not made available until December 2015.

Features of Perl: Within the many features of Perl, there are few that stand out above the rest.

1) A feature of Perl is it also uses the XS language for interfacing between Perl and C code.

2) Perl uses the Perl DBI its standard database interface. It fully supports third-party databases
integration of Oracle, Postgres, MySQL, Sybase and others.

3) Perl is compatible with HTML, XML and other markup languages and it completely
supports Unicode strings.

4) Perl supports procedural programming such as sed, awk and Lisp.

5) Perl can be easily embedded into web servers to speed up the whole process

6) Perl is also an open source programming language that can be used on a number of
platforms.

Page 3
AJAX

AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating
better, faster, and more interactive web applications with the help of XML, HTML, CSS, and
Java Script.

Ajax uses XHTML for content, CSS for presentation, along with Document Object Model
and JavaScript for dynamic content display.

Conventional web applications transmit information to and from the sever using synchronous
requests. It means you fill out a form, hit submit, and get directed to a new page with new
information from the server.

With AJAX, when you hit submit, JavaScript will make a request to the server, interpret the
results, and update the current screen. In the purest sense, the user would never know that
anything was even transmitted to the server.

XML is commonly used as the format for receiving server data, although any format,
including plain text, can be used.

AJAX is a web browser technology independent of web server software.

A user can continue to use the application while the client program requests information from
the server in the background.

Intuitive and natural user interaction. Clicking is not required, mouse movement is a
sufficient event trigger.

Data-driven as opposed to page-driven.

Rich Internet Application Technology

AJAX is the most viable Rich Internet Application (RIA) technology so far. It is getting
tremendous industry momentum and several tool kit and frameworks are emerging. But at the
same time, AJAX has browser incompatibility and it is supported by JavaScript, which is
hard to maintain and debug

AJAX is based on Open Standards

 AJAX is based on the following open standards –


 Browser-based presentation using HTML and Cascading Style Sheets (CSS).
 Data is stored in XML format and fetched from the server.
 Behind-the-scenes data fetches using XMLHttpRequest objects in the browser.
 JavaScript to make everything happen.

Page 4
RUBY

Ruby is an interpreter, high-level, general-purpose programming language. It was designed


and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.

Ruby is dynamically typed and uses garbage collection and just-in-time compilation. It
supports multiple programming paradigms, including procedural, object-oriented, and
functional programming. According to the creator, Ruby was influenced by Perl, Smalltalk,
Eiffel, Ada, BASIC, and Lisp.

Ruby is "A Programmer's Best Friend".

Ruby has features that are similar to those of Smalltalk, Perl, and Python. Perl, Python, and
Smalltalk are scripting languages. Smalltalk is a true object-oriented language. Ruby, like
Smalltalk, is a perfect object-oriented language. Using Ruby syntax is much easier than using
Smalltalk syntax.

Features of Ruby

 Ruby can easily be connected to DB2, MySQL, Oracle, and Sybase.


 Ruby has a rich set of built-in functions, which can be used directly into Ruby scripts.
 Ruby is an open-source and is freely available on the Web, but it is subject to a
license.
 Ruby is a general-purpose, interpreted programming language.
 Ruby is a true object-oriented programming language.
 Ruby is a server-side scripting language similar to Python and PERL.
 Ruby can be used to write Common Gateway Interface (CGI) scripts.
 Ruby can be embedded into Hypertext Markup Language (HTML).
 Ruby has a clean and easy syntax that allows a new developer to learn very quickly
and easily.
 Ruby has similar syntax to that of many programming languages such as C++ and
Perl.
 Ruby is very much scalable and big programs written in Ruby are easily maintainable.
 Ruby can be used for developing Internet and intranet applications.
 Ruby can be installed in Windows and POSIX environments.
 Ruby support many GUI tools such as Tcl/Tk, GTK, and OpenGL.

Ruby is seen as a flexible language, since it allows its users to freely alter its parts. Essential
parts of Ruby can be removed or redefined, at will. Existing parts can be added upon. Ruby
tries not to restrict the coder. For example, addition is performed with the plus (+) operator.
But, if you’d rather use the readable word plus, you could add such a method to Ruby’s
builtin Numeric class
class Numeric
def plus(x)
self.+(x)
end
end

y = 5.plus 6
# y is now equal to 11

Page 5
RAILS

Rails is a software library that extends the Ruby programming language. David Heinemeier
Hansson is its creator. He gave it the name “Ruby on Rails,” though it is often just called
“Rails.”It is software code that is added to the Ruby programming language. Technically, it is
a package library (specifically, a RubyGem), that is installed using the operating system
command-line interface.

Rails is a framework for building websites. As such, Rails establishes conventions for easier
collaboration and maintenance. These conventions are codified as the Rails API (the
application programming interface, or directives that control the code). The Rails API is
documented online and described in books, articles, and blog posts. Learning Rails means
learning how to use the Rails conventions and its API.

Rails combines the Ruby programming language with HTML, CSS, and JavaScript to create
a web application that runs on a web server. Because it runs on a web server, Rails is
considered a server-side, or “back end,” web application development platform (the web
browser is the “front end”). Later, this article will describe web applications in greater depth
and show why a web development framework is needed to build complex websites.

Rails, in a larger sense, is more than a software library and an API. Rails is the central project
of a vast community that produces software libraries that simplify the task of building
complex websites. Members of the Rails community share many core values, often use the
same tools, and support each other with an informal network that is built on volunteerism.
Overlapping the informal community is an economic network that includes jobs, recruiters,
consulting firms, conferences, businesses that build websites with Rails, and investors that
fund startups. Rails is popular among web startups, significantly because the pool of open
source software libraries (RubyGems, or “gems”) makes it possible to build complex sites
quickly.

Rails Strengths

Rails is packed with features that make you more productive, with many of the following
features building on one other.

Metaprogramming

Where other frameworks use extensive code generation from scratch, Rail framework uses
Metaprogramming techniques to write programs. Ruby is one of the best languages for
Metaprogramming, and Rails uses this capability well. Rails also uses code generation but
relies much more on Metaprogramming for the heavy lifting.

Active Record

Rails introduce the Active Record framework, which saves objects into the database. The
Rails version of the Active Record discovers the columns in a database schema and
automatically attaches them to your domain objects using metaprogramming.

Page 6
Convention over configuration

Most web development frameworks for .NET or Java force you to write pages of
configuration code. If you follow the suggested naming conventions, Rails doesn't need much
configuration.

Scaffolding

You often create temporary code in the early stages of development to help get an application
up quickly and see how major components work together. Rails automatically creates much
of the scaffolding you'll need.

Built-in testing

Rails create simple automated tests you can then extend. Rails also provides supporting code
called harnesses and fixtures that make test cases easier to write and run. Ruby can then
execute all your automated tests with the rake utility.

Three environments

Rails give you three default environments: development, testing, and production. Each
behaves slightly differently, making your entire software development cycle easier. For
example, Rails creates a fresh copy of the Test database for each test run.

Page 7
IP Address

An IP address is a unique address that identifies a device on the internet or a local network.
IP stands for "Internet Protocol," which is the set of rules governing the format of data sent
via the internet or local network.

In essence, IP addresses are the identifier that allows information to be sent between devices
on a network: they contain location information and make devices accessible for
communication. The internet needs a way to differentiate between different computers,
routers, and websites. IP addresses provide a way of doing so and form an essential part of
how the internet works.

An IP address is a string of numbers separated by periods. IP addresses are expressed as a set


of four numbers — an example address might be 192.158.1.38. Each number in the set can
range from 0 to 255. So, the full IP addressing range goes from 0.0.0.0 to 255.255.255.255.

IP addresses are not random. They are mathematically produced and allocated by the Internet
Assigned Numbers Authority (IANA), a division of the Internet Corporation for Assigned
Names and Numbers (ICANN). ICANN is a non-profit organization that was established in
the United States in 1998 to help maintain the security of the internet and allow it to be
usable by all. Each time anyone registers a domain on the internet, they go through a domain
name registrar, who pays a small fee to ICANN to register the domain.

How do IP addresses work

If you want to understand why a particular device is not connecting in the way you would
expect or you want to troubleshoot why your network may not be working, it helps
understand how IP addresses work.

Internet Protocol works the same way as any other language, by communicating using set
guidelines to pass information. All devices find, send, and exchange information with other
connected devices using this protocol. By speaking the same language, any computer in any
location can talk to one another.

The use of IP addresses typically happens behind the scenes. The process works like this:

 Your device indirectly connects to the internet by connecting at first to a network


connected to the internet, which then grants your device access to the internet.
 When you are at home, that network will probably be your Internet Service Provider
(ISP). At work, it will be your company network.
 Your IP address is assigned to your device by your ISP.
 Your internet activity goes through the ISP, and they route it back to you, using your
IP address. Since they are giving you access to the internet, it is their role to assign an
IP address to your device.
 However, your IP address can change. For example, turning your modem or router on
or off can change it. Or you can contact your ISP, and they can change it for you.
 When you are out and about – for example, traveling – and you take your device with
you, your home IP address does not come with you. This is because you will be using
another network (Wi-Fi at a hotel, airport, or coffee shop, etc.) to access the internet

Page 8
and will be using a different (and temporary) IP address, assigned to you by the ISP
of the hotel, airport or coffee shop.

As the process implies, there are different types of IP addresses, which we explore below.

Types of IP addresses

There are different categories of IP addresses, and within each category, different types.

Consumer IP addresses

Every individual or business with an internet service plan will have two types of IP
addresses: their private IP addresses and their public IP address. The terms public and private
relate to the network location — that is, a private IP address is used inside a network, while a
public one is used outside a network.

Private IP addresses

Every device that connects to your internet network has a private IP address. This includes
computers, smartphones, and tablets but also any Bluetooth-enabled devices like speakers,
printers, or smart TVs. With the growing internet of things, the number of private IP
addresses you have at home is probably growing. Your router needs a way to identify these
items separately, and many items need a way to recognize each other. Therefore, your router
generates private IP addresses that are unique identifiers for each device that differentiate
them on the network.

Public IP addresses

A public IP address is the primary address associated with your whole network. While each
connected device has its own IP address, they are also included within the main IP address
for your network. As described above, your public IP address is provided to your router by
your ISP. Typically, ISPs have a large pool of IP addresses that they distribute to their
customers. Your public IP address is the address that all the devices outside your internet
network will use to recognize your network.

Public IP addresses

Public IP addresses come in two forms – dynamic and static.

Dynamic IP addresses

Dynamic IP addresses change automatically and regularly. ISPs buy a large pool of IP
addresses and assign them automatically to their customers. Periodically, they re-assign them
and put the older IP addresses back into the pool to be used for other customers. The rationale
for this approach is to generate cost savings for the ISP. Automating the regular movement of
IP addresses means they don’t have to carry out specific actions to re-establish a customer's
IP address if they move home, for example. There are security benefits, too, because a
changing IP address makes it harder for criminals to hack into your network interface.

Page 9
Static IP addresses

In contrast to dynamic IP addresses, static addresses remain consistent. Once the network
assigns an IP address, it remains the same. Most individuals and businesses do not need a
static IP address, but for businesses that plan to host their own server, it is crucial to have
one. This is because a static IP address ensures that websites and email addresses tied to it
will have a consistent IP address — vital if you want other devices to be able to find them
consistently on the web.

This leads to the next point – which is the two types of website IP addresses.

There are two types of website IP addresses

For website owners who don’t host their own server, and instead rely on a web hosting
package – which is the case for most websites – there are two types of website IP addresses.
These are shared and dedicated.

Shared IP addresses

Websites that rely on shared hosting plans from web hosting providers will typically be one
of many websites hosted on the same server. This tends to be the case for individual websites
or SME websites, where traffic volumes are manageable, and the sites themselves are limited
in terms of the number of pages, etc. Websites hosted in this way will have shared IP
addresses.

Dedicated IP addresses

Some web hosting plans have the option to purchase a dedicated IP address (or addresses).
This can make obtaining an SSL certificate easier and allows you to run your own File
Transfer Protocol (FTP) server. This makes it easier to share and transfer files with multiple
people within an organization and allow anonymous FTP sharing options. A dedicated IP
address also allows you to access your website using the IP address alone rather than the
domain name — useful if you want to build and test it before registering your domain.

Page 10
DNS

An application layer protocol defines how the application processes running on different
systems; pass the messages to each other.

 DNS stands for Domain Name System.


 DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.
 DNS is required for the functioning of the internet.
 Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
 DNS is a service that translates the domain name into IP addresses. This allows the
users of networks to utilize user-friendly names when looking for other hosts instead
of remembering the IP addresses.
 For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50,
most people would reach this site by specifying ftp.EduSoft.com. Therefore, the
domain name is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.

Generic Domains

o It defines the registered hosts according to their generic behaviour.


o Each node in a tree defines the domain name.
o It uses three-character labels, and these labels describe the organization type

Country Domain

The format of country domain is same as a generic domain, but it uses two-character country
abbreviations (e.g., us for the United States) in place of three character organizational
abbreviations.

Inverse Domain

The inverse domain is used for mapping an address to a name. When the server has received
a request from the client, and the server contains the files of only authorized clients. To
determine whether the client is on the authorized list or not, it sends a query to the DNS
server and ask for mapping an address to the name.

Page 11
Working of DNS

 DNS is a client/server network communication protocol. DNS clients send requests to


the. Server while DNS servers send responses to the client.
 Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted into
a name known as reverse DNS lookups.
 DNS implements a distributed database to store the name of all the hosts available on
the internet.
 If a client like a web browser sends a request containing a hostname, then a piece of
software such as DNS resolver sends a request to the DNS server to obtain the IP
address of a hostname.
 If DNS server does not contain the IP address associated with a hostname, then it
forwards the request to another DNS server. If IP address has arrived at the resolver,
which in turn completes the request over the internet protocol.

aero Airlines and aerospace companies


biz Businesses or firms
com Commercial Organizations
coop Cooperative business Organizations
edu Educational institutions
gov Government institutions
info Information service providers
int International Organizations
mil Military groups
museum Museum & other non-profit organizations
name Personal names
net Network Support centers
org Non-profit Organizations

Page 12

You might also like