Thursday 15 October 2020

Web and Internet Technologies 2 Marks questions and answers

 1. What are the different types of lists in HTML?

Ans. unordered list <ul>

        ordered list <ol>

        Nested list - combination of unordered list and ordered list.

        description list - <dl>

2. What is the purpose of meta tags in HTML?

Ans. The <meta> tag defines metadata about an HTML document.

<meta> tags always go inside the <head> element, and are typically used to specify character set, page description, keywords, author of the document, and viewport settings.

3. What are the different types of  Cascading Style Sheets?

Ans. There are three ways of inserting a style sheet are

                    1. Inline CSS

                    2. Internal / embedded CSS

                    3. External CSS

4. What are HTML5 added several new input types?

Ans.

    1. color                   <input type="color">
    2. date                    <input type="date">
    3. datetime-local    <input type="datetime-local">
    4. email                 <input type="email">
    5. month
    6. number
    7. range
    8. search
    9. tel
    10. time
    11. url
    12. week
5. What is DTD and types of DTD's?
Ans. A Document Type Definition defines the structure and the legal elements and attributes of an XML document. Two types of DTD's are 

                                    1. Internal DTD

                                    2. External DTD

6. What are PHP super global variables?

Ans.  The PHP superglobal variables are:

                                    $GLOBALS

                                    $_SERVER

                                    $_REQUEST

                                    $_POST

                                    $_GET

                                    $_FILES

                                    $_ENV

                                    $_COOKIE

                                    $_SESSION

7. What is AJAX?

Ajax stands for Asynchronous JavaScript And XML.

AJAX is not a programming language.

It is a technique for creating better, faster and more interactive web applications with the help of XML, DOM,HTML , CSS and JavaScript.

Unlike classic web pages , which must load in their entirety if content changes.

AJAX allows web pages to be updated asynchronously by fetching data from the server behind the scenes.

AJAX cannot work independently.

AJAX uses a combination of:

        1. HTML and CSS for presentation.

        2. DOM for dynamic display of and interaction with data.

        3. JSON (JavaScript Object Notation)or XML for the interchange of data, and XSLT for its                        manipulation.

        4. XMLHttpRequest object (to exchange data asynchronously with a server)

        5. JavaScript.

8. What is Asynchronous in AJAX?

 Ans. Asynchronous means that we are exchanging data to/from the server in the background without having to refresh the page.

9. What about the response in AJAX Application?

Responses from the server in AJAX are handled in the form of callbacks.

A callback is a special function which is used in AJAX so that server can respond to the client when it is ready to send data to the client.

10. What are Advantages of AJAX?

AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Bandwidth Usage- Ajax based application use less server bandwidth, because no need to reload complete page.

Asynchronous calls- AJAX make asynchronous calls to a web server. This means client browsers are avoid waiting for all data arrive before start the rendering.

XMLHttpRequest - XMLHttpRequest has an important role in the Ajax web development technique. XMLHttpRequest is special JavaScript object that was designed by Microsoft. XMLHttpRequest object call as a asynchronous HTTP request to the Server for transferring data both side.

11. What are Disadvantages of AJAX?

View source is allowed and anyone can view the code source written for AJAX.

       It can increase design and development time.

       More complex than building classic web application.

       Search Engine like Google cannot index AJAX pages.

       JavaScript disabled browsers cannot use the application.

       Security is less in AJAX application. Anyone can view the source code written for Ajax.

       The back button problem. People think that when they press back button, they will return to the last change they made, but in AJAX this doesn't hold.

12. What is XMLHttpRequest object ?

The XMLHttpRequest object can be used to exchange data with a server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

13. What are XML Schema built-in data types?


Primitive data types:

String, boolean, decimal, float, double, duration,dateTime, time, date, gYearMonth, gYear, gDay,

gMonthDay, gMonth, hexbinary, base64binary, anyURL, QName, NOTATION.

Derived  data types:

normalizedString, token,language,NMTOKEN,NMTOKENS,Name, NCName, ID, IDREF, IDREFS, ENTITY,ENTITIES,integer, nonPostiveInteger, PostiveInteger,NegativeInteger, nonNegativeInteger, unsignedLong,unsignedInt, unsignedShort, unsignedByte,long, int, short, byte.

14. Types of XSD Elements?

Simple Elements

Complex Elements

15. What are Building Blocks of XML Documents?

Seen from a DTD point of view, all XML documents are made up by the following building blocks:

                    1. Elements

                    2. Attributes

                    3. Entities

                    4. PCDATA

                      5. CDATA

16. What are XML Schema (XSD) Indicators?

We can control HOW elements are to be used in documents with indicators.

                        1. <all>

                        2. <choice>

                        3. <sequence>

17. Difference between Document Type Definition(DTD) and XML Schema Definition(XSD)?


18. What is XML Schema?

An XML Schema describes the structure of an XML document.

The XML Schema language is also referred to as XML Schema Definition (XSD).

The purpose of an XML Schema is to define the legal building blocks of an XML document:

XML Schema is an XML-based alternative to DTD.

19. What is PCDATA and CDATA?

PCDATA

PCDATA means parsed character data.

Text found between the start tag and the end tag of an XML element.

PCDATA is text that WILL be parsed by a parser. The text will be examined by the parser for entities and markup.

Example

employee.dtd

<!ELEMENT employee (firstname,lastname)>  

<!ELEMENT firstname (#PCDATA)>  

<!ELEMENT lastname (#PCDATA)>  

employee.xml

<?xml version="1.0"?> 

<!DOCTYPE employee SYSTEM "employee.dtd"> 

<employee> 

  <firstname>virat </firstname> 

  <lastname>kohli</lastname> 

</employee>

Output:  virat     kohli

CDATA

CDATA means character data or unparsed character data.

CDATA is text that will NOT be parsed by a parser. Tags inside the text will NOT be treated as markup and entities will not be expanded.

Example

employee.dtd

<!ELEMENT employee (firstname,lastname)>  

<!ELEMENT firstname (#CDATA)>  

<!ELEMENT lastname (#CDATA)>  

employee.xml

<?xml version="1.0"?> 

<!DOCTYPE employee SYSTEM "employee.dtd"> 

<employee> 

  <firstname>virat </firstname> 

  <lastname>kohli</lastname> 

</employee>

Output: <firstname>virat </firstname>  <lastname>kohli</lastname> 

20. What is script manager in AJAX?

The key control in every ASP.NET Ajax-enabled application is the ScriptManager (in the Toolbox’s AJAX Extensions tab), which manages the JavaScript client-side code (called scripts) that enable asynchronous Ajax functionality. A benefit of using ASP.NET Ajax is that you do not need to know JavaScript to be able to use these scripts. The ScriptManager is meant for use with the controls in the Toolbox’s AJAX Extensions tab. There can be only one ScriptManager per page.

21. State the use of WSDL?

WSDL stands for Web Services Description Language

WSDL is used to describe web services

WSDL is written in XML

WSDL is often used in combination with SOAP(Simple Object Access Protocol) and an XML Schema to provide Web services over the Internet. A client program connecting to a Web service can read the WSDL file to determine what operations are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema.



No comments:

Post a Comment