Welcome

KU 5TH SEM ASSIGNMENT - BSIT (TA) - 52 (WEB PROGRAMMING)

Assignment: TA (Compulsory)

1. What is the meaning of Web? Explain in detail the building elements of web
Web is a complex network of international , cross plateform, and cross cultural communicating devices, connected to each other without any ordering or pattern.
There are two most important building blocks of web:
 HTML and HTTP.

HTML: - HTML stands for Hyper Text Markup Language. HTML is a very simple language used
to  “describe”  the logical  structure  of  a document.  Actually, HTML is  often  called  programming
language it is really not.  Programming languages are “Turing-complete”, or “computable”. That
is, programming languages can be used  to compute something such as the square root of pi or
some  other  such  task.  Typically  programming  languages  use  conditional  branches  and  loops
and operate on data contained in abstract data structures. HTML is much easier than all of that.
HTML  is  simply  a  ‘markup  language’  used  to  define  a  logical  structure  rather  than  compute
anything. 

HTTP:  - HTTP  is  a  “request-response”  type  protocol.  It  is  a  language  spoken  between  web
browser (client software) and a web server (server software) so that can communicate with each
other and exchange files. Now let us understand how client/server system works using HTTP. A
client/server system works something like this:  A big piece of computer (called a server) sits in
some office somewhere with a bunch of files that people  might want access to. This computer
runs a software package that listens all day long to requests over the wires.


2. “ HTML is the Language of the Web”  Justify the statement
HTML is often called a programming language it is really not. Programming languages
are ‘Turing-complete’, or ‘computable’. That is, programming languages can be used to compute something
such as the square root of pi or some other such task. Typically programming languages use conditional
branches and loops and operate on data contained in abstract data structures. HTML is much easier than
all of that. HTML is simply a ‘markup language’ used to define a logical structure rather than compute
anything.
For example, it can describe which text the browser should emphasize, which text should be considered
body text versus header text, and so forth.
The beauty of HTML of course is that it is generic enough that it can be read and interpreted by a web
browser running on any machine or operating system. This is because it only focuses on describing the
logical nature of the document, not on the specific style. The web browser is responsible for adding style.
For instance emphasized text might be bolded in one browser and italicized in another. it is up to the
browser to decide

3. Give the different classification of HTML tags with examples for each category
LIST OF HTML TAGS :-
Tags for Document Structure
·  HTML
·  HEAD
·  BODY
Heading Tags
·  TITLE
·  BASE
·  META
·  STYLE
·  LINK
Block-Level Text Elements
·  ADDRESS
·  BLOCKQUOTE
·  DIV
·  H1 through H6
·  P
·  PRE
·  XMP
Lists
·  DD
·  DIR
·  DL
·  DT
·  LI
·  MENU
·  OL
·  UL
Text Characteristics
·  B
·  BASEFONT
·  BIG
·  BLINK
·  CITE
·  CODE
·  EM
·  FONT
·  I
·  KBD
·  PLAINTEXT
·  S
·  SMALL

4. Write CGI application which accepts 3 numbers from the user and displays biggest number using GET and POST methods
#!/usr/bin/perl
#print "Content-type:text/html\n\n";
#$form = $ENV{'QUERY_STRING'};
use CGI;
$cgi = new CGI;
print $cgi->header;
print $cgi->start_html( "Question Ten" );
my $one = $cgi->param( 'one' );
my $two = $cgi->param( 'two' );
my $three = $cgi->param( 'three' );
if( $one && $two && $three )
{
$lcm = &findLCM( &findLCM( $one, $two ), $three );
print "LCM is $lcm";
}
else
{
print '
';
print 'Enter First Number 
';
print 'Enter Second Number 
';
print 'Enter Third Number 
';
print '
';
print "
";
}
print $cgi->end_html;
sub findLCM(){
my $x = shift;
my $y = shift;
my $temp, $ans;
if ($x < $y) {
$temp = $y;
$y = $x;
$x = $temp;
}
$ans = $y;
$temp = 1;
while ($ans % $x)
{
$ans = $y * $temp;
$temp++ ;
}
return $ans;
}

5. What is Javascript? Give its importance in web.
JavaScript is an easy to learn way to “Script“your web pages that is have them to do actions that cannot be handled with HTML alone. With JavaScript, you can make text scroll across the screen like ticker tape; you can make pictures change when you move over them, or any other number of dynamic enhancement.
JavaScript is generally only used inside of HTML document.

i)    JavaScript control document appearance and content.
ii)    JavaScript control the browser.
iii)    JavaScript interact with document content.
iv)    JavaScript interact with the user.
v)    JavaScript read and write client state with cookies.
vi)    JavaScript interact with applets.
vii)    JavaScript manipulate embedded images.

6. Explain briefly Cascading Style Sheets
Cascading Style Sheet (CSS) is a part of DHTML that controls the look and placement of the element on the page. With CSS you can basically set any style sheet property of any element on a html page. One of the biggest advantages with the CSS instead of the regular way of changing the look of elements is that you split content from design. You can for instance link a CSS file to all the pages in your site that sets the look of the pages, so if you want to change like the font size of your main text you just change it in the CSS file and all pages are updated.

7. What is CGI? List the different CGI environment variables
CGI or “Common Gateway Interface” is a specification which allows web users to run program from their computer.CGI is a part of the web server that can communicate with other programs running on the server. With CGI, the web server can call up a program, while passing user specific data to a program. The program then processes that data and the server passes the program’s response back to the web browser.
        When a CGI program is called, the information that is made available to it can be roughly broken into three groups:-
i). Information about client, server and user.
ii). Form data that are user supplied.
iii). Additional pathname information.

Most Information about client, server and user is placed in CGI environmental variables. Form data that are user supplied is incorporated in environment variables. Extra pathname information is placed in environment variables.
i). GATEWAY_INTERFACE –T he revision of the common Gateway interface that the server uses.
ii). SERVER_NAME – The Server’s hostname or IP address.
iii). SERVER_PORT – The port number of the host on which the server is running.
iv). REQUEST_METHOD – The method with which the information request is issued.
v). PATH_INFO – Extra path information passed to the CGI program

8. What is PERL? Explain  PERl control structures with the help of an example
Perl control structures include conditional statement, such as if/elseif/else blocks as well as loop like for each, for and while.
i). Conditional statements
        - If condition – The structure is always started by the word if, followed by a condition to be evaluated, then a pair the braces indicating the beginning and end of the code to be executed if the condition is true.
                   If(condition)
                   {condition to be executed
}
        - Unless – Unless is similar to if. You wanted to execute code only if a certain condition were false.
                   If($ varname! = 23) {
                   #code to execute if $ varname is not 23
                   }
        - The same test can be done using unless:     
                   Unless ($ varname== 23) {
                   #code to execute if $ varname is not 23
                   }
ii). Looping – Looping allow you to repeat code for as long as a condition is met. Perl has several loop control structures: foreach, for, while and until.
- While Loop – A while loop executes as long as a particular condition is true:
                   While (condition) {
                  #code to run as long as condition is true.
                   }
- Until Loop – A until loops the reverse of while. It executes as long as a particular condition is not true:
                   While (condition) {
                  #code to run as long as condition is not true.
                   }

Leave Comment & And Get Membership !!
Leave Comment & And Get Membership !!

11 comments:

  1. Thanks a ton brother....

    ReplyDelete
  2. Plz upload the remaining assignments of 5th Sem. Thanks.

    ReplyDelete
  3. WEB PROGRAMMING TA And TB in

    dis site

    http://rathelpdeskvs.blogspot.in/

    ReplyDelete
    Replies
    1. Bro can you please tell where could i find the remaining asaignments of 5th Sem TA part... Its really urgent... Thanks,

      Delete
  4. Thanks for this publish This is so helpfull to me. I was send a mail to you few days ago for this from rediffmail.com and today I found it by your help
    so thanks again and keep publishing.......
    By...

    ReplyDelete
  5. Thanks A lot MR. Vikas Sharma.
    Thank You For The Help And Your Efforts.

    ReplyDelete
  6. Plz upload the remaining assignments of 6th Sem.

    ReplyDelete
  7. Thanks for this publish This is so helpfull to me.
    SEO

    ReplyDelete

Leave Comments