Web Tech Solution (10 Marks Each) - 1
Web Tech Solution (10 Marks Each) - 1
System Architecture:
From the user’s point of view, the web consists of a vast, worldwide connection
of documents or web pages. Each page may contain links to other pages
anywhere in the world. The pages can be retrieved and viewed by using
browsers of which internet explorer, Netscape Navigator, Google, Chrome, etc
are the popular ones. The browser fetches the page requested interprets the
text and formatting commands on it, and displays the page, properly formatted,
on the screen.
The basic model of how the web works are shown in the figure below. Here the
browser is displaying a web page on the client machine. When the user clicks
on a line of text that is linked to a page on the abd.com server, the browser
follows the hyperlink by sending a message to the abd.com server asking it for
the page.
Working of WWW:
The World Wide Web is based on several different technologies: Web browsers,
Hypertext Markup Language (HTML) and Hypertext Transfer Protocol (HTTP).
A Web browser is used to access webpages. Web browsers can be defined as
programs which display text, data, pictures, animation and video on the
Internet. Hyperlinked resources on the World Wide Web can be accessed using
software interface provided by Web browsers. Initially Web browsers were used
only for surfing the Web but now they have become more universal. Web
browsers can be used for several tasks including conducting searches, mailing,
transferring files, and much more. Some of the commonly used browsers are
Internet Explorer, Opera Mini, Google Chrome.
Q.2 Explain following.
(1) How Web request works?
1. The browser goes to the DNS server, and finds the real address of the server that
the website lives on (you find the address of the shop).
2. The browser sends an HTTP request message to the server, asking it to send a
copy of the website to the client (you go to the shop and order your goods). This
message, and all other data sent between the client and the server, is sent across
your internet connection using TCP/IP.
3. If the server approves the client's request, the server sends the client a "200 OK"
message, which means "Of course you can look at that website! Here it is", and
then starts sending the website's files to the browser as a series of small chunks
called data packets (the shop gives you your goods, and you bring them back to
your house).
4. The browser assembles the small chunks into a complete web page and displays
it to you (the goods arrive at your door — new shiny stuff, awesome!).
5. Get ,Post , Trace ,Delete ,Head ,Put ,Options etc. are requests that are sent to
server to get the web pages.
ASP HTML
HTML is a client-side language.
Basically it has to do with the user
ASP is a server-side language. This means interface, with which the user
that the code that is written gets sent to the interacts. This interface, is most
server, and it returns some code depending often, the browser on the user’s
on what it was asked to do. machine.
ASP can use any scripting language, so as HTML allows web browsers to
to embed programming and server side interpret display content written
directives into a HTML web page. between tags. It allows images
and objects to be embedded in
the webpage.
The ASP Application Object is a single global object that is used to share
information among all the users in the given application. It is used to store and
access the variable from any page. It is used to access the information that will
hold many pages like a piece of database-connection information. The
information that can be changed in one page that will be changed is
automatically reflected in many pages.
The ASP Response Object is used to send a response to the client request
from a server.
The ASP Request Object is used to retrieve the information from the client
browser. The Request Object is used when the client wants to request for a
particular page from the server.
The ASP Server object is used to access properties and methods on the
server.
The ASP Error object was implemented in ASP 3.0 and is available in IIS5 and
later.The ASPError object is used to display detailed information of any error
that occurs in scripts in an ASP page.Note: The ASPError object is created when
Server.GetLastError is called, so the error information can only be accessed by
using the Server.GetLastError method.
The ASP File object is used to return information about a specified file.
The ASP Drive object is used to return information about a local disk drive or
a network share. The Drive object can return information about a drive's type of
file system, free space, serial number, volume name, and more.
Java JavaScript
JavaScript provides 3 places to put the JavaScript code: within body tag, within head tag
and external JavaScript file.
1. <script type="text/javascript">
2. alert("Hello Javatpoint");
3. </script>
Common examples of JavaScript that you might use every day include the search box on
Amazon, a news recap video embedded on The New York Times, or refreshing your Twitter
feed.
Q.5 What is MMC? Explain features of MMC.
Microsoft Management Console (MMC) also known as a tools host, is a framework
that provides administrators and users with an interface for management,
administration and configuration of a system. It is a component of the Microsoft
Windows 2000 OS and all its successors. It is an application that provides a Graphical
User Interface (GUI) and a programming framework where you can create, save, and open
consoles (a collection of management tools).
MMC uses a GUI much like the Windows Explorer file manager. It is
considered a container for actual management operations.
The MMC computer management component is located in the Administrative
Tools folder of the Control Panel. Some of the management tools it contains
are the Device Manager, Disk Defragmenter, Internet Information Services
(IIS), Local Users and Disk Management. These tools are called snap-ins.
They are useful when configuring and monitoring systems.
The MMC console can also be used for monitoring or configuring other
computers on the local area network (LAN) to which the user has access.
XSLT Working:
In the transformation process, XSLT uses XPath to define parts of the source document
that should match one or more predefined templates.
When a match is found, XSLT will transform the matching part of the source document
into the result document.
Q.7 What is Cascading Style Sheet? Explain various types of
Style Sheets with example.
Cascading Style Sheet(CSS) is used to set the style in web pages that contain
HTML elements. It sets the background color, font-size, font-family, color, … etc
property of elements on a web page.
There are three types of CSS which are given below:
Inline CSS
Internal or Embedded CSS
External CSS
Inline CSS: Inline CSS contains the CSS property in the body section attached
with element is known as inline CSS. This kind of style is specified within an
HTML tag using the style attribute.
Internal or Embedded CSS: This can be used when a single HTML document
must be styled uniquely. The CSS rule set should be within the HTML file in the
head section i.e the CSS is embedded within the HTML file.
External CSS: External CSS contains separate CSS file which contains only
style property with the help of tag attributes (For example class, id, heading, …
etc). CSS property written in a separate file with .css extension and should be
linked to the HTML document using link tag. This means that for each element,
style can be set only once and that will be applied across web pages.
link tag is used to link the external style sheet with the html webpage.
href attribute is used to specify the location of the external style sheet
file.
Q.8 What is Apache? Explain the architecture of Apache
server.
Apache HTTP Server is a free and open-source web server that delivers web
content through the internet. It is commonly referred to as Apache and after
development, it quickly became the most popular HTTP client on the web. It’s
widely thought that Apache gets its name from its development history and
process of improvement through applied patches and modules but that was
corrected back in 2000. It was revealed that the name originated from the
respect of the Native American tribe for its resiliency and durability.
The Apache was the first web server architecture that was used by the Netscape
Communication Corporation.
Apache has evolved with the years of the internet. Server is used to support both static and
dynamic pages online. Many programming languages are supported by the Apache Server are as
follows: PHP, Perl, Python and alongside with MySql. As of April 2008, the Apache Server serves
approximately 50% of the current web pages.
Apache is a open source HTTP web server. It handles HTTP Requests sent to it and then it is
able to them
Apache is Open source and is built and maintained over at Apache.org
Apache is comprised of Two main building Blocks with the Latter being comprised of many
other little building blocks. The Building Blocks are the Apache Core and then the Apache
Modules that in a sense extend the Apache core. More detail on this on next couple of slides.
Very easy to implement and very easy to add extend its abilities by the adding of different
modules. This is why this server has become so popular.
As you can see the designers of Apache decided to take a modular approach so that anyone can
add to the basic functionality of the server without disturbing the basic Core implementation.
9.What is HTML file and ASP file? List the advantages and
limitation of HTML. State the benefits and drawback of ASP.
advantage
Disadvantage
Required to write a lot of code for just creating a simple webpage.
Security features are not good at HTML
It cannot produce dynamic output alone, since it’s a static language.
Making the structure of HTML documents becomes tough to understand.
Errors can be costly.
It is the time consuming as the time it consume to maintain on the colour
scheme of a page and to make lists, tables and forms.
It can create only static and plain pages so if we’d like dynamic pages then
HTML isn’t useful.
advantage
Disadvantage
ASP.NET core not good enoug
Making changes in the app
Porting ASP application from one server to another is expensive
Documentation is not exactly up to the mark
The most important attribute of the <a> element is the href attribute, which
indicates the link's destination.
The <body> tag defines the document's body.The <body> element contains all
the contents of an HTML document, such as headings, paragraphs, images,
hyperlinks, tables, lists, etc.
Images are not technically inserted into a web page; images are linked to web
pages. The <img> tag creates a holding space for the referenced image.
The <p> tag defines a paragraph.Browsers automatically add a single blank line
before and after each <p> element.
Goals of XML
XML shall be straightforwardly usable over the Internet.
XML shall support a wide variety of applications.
XML shall be compatible with SGML. ...
It shall be easy to write programs that process XML documents. ...
The number of optional features in XML is to be kept to the absolute minimum, ideally
zero.
The design goals of XML focus on simplicity, generality, and usability across the
Internet.
The purpose of an XML Schema is to define the legal building blocks of an XML
document:
These are the two main types of XML Parsers:EU Cracks Down on US Tech Giants
1. DOM
2. SAX
A DOM document is an object which contains all the information of an XML document. It
is composed like a tree structure. The DOM Parser implements a DOM API. This API is
very simple to use.
A SAX Parser implements SAX API. This API is an event based API and less intuitive.
It uses the same operator for various While it uses different operators
4. operations. for various operations.
JavaScript file has the file extension VBScript file has the file
6. “.js”. extensions “.vbs” or “.vba”.
Window is the object of browser, it is not the object of javascript. The javascript
objects are string, array, date etc.
confirm() displays the confirm dialog box containing message with ok and cancel button.
setTimeout() performs action after specified time like calling function, evaluating expressions etc.
If you want to access any element in an HTML page, you always start with
accessing the document object.
Below are some examples of how you can use the document object to access
and manipulate HTML.
Method Description
In an ASP NET application, state management in ASP NET is an object and preserves
type state control. This is because ASP NET applications are basically stateless. In ASP
NET, the information of users is stored and maintained till the user session ends. Each
time the page is posted on the server, a new instance of the Web page class is created.
Whenever the user enters information, this information might get lost in the round trip
from the browser (MSDN), if they enter into the web application.
It does not provide security for data. It provides more security for data.
HTML, CSS, and javascript are used. PHP, Python, Java, Ruby are used
What is HTTP?
HTTP, the Hypertext Transfer Protocol, is the application-level protocol that is used to
transfer data on the Web. HTTP comprises the rules by which Web browsers and servers
exchange information. Although most people think of HTTP only in the context of the
World-Wide Web, it can be, and is, used for other purposes, such as distributed object
management systems.
While Loops
The While...End While construction runs a set of statements as long as the condition
specified in the While statement is True. For more information, see While...End While
Statement.
Do Loops
The Do...Loop construction allows you to test a condition at either the beginning or the
end of a loop structure. You can also specify whether to repeat the loop while the
condition remains True or until it becomes True. For more information, see Do...Loop
Statement.
For Loops
The For...Next construction performs the loop a set number of times. It uses a loop
control variable, also called a counter, to keep track of the repetitions. You specify the
starting and ending values for this counter, and you can optionally specify the amount
by which it increases from one repetition to the next. For more information,
see For...Next Statement.
The For Each...Next construction runs a set of statements once for each element in a
collection. You specify the loop control variable, but you do not have to determine
starting or ending values for it. For more information, see For Each...Next Statemen
the control statements are the statements that controls the execution of the program
on the basis of the specified condition. It is useful for determining whether a condition is
true or not. If the condition is true, a single or block of statement is executed. In the
control statement, we will use if- Then, if Then Else, if Then ElseIf and the Select
case statement.
We can define more than one condition to be evaluated by the program with
statements. If the defined condition is true, the statement or block executes according
to the condition, and if the condition is false, another statement is executed.
o If-Then Statement
o If-Then Else Statement
o If-Then ElseIf Statement
o Select Case Statement
o Nested Select Case Statements
Web server architecture consists of parameters including, but not limited to:
This simple model implies three important facts you need to be aware of:
HTTP is a stateless protocol. This means that the server doesn’t
keep any information about the client after it sends its response, and
therefore it can’t recognize that multiple requests from the same client
may be related.
Web applications can’t easily provide the kind of immediate
feedback typically found in standalone GUI applications such as word
processors or traditional client/server applications. Every interaction
between the client and the server requires a request/response
exchange. Performing a request/response exchange when a user
selects an item in a list box or fills out a form element is usually too
taxing on the bandwidth available to most Internet users.
Q.25 Write a code to create basic calculator in HTML (Use
VB script).
Here a Calculator is going to be formed with HTML code.
Calculator Title: This is the title at the top of our application, “GeeksforGeeks Calculator”.
Output Screen: This will be our output screen, where all text will be shown. Like the input that
the user will type and the answer calculated from the user input. So, we can again break down
this into two smaller pieces as shown below:
Question Output: This will be the input given by the user.
Answer Output: This will be the result calculated from user input.