BCA-302 Section A Part 2
BCA-302 Section A Part 2
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Proxy Server
A proxy server is a system or router that provides a gateway between users and the internet.
Therefore, it helps prevent cyber attackers from entering a private network. It is a server, referred
to as an “intermediary” because it goes between end-users and the web pages they visit online.
When a computer connects to the internet, it uses an IP address. This is similar to your home’s
street address, telling incoming data where to go and marking outgoing data with a return address
for other devices to authenticate. A proxy server is essentially a computer on the internet that has
an IP address of its own.
Proxies provide a valuable layer of security for your computer. They can be set up as web filters
or firewalls, protecting your computer from internet threats like malware.
This extra security is also valuable when coupled with a secure web gateway or other email
security products. This way, you can filter traffic according to its level of safety or how much
traffic your network—or individual computers—can handle.
How to use a proxy? Some people use proxies for personal purposes, such as hiding their
location while watching movies online, for example. For a company, however, they can be used
to accomplish several key tasks such as:
1. Improve security
2. Secure employees’ internet activity from people trying to snoop on them
3. Balance internet traffic to prevent crashes
4. Control the websites employees and staff access in the office
5. Save bandwidth by caching files or compressing incoming traffic
Page 20
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Because a proxy server has its own IP address, it acts as a go-between for a computer and the
internet. Your computer knows this address, and when you send a request on the internet, it is
routed to the proxy, which then gets the response from the web server and forwards the data from
the page to your computer’s browser, like Chrome, Safari, Firefox, or Microsoft Edge
There are hardware and software versions. Hardware connections sit between your network and
the internet, where they get, send, and forward data from the web. Software proxies are typically
hosted by a provider or reside in the cloud. You download and install an application on your
computer that facilitates interaction with the proxy.
Page 21
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Often, a software proxy can be obtained for a monthly fee. Sometimes, they are free. The free
versions tend to offer users fewer addresses and may only cover a few devices, while the paid
proxies can meet the demands of a business with many devices.
To get started with a proxy server, you have to configure it in your computer, device, or network.
Each operating system has its own setup procedures, so check the steps required for your
computer or network.
In most cases, however, setup means using an automatic configuration script. If you want to do it
manually, there will be options to enter the IP address and the appropriate port.
A proxy server performs the function of a firewall and filter. The end-user or a network
administrator can choose a proxy designed to protect data and privacy. This examines the data
going in and out of your computer or network. It then applies rules to prevent you from having to
expose your digital address to the world. Only the proxy’s IP address is seen by hackers or other
bad actors. Without your personal IP address, people on the internet do not have direct access to
your personal data, schedules, apps, or files.
With it in place, web requests go to the proxy, which then reaches out and gets what you want
from the internet. If the server has encryption capabilities, passwords and other personal data get
an extra tier of protection.
Page 22
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
1. Enhanced security: Can act like a firewall between your systems and the internet. Without
them, hackers have easy access to your IP address, which they can use to infiltrate your computer
or network.
2. Private browsing, watching, listening, and shopping: Use different proxies to help you avoid
getting inundated with unwanted ads or the collection of IP-specific data. With a proxy, site
browsing is well-protected and impossible to track.
3. Access to location-specific content: You can designate a proxy server with an address
associated with another country. You can, in effect, make it look like you are in that country and
gain full access to all the content computers in that country are allowed to interact with. For
example, the technology can allow you to open location-restricted websites by using local IP
addresses of the location you want to appear to be in.
4. Prevent employees from browsing inappropriate or distracting sites: You can use it to block
access to websites that run contrary to your organization’s principles. Also, you can block sites
that typically end up distracting employees from important tasks. Some organizations block
social media sites like Facebook and others to remove time-wasting temptations.
Web Page
A web page (or webpage) is a hypertext document on the World Wide Web. Web pages are
delivered by a web server to the user and displayed in a web browser. A website consists of
many web pages linked together under a common domain name.
Static Web pages: Static Web pages are very simple. It is written in languages such as HTML,
JavaScript, CSS, etc. For static web pages when a server receives a request for a web pa ge,
then the server sends the response to the client without doing any additional process. And these
Page 23
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
web pages are seen through a web browser. In static web pages, Pages will remain the same
until someone changes it manually.
Dynamic Web Pages: Dynamic Web Pages are written in languages such as CGI, AJAX,
ASP, ASP.NET, etc. In dynamic web pages, the Content of pages is different for different
visitors. It takes more time to load than the static web page. Dynamic web pages are used
where the information is changed frequently, for example, stock prices, weather information,
etc.
Page 24
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
In static web pages, Pages will remain In dynamic web pages, Content of pages are
1.
same until someone changes it manually. different for different visitors.
Page 25
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
In static web pages, Information are In dynamic web page, Information are change
3.
change rarely. frequently.
Static Web Page takes less time for Dynamic web page takes more time for
4.
loading than dynamic web page. loading.
Static web pages are written in languages Dynamic web pages are written in languages
6.
such as: HTML, JavaScript, CSS, etc. such as: CGI, AJAX, ASP, ASP.NET, etc.
Static web pages does not contain any Dynamic web pages contains application
7.
application program . program for different services.
Static web pages require less work and Dynamic web pages require comparatively
8.
cost in designing them. more work and cost in designing them.
Web hosting is a service of providing online space for storage of web pages. These web pages
are made available via World Wide Web. The companies which offer website hosting are
known as Web hosts.
Page 26
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
The servers on which web site is hosted remain switched on 24 x7. These servers are run by web
hosting companies. Each server has its own IP address. Since IP addresses are difficult to
remember therefore, webmaster points their domain name to the IP address of the server their
website is stored on.
It is not possible to host your website on your local computer, to do so you would have to leave
your computer on 24 hours a day. This is not practical and cheaper as well. This is where web
hosting companies comes in.
Types of Hosting
The following table describes different types of hosting that can be availed as per the need:
Shared Hosting
1. In shared hosting, the hosting company puts thousand of website on the same physical
server. Each customer has their own allocation of physical web space and a set of
bandwidth limit. As all websites share same physical memory, MYSQL server and
Apache server, one website on the server experiencing high traffic load will affect
performance of all websites on the server.
Dedicated Server
3. In this kind of hosting, single dedicated server is setup for just one customer. It is
commonly used by the businesses that need the power, control and security that a
dedicated server offers.
Reseller Hosting
4. A reseller acts as a middle man and sells hosting space of someone else’s server.
Grid Hosting
5. Instead of utilizing one server, Grid Hosting spreads resources over a large number of
servers. It is quite stable and flexible. The servers can be added or taken away from the
grid without crashing the system.
Page 27
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
1. Blue Host
2. Go Daddy
3. Host Gator
4. just Host
5. Laughing Squid
6. Hivelocity
7. liquid Web
8. Media TempleServInt
9. Wired Tree
11. Wix
12. WIPL
A domain name is the part of your Internet address that comes after "www". For example,
in www.google.com the domain name is google.com.
A domain name becomes your Business Address so care should be taken to select a domain
name. Your domain name should be easy to remember and easy to type.
Page 28
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Domain Extensions
The final letter at end of internet address is known as top level domain names. They are called
top level because they are read from right to left, and the part after the dot is the highest in a
hierarchy.
Domain Meaning
.edu Education
Registering a Domain Name is very simple. You can take following step to get your desired
domain name registered:
Think of a name that justifies your business need. To find out the available names you can enter
a name at commercial domain name registrar such as GoDaddy.
If the domain name entered by you is available, then select that particular domain name.
Now it will ask you for other additional services such as Email inbox, hosting etc. that host also
provides. You may choose what’s best for you.
Now they will ask you for your personal information which is stored in WHOIS database.
It will then ask for payment information. Pay for the purchase you have made. Make sure you
enter the correct payment information.
Page 29
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Once you are done with all above steps, you are ready to use their tools to upload your stuff to
your site.
Scripting Laguages
1. Client-side scripting :
Web browsers execute client-side scripting. It is used when browsers have all code. Source
code is used to transfer from webserver to user’s computer over the internet and run directly on
browsers. It is also used for validations and functionality for user events.
It allows for more interactivity. It usually performs several actions without going to the user. It
cannot be basically used to connect to databases on a web server. These scripts cannot access
the file system that resides in the web browser. Pages are altered on basis of the user’s choice.
It can also be used to create “cookies” that store data on the user’s computer.
2. Server-side scripting :
Web servers are used to execute server-side scripting. They are basically used to create
dynamic pages. It can also access the file system residing at the webserver. A server-side
environment that runs on a scripting language is a web server.
Scripts can be written in any of a number of server-side scripting languages available. It is
used to retrieve and generate content for dynamic pages. It is used to require to download
plugins. In this load times are generally faster than client-side scripting. When you need to
store and retrieve information a database will be used to contain data. It can use huge resources
of the server. It reduces client-side computation overhead. The server sends pages to the
request of the user/client.
Page 30
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
There are many advantages linked with The primary advantage is its ability to highly
this like faster. response times, a more customize, response requirements, access rights
interactive application. based on user.
It does not provide security for data. It provides more security for data.
It is a technique used in web development It is a technique that uses scripts on the webserver
in which scripts run on the client’s to produce a response that is customized for each
browser. client’s request.
HTML, CSS, and javascript are used. PHP, Python, Java, Ruby are used.
No need of interaction with the server. It is all about interacting with the servers.
It reduces load on processing unit of the It surge the processing load on the server.
Page 31
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
server.
What is JavaScript ?
JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly
because of the excitement being generated by Java. JavaScript made its first appearance in
Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language has
been embedded in Netscape, Internet Explorer, and other web browsers.
The ECMA-262 Specification defined a standard version of the core JavaScript language.
Client-Side JavaScript
Client-side JavaScript is the most common form of the language. The script should be included
in or referenced by an HTML document for the code to be interpreted by the browser. It means
that a web page need not be a static HTML, but can include programs that interact with the user,
control the browser, and dynamically create HTML content.
Page 32
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
The JavaScript client-side mechanism provides many advantages over traditional CGI server-
side scripts. For example, you might use JavaScript to check if the user has entered a valid e-mail
address in a form field.
The JavaScript code is executed when the user submits the form, and only if all the entries are
valid, they would be submitted to the Web Server.
JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and
other actions that the user initiates explicitly or implicitly.
Advantages of JavaScript
Less server interaction − You can validate user input before sending the page off to the server.
This saves server traffic, which means less load on your server.
Immediate feedback to the visitors − They don't have to wait for a page reload to see if they
have forgotten to enter something.
Increased interactivity − You can create interfaces that react when the user hovers over them
with a mouse or activates them via the keyboard.
Richer interfaces − You can use JavaScript to include such items as drag-and-drop components
and sliders to give a Rich Interface to your site visitors.
Limitations of JavaScript
Client-side JavaScript does not allow the reading or writing of files. This has been kept for
security reason.
JavaScript cannot be used for networking applications because there is no such support available.
JavaScript doesn't have any multi-threading or multiprocessor capabilities.
Page 33
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Once again, JavaScript is a lightweight, interpreted programming language that allows you to
build interactivity into otherwise static HTML pages.
One of major strengths of JavaScript is that it does not require expensive development tools. You
can start with a simple text editor such as Notepad. Since it is an interpreted language inside the
context of a web browser, you don't even need to buy a compiler.
To make our life simpler, various vendors have come up with very nice JavaScript editing tools.
Some of them are listed here −
Microsoft FrontPage
Macromedia Dreamweaver MX
Macromedia HomeSite 5
Web Server
It is a computer where the web content is stored. Basically web server is used to host the web
sites but there exists other web servers also such as gaming, storage, FTP, email etc.
Web site is collection of web pages while web server is a computer/software that respond to the
request for web resources.
Page 34
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
Web server respond to the client request in either of the following two ways:
Sending the file to the client associated with the requested URL.
Generating response by invoking a script and communicating with database
Key Points
When client sends request for a web page, the web server search for the requested page if
requested page is found then it will send it to client with an HTTP response.
If the requested web page is not found, web server will the send an HTTP response:Error 404
Not found.
If client has requested for some other resources then the web server will contact to the
application server and data store to construct the HTTP response.
Architecture
1. Concurrent Approach
Page 35
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
2. Single-Process-Event-Driven Approach.
Concurrent Approach
Concurrent approach allows the web server to handle multiple client requests at the same time. It
can be achieved by following methods:
Multi-process
Multi-threaded
Hybrid method.
Multi-processing
In this a single process (parent process) initiates several single-threaded child processes and
distribute incoming requests to these child processes. Each of the child processes are responsible
for handling single request.
It is the responsibility of parent process to monitor the load and decide if processes should be
killed or forked.
Multi-threaded
Hybrid
It is combination of above two approaches. In this approach multiple process are created and
each process initiates multiple threads. Each of the threads handles one connection. Using
multiple threads in single process results in less load on system resources.
Examples
Following table describes the most leading web servers available today:
Page 36
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
This is the most popular web server in the world developed by the Apache Software
Foundation. Apache web server is an open source software and can be installed on almost
all operating systems including Linux, UNIX, Windows, FreeBSD, Mac OS X and more.
About 60% of the web server machines run the Apache Web Server.
3. Lighttpd
The lighttpd, pronounced lighty is also a free web server that is distributed with the
FreeBSD operating system. This open source web server is fast, secure and consumes
much less CPU power. Lighttpd can also run on Windows, Mac OS X, Linux and Solaris
operating systems.
5. Jigsaw Server
Jigsaw (W3C's Server) comes from the World Wide Web Consortium. It is open source
and free and can run on various platforms like Linux, UNIX, Windows, and Mac OS X
Free BSD etc. Jigsaw has been written in Java and can run CGI scripts and PHP
Page 37
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
programs.
Advantages of CGI:
Quick implementation: CGI can be a quick and straightforward method for implementing
simple web-based tasks, such as form processing or data manipulation. For example, a CGI
script can be quickly developed and deployed to process user input from a web form and
generate a response.
Easy to use existing code: There is a large existing code base of CGI scripts, especially in Perl,
which can be readily used or customized for specific requirements. For example, there are
Page 38
MAHARISHI MARKANDESHWAR (DEEMED TO BE UNIVERSITY),
MULLANA (AMBALA)
Programme: BCA
Course: BCA-302: Web Designing Fundamentals
numerous CGI scripts available for tasks such as form processing, data validation, and file
uploads.
Well-defined and supported standard: CGI is a widely accepted standard in web development,
ensuring compatibility across different systems and platforms.
CGI-based counters and CGI code to perform simple tasks are available in plenty.
Disadvantages of CGI:
Overhead in page loads: Each page load in CGI incurs overhead by having to load the script
into memory, which can impact performance, especially in high-traffic websites. For example,
if a website receives a large number of requests, the overhead of loading the CGI script for
each request can result in slower response times.
Limited caching capabilities: CGI scripts do not easily allow for caching of data in memory
between page loads, which can affect performance and scalability. For example, if a website
requires frequent database queries or other resource-intensive tasks, CGI may not be the best
choice due to limited caching capabilities.
Security: Since CGI scripts are executed on the server, there is always a risk of security
vulnerabilities. For example, if the script does not properly validate user input, it may be
vulnerable to SQL injection attacks.
Scalability: CGI is not well-suited for handling large volumes of traffic or requests. As the
number of requests increases, the performance of the server may suffer, leading to slower
response times or even crashes.
Page 39