Professional Documents
Culture Documents
WE IAT-I & II
WE IAT-I & II
Script Running For server-side scripting, a web server The script for the client-side scripting runs
serves as the medium for running it. They by using a browser. It is present already in
create the pages that one would send to any user’s computer.
the browser.
Uses We use the server-side scripting at the We use the client-side scripting at the front
back-end, where the source code stays end, and any user can view it using the
hidden from the browser (client-side)- browser itself.
making it non-viewable.
Occurrence Server-side scripting occurs whenever a Client-side scripting occurs when all the
browser initiates a request for it. As a codes that a browser possesses in a page
result, many dynamic pages get created later change/ alter according to any user’s
on the basis of several conditions. input.
Operation Any server is capable of carrying out A typical browser performs the client-side
server-side scripting, but it can’t carry out scripting after it receives a page (that the
client-side scripting. server sends).
Execution The server-side scripting occurs on a The client-side scripting occurs on the local
remote computer. Thus, the response we computers. Thus, in this case, we get a
get is slower as compared to that of the comparatively quicker response in
client-side scripting. comparison with the server-side scripting.
Suitability The server-side scripting works well for The client-side scripting works well in
the areas that require the loading of a those cases that require user interaction.
dynamic type of data and information.
Connection to The server-side scripting assists a user in The client-side server doesn’t connect to
the Server connecting to the database that already those databases that exist primarily on the
Database exists in the concerned web server. concerned web server.
Access To The server-side scripting has complete The client-side scripting has no access to
Various Files access to all the files present in any web the files that exist in a web server.
server.
Languages Languages like Ruby on Rails, Perl, ASP, Languages like VB Script, CSS, HTML,
Python, ColdFusion, PHP, etc., come into Javascript, etc., are very common in the
play in the case of server-side scripting. case of client-side scripting.
Security The server-side scripting is way more The client-side scripts are much less secure
secure as compared to the client-side one. as compared to the server-side ones. It is
It is because the scripts of the server-side because these scripts don’t stay hidden
stay hidden from any random clients. from any random client’s end.
Tag Description
PART – B (4*10=40Marks)
11. a. Explain the various types of web protocols used for client server
communication.
In networking, a communications protocol or network protocol is the specification of a
set of rules for a particular type of communication.
Different protocols often describe different aspects of a single communication; taken
together, these form a protocol stack. The terms "protocol" and "protocol stack" also refer
to the software that implements a protocol.
Most recent protocols are assigned by the Internet Engineering Task Force (IETF) for
internet communications, and the Institute of Electrical and Electronics Engineers
(IEEE), or the International Organization for Standardization (ISO) organizations for
other types. The ITU-T handles telecommunications protocols and formats.
Index page for network protocols and protocol layers, categorised by the nearest
matching layers of the OSI seven layer model.
Systems engineering principles have been applied to design network protocol
12. a. Write and explain any five HTML form elements for online user
registration.
Type Description
<input type="radio"> Displays a radio button (for selecting one of many choices)
.class1.class2 .name1.name2 Selects all elements with both name1 and name2 set within
its class attribute
.class1 .class2 .name1 .name2 Selects all elements with name2 that is a descendant of an
element with name1
element,element div, p Selects all <div> elements and all <p> elements
element element div p Selects all <p> elements inside <div> elements
element>element div > p Selects all <p> elements where the parent is a <div>
element
13. a. Briefly explain about web browser architecture with a neat diagram.
What is a web browser?
A web browser is an application that serves as a gateway interface between
the user and the server. It loads and compiles the results from the server in the
form of an HTML web page and paints it on the screen of the user. It is an
interaction tool for using the internet.
A web browser helps us find any information available on the internet in the
form of texts, photos, and videos. Examples of web browsers are Chrome (one
of the most popular browsers used all over the world), Firefox, Safari, Edge,
Brave, and many more.
Browser Architecture
Browser architecture is designed to provide a faster, more secure, and more
feature-rich platform that helps users interact easily with the internet. The
browser architecture is broadly divided into seven parts.
displayArmstrongNumbers(1, 100);
b. Discuss and explain about java script handles the arrays with examples.
An array in JavaScript is a data structure used to store multiple values in a
single variable. It can hold various data types and allows for dynamic resizing.
Elements are accessed by their index, starting from 0.
You have two ways to create JavaScript Arrays: using the Array
constructor or the shorthand array literal syntax, which is just square
brackets. Arrays are flexible in size, so they can grow or shrink as you add or
remove elements.
PART-A (10*2=20Marks)
1. List any four methods of data object.
Name Description
AddGroup Creates a new data group and returns it as a Group object.
Clear Deletes all existing data groups and all variables that belong to them.
DeleteGroup Deletes the specified group and all variables that belong to this group.
Run Walks down the hierarchy of custom objects starting from the very beginning.
Example
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Try it Yourself »
In this example, a function is called from the event handler:
Example
<!DOCTYPE html>
<html>
<body>
<script>
function changeText(id) {
id.innerHTML = "Ooops!";
}
</script>
</body>
</html>
b. Write a javascript program to illustrate the exception handling
mechanism.
An error is an action that is inaccurate or incorrect. There are three types of errors in
programming which are discussed below:
Syntax error
Logical error
Runtime error
Syntax error: According to computer science, a syntax error is an error in the syntax
of a sequence of characters or tokens that is intended to be written in a particular
programming language or it is also a compile-time error if the syntax is not correct
then it will give an error message.
Example:
HTML
<script type="text/javascript">
window.printme();
</script>
As the syntax is not correct of the JavaScript it will affect only the thread that is under
this JavaScript and the rest of the code in other threads gets executed as nothing in
them depends on the code containing the error.
Logical error: It is the most difficult error to be traced as it is the error on the logical
part of the coding or logical error is a bug in a program that causes it to operate
incorrectly and terminate abnormally (or crash).
Runtime Error: A runtime error is an error that occurs during the running of the
program, also known as the exception. In the example that is given below the syntax
is correct, but at runtime, it is trying to call a method that does not exist.
Example:
Javascript
window.printme();
As in runtime errors, there are exceptions and these exceptions can be handled with
the help of the try-and-catch method
try-catch method
JavaScript uses the try catch and finally to handle the exception and it also uses the
throw operator to handle the exception. try have the main code to run and in the catch
block if any error is thrown by try block will be caught and the catch block will
execute. Finally block will always occur even if an error is thrown
Note:- We can create our own errors using throw but error thrown can only be
String, Number, Boolean, or an object
Syntax:
Javascript
try {
// Here the main Code runs
[break;]
catch ( exception e ){
[break;]
CAT (Concatenate
Concatenate + operator
Two Strings)
CHECK (Check
Check %CHECK (Check Characters)
Characters)
CHECKR (Check
Check Reverse %CHECKR (Check Reverse)
Reverse)
SCAN (Scan
Scan %SCAN (Scan for Characters)
String)
Characters)
GET
POST
PUT
HEAD
DELETE
PATCH
OPTIONS
CONNECT
TRACE
The two most common HTTP methods are: GET and POST.
Note that the query string (name/value pairs) is sent in the URL of a GET request:
/test/demo_form.php?name1=value1&name2=value2