KEMBAR78
Index | PDF | Ajax (Programming) | Angular Js
0% found this document useful (0 votes)
16 views25 pages

Index

The document provides a comprehensive overview of web technologies, covering HTML, XML, CSS, JSON, JavaScript, jQuery, and server-side technologies. It includes unit-wise oral questions and answers related to each topic, detailing definitions, functionalities, and differences between various elements and technologies. The content serves as a study guide for understanding key concepts and practices in web development.

Uploaded by

cyachrcgk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views25 pages

Index

The document provides a comprehensive overview of web technologies, covering HTML, XML, CSS, JSON, JavaScript, jQuery, and server-side technologies. It includes unit-wise oral questions and answers related to each topic, detailing definitions, functionalities, and differences between various elements and technologies. The content serves as a study guide for understanding key concepts and practices in web development.

Uploaded by

cyachrcgk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Web Technology

Unit wise/ Oral Questions


Unit I Web Development Process, Front End Tools
https://www.javatpoint.com/html-interview-questions
1. What is HTML?

HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard
text formatting language which is used to create and display pages on the Web. More details...

2. What are Tags?

HTML tags are composed of three things: opening tag, content and ending tag. Some tags are
unclosed tags.

HTML documents are made of two things:

content, and

tags

Content is placed between tags to display data on the web page. More details... 3. Do all

HTML tags have end tag?

No. There are some HTML tags that don't need a closing tag. For example: <image> tag, <br> tag.

4. What is the difference between HTML elements and tags?

HTML elements communicate to the browser to render text. When the elements are surrounded
by brackets <>, they form HTML tags. Most of the time, tags come in pair and surround content.

5. How to insert a copyright symbol on a browser page?

can insert a copyright symbol by using &copy; or &#169; in an HTML file. 6. How

do you keep list elements straight in an HTML file?

You can keep the list elements straight by using indents.

7. Does a hyperlink only apply to text?

No, you can use hyperlinks on text and images both. More details...

8. What is a style sheet?

A style sheet is used to build a consistent, transportable, and well designed style template.
You can add these templates on several different web pages.

9. Can you create a multi colored text on a web page?

Yes. To create a multicolor text on a web page you can use <font color ="color"> </font> for the
specific texts you want to color.

10. Is it possible to change the color of the bullet?


Web Technology
Unit wise/ Oral Questions

The color of the bullet is always the color of the first text of the list. So, if you want to change the
color of the bullet, you must change the color of the text.

11. What is a marquee?

Marquee is used to put the scrolling text on a web page. You should put the text which you want to
scroll within the <marquee>......</marquee> tag. More details...

12. How many tags can be used to separate section of texts?

There are three tags used to separate the texts. i.e. usually <br> tag is used to separate line of texts.
Other tags are<p> tag and <blockquote> tag.

13. How to make a picture a background image of a web page?

To make a picture a background image on a web page, you should put the following tag code after
the </head> tag.

1. <bodybackground="image.gif">

Here, replace the "image.gif" with the name of your image file which you want to display on your web
page.

14. What is the use of iframe tag?

An iframe is used to display a web page within a web page.

Syntax: <iframesrc="URL"></iframe>

Example: <iframesrc="demo_iframe.html"width="200px"height="200px"></iframe> Target to a link:

<iframesrc="http://www.javatpoint.com"name="iframe_a"></iframe>

15. What are the different new form element types in HTML 5? Color
Date
Datetime-local
Email
Time
Url
Range
Telephone
Number
Search

16. Is there any need to change the web browsers to support HTML5?

No. Almost all browsers (updated versions) support HTML 5. For example: Chrome, Firefox,
Opera, Safari, IE

https://career.guru99.com/xml-interview-questions/

17. What is XML?


Web Technology
Unit wise/ Oral Questions

XML is called Extensible Markup Language which is designed to carry or transport and store data.
XML tags are not as predefined as HTML, but we can define our own user tags for simplicity. It
mainly concentrates on storing of data, not on displaying of data.

18. What are the features of XML?

• Very easy to learn and implement


• XML files are text files, and no editor is required
• Minimal and a limited number of syntax rules in XML
• It is extensible, and it specifies that structural rules of tags

19. What are the differences between HTML and XML?

HTML XML

Markup language used to display data Markup language used to store data Case
Insensitive Case sensitive
Designing web pages Used to transport and store data Predefined Tags Custom
Tags
Does not Preserve white spaces Preserve white spaces Static Dynamic

20. What is XML DOM Document?

XML Document object represents the whole XML document, and it is the root of a document
tree. It gives access to entire XML document – Nodes and Elements, and it has its
own properties.

21. What is an attribute?

An attribute provides more or additional information about an element than otherwise. 22. What are

the advantages of XML DOM Document?

• XML structure is traversable, and it can be randomly accessed by traversing the tree. • XML
structure is modifiable, and values can be added, changed and removed

23. What are the basic rules while writing XML?

• All XML should have a root element


• All tags should be closed
• XML tags are case sensitive
• All tags should be nested properly
• Tag names cannot contain spaces
• Attribute value should appear within quotes
• White space is preserved

24. What is XML Element?

An XML document contains XML Elements, and it starts from an element’s start tag to end tag. It
can contain:

• Other elements within main element


Web Technology
Unit wise/ Oral Questions
• An Attribute
• text

25. What is CDATA?


CDATA is unparsed character data that cannot be parsed by the XML parser. Character < and > are
illegal in XML elements. CDATA section starts with <![CDATA[“ and end with “]]>”.

26. How comment can be represented in XML?


Comment can be represented as <!- – comments – -> as like HTML. This comment symbol is
applicable for single or multiple lines.

27. What are XML Namespaces?


XML namespaces are used to avoid element name conflicts, and it can be avoided by using
prefix before the name.

28. What is XSL?


XSL is a language used with XML for expressing style sheets as like CSS. It describes how to
display an XML document for a given type.

https://www.tutorialspoint.com/css/css_interview_questions.htm

29. What is CSS?


30. What are advantages of using CSS?
31. What are the components of a CSS Style?
32. What is type selector?
33. What is universal selector?
34. What is Descendant Selector?
35. What is class selector?
36. Can you make a class selector particular to an element type? 37. What is id
selector?
38. Can you make a id selector particular to an element type? 39. What is a
child selector?
40. What is an attribute selector?
41. How to select all paragraph elements with a lang attribute

https://career.guru99.com/top-19-json-interview-questions/ 42. Mention what

is JSON?

JSON is a simple data exchange format. JSON means JavaScript Object Notation; it is language
and platform independent.

43. Explain what is JSON objects?

An object can be defined as an unordered set of name/value pairs. An object in JSON starts with
{left brace} and finish or ends with {right brace}. Every name is followed by: (colon) and the
name/value pairs are parted by, (comma).

44. Explain how to transform JSON text to a JavaScript object?

One of the common use of JSON is to collect JSON data from a web server as a file or HTTP
request, and convert the JSON data to a JavaScript, ant then it avails the data in a web page.
Web Technology
Unit wise/ Oral Questions
45. Why must one use JSON over XML?
It is faster and lighter than XML as on the wire data format
XML data is typeless while JSON objects are typed
JSON types: Number, Array, Boolean, String
XML data are all string
Data is readily available as JSON object is in your JavaScript

46. Mention what is the file extension of JSON?

File extension of JSON is .json

47. Mention which function is used to convert a JSON text into an object? To convert

JSON text into an object “eval” function is used.

48. Mention what are the data types supported by JSON?

Number, String, Boolean, Array, Object, Null

49. Mention what is the role of JSON.stringify?

JSON.stringify() converts an object into a JSON text and saves that JSON text in a string.

50. Show how to parse JSON in JQuery?

var json = ‘{“name”: “Guru 99”, “Description “: “Learn PHP Interactively with PHP Beginner
Tutorials}
obj = $.parseJSON(json);

Unit II Client Side Technologies


https://www.javatpoint.com/javascript-interview-questions
1. What is JavaScript?

JavaScript is a scripting language. It is different from Java language. It is object-based, lightweight


and cross platform. It is widely used for client side validation.

2. What is the difference between JavaScript and jscript?

Netscape provided the JavaScript language. Microsoft changed the name and called it JScript to
avoid the trademark issue.In other words, you can say JScript is same as JavaScript, but it is
provided by Microsoft.

3. How to write a hello world example of JavaScript?

A simple example of JavaScript hello world is given below. You need to place it inside the body tag
of html.

<scripttype="text/javascript">
document.write("JavaScriptHelloWorld!");

Web Technology
Unit wise/ Oral Questions

</script>
4. How to use external JavaScript file?

I am assuming that js file name is message.js, place the following script tag inside the head tag.

<scripttype="text/javascript"src="message.js"></script>

Is JavaScript case sensitive language?- Yes.

6. What is DOM? What is the use of document object?

DOM stands for Document Object Model. A document object represent the html document.
It can be used to access and change the content of html.

7. What is the use of window object?

The window object is automatically created by the browser that represents a window of a browser.

It is used to display the popup dialog box such as alert dialog box, confirm dialog box, input dialog
box etc.

8. What is the use of history object?

The history object of browser can be used to switch to history pages such as back and forward
from current page or another page. There are three methods of history object.

1. history.back()
2. history.forward()
3. history.go(number): number may be positive for forward, negative for backward. 9. How to
write comment in JavaScript?

There are two types of comments in JavaScript.

1. Single Line Comment: It is represented by // (double forward slash)

2. Multi Line Comment: It is represented by slash with asterisk symbol as /* write comment
here */

10. How to create function in JavaScript?

To create function in JavaScript, follow the following syntax.

functionfunction_name(){
//functionbody

11. What are the JavaScript data types?

There are two types of data types in JavaScript:

1. Primitive Data Types


2. Non-primitive Data Types
Web Technology
Unit wise/ Oral Questions

12. How to create objects in JavaScript?

There are 3 ways to create object in JavaScript.

1. By object literal
2. By creating instance of Object
3. By Object Constructor
Let's see a simple code to create object using object literal.

emp={id:102,name:"RahulKumar",salary:50000}

13. How to create array in JavaScript?

There are 3 ways to create array in JavaScript.

1. By array literal
2. By creating instance of Array
3. By using an Array constructor
14. Difference between Client side JavaScript and Server side JavaScript?

Client side JavaScript comprises the basic language and predefined objects which are relevant to
running java script in a browser. The client side JavaScript is embedded directly by in the HTML
pages. This script is interpreted by the browser at run time.

Server side JavaScript also resembles like client side java script. It has relevant java script which
is to run in a server. The server side JavaScript are deployed only after compilation.

15. In which location cookies are stored on the hard disk? The storage of
cookies on the hard disk depends on OS and the browser.

The Netscape navigator on Windows uses cookies.txt file that contains all the cookies. The path is :
c:\Program Files\Netscape\Users\username\cookies.txt

The Internet Explorer stores the cookies on a file username@website.txt. The path is: c:\
Windows\Cookies\username@Website.txt.

https://www.codeproject.com/Articles/618484/Latest-jQuery-interview-questions and-answers

16. What is jQuery?


Ans: jQuery is fast, lightweight and feature-rich client side JavaScript Library/Framework which
helps in to traverse HTML DOM, make animations, add Ajax interaction, manipulate the page content,
change the style and provide cool UI effect. It is one of the most popular client side library and as per a
survey it runs on every second website.

17. Why do we use jQuery?


Ans: Due to following advantages.

Easy to use and learn.


Easily expandable.
Web Technology
Unit wise/ Oral Questions
Cross-browser support (IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+) Easy
to use for DOM manipulation and traversal.
Large pool of built in methods.
AJAX Capabilities.
Methods for changing or applying CSS, creating animations.
Event detection and handling.
Tons of plug-ins for all kind of needs.

18. How JavaScript and jQuery are different?


Ans: JavaScript is a language While jQuery is a library built in the JavaScript language that helps
to use the JavaScript language.
19. Is jQuery replacement of Java Script?
Ans: No. jQuery is not a replacement of JavaScript. jQuery is a different library which is written on
top of JavaScript. jQuery is a lightweight JavaScript library that emphasizes interaction between
JavaScript and HTML.

20. Is jQuery a W3C standard?


Ans: No. jQuery is not a W3C standard.

21. What is the basic need to start with jQuery?


Ans: To start with jQuery, one need to make reference of it's library. The latest version of jQuery can
be downloaded from jQuery.com

22. Which is the starting point of code execution in jQuery?


Ans: The starting point of jQuery code execution is $(document).ready() function which is
executed when DOM is loaded.

Unit III Server Side Technologies

https://www.javatpoint.com/servletinterview
1. How many objects of a servlet is created?

Only one object at the time of first request by servlet or web container. 2. What is

the life-cycle of a servlet?

1. Servlet is loaded
2. servlet is instantiated
3. servlet is initialized
4. service the request
5. servlet is destroyed
3. What are the life-cycle methods for a servlet?
Method Description

public void init(ServletConfig config) It is invoked only once when first request
comes for the servlet. It is used to

Web Technology
Unit wise/ Oral Questions
initialize the servlet.

public void service(ServletRequest It is invoked at each request.The service()


request,ServletResponse)throws method is used to service the request.
ServletException,IOException

public void destroy() It is invoked only once when servlet is


unloaded.
4. Who is responsible to create the object of servlet?

The web container or servlet container.

5. When servlet object is created?

At the time of first request.

6. What is difference between Get and Post method?


Get Post

1) Limited amount of data can be sent Large amount of data can be sent
because data is sent in header. because data is sent in body.

2) Not Secured because data is exposed in Secured because data is not exposed in
URL bar. URL bar.

3) Can be bookmarked Cannot be bookmarked

4) Idempotent Non-Idempotent

5) It is more efficient and used than Post It is less efficient and used

7. What is difference between PrintWriter and ServletOutputStream? PrintWriter is a


character-stream class where as ServletOutputStream is a byte-stream class. The PrintWriter class
can be used to write only character-based information whereas ServletOutputStream class can be
used to write primitive values as well as character-based information.

8. What is difference between GenericServlet and HttpServlet?

The GenericServlet is protocol independent whereas HttpServlet is HTTP protocol specific.


HttpServlet provides additional functionalities such as state management etc.

9. What is Session Tracking?

Session simply means a particular interval of time.

Session Tracking is a way to maintain state of an user.Http protocol is a stateless protocol.Each


time user requests to the server, server treats the request as the new request.So we need to
maintain the state of an user to recognize to particular user.

10. What are Cookies?

A cookie is a small piece of information that is persisted between the multiple client requests. A cookie
has a name, a single value, and optional attributes such as a comment, path and domain qualifiers, a
maximum age, and a version number.

11. What is difference between Cookies and HttpSession? Cookie works


at client side whereas HttpSession works at server side.

Web Technology
Unit wise/ Oral Questions

https://www.javatpoint.com/jspinterview

12. What is JSP?

Java Server Pages technology (JSP) is used to create dynamic web page. It is an extension to the
servlet technology. A JSP page is internally converted into servlet.
13. What are the life-cycle methods for a jsp?
Method Description

public void jspInit() It is invoked only once, same as init method of


servlet.

public void It is invoked at each request, same as


_jspService(ServletRequest service() method of servlet.
request,ServletResponse)throws
ServletException,IOException

public void jspDestroy() It is invoked only once, same as destroy()


method of servlet.

14. What is difference between hide comment and output comment?

The jsp comment is called hide comment whereas html comment is called output comment. If
user views the source of the page, the jsp comment will not be shown whereas html comment
will be shown.

15.What are the JSP implicit objects ?


Object Type

1) out JspWriter

2) request HttpServletRequest

3) response HttpServletResponse

4) config ServletConfig

5) session HttpSession

6) application ServletContext

7) pageContext PageContext

8) page Object

9) exception Throwable

16.What is difference between include directive and include action?


include directive include action

1) The include directive includes the 1) The include action includes the content at
content at page translation time. request time.

2) The include directive includes the 2) The include action doesn't include the
original content of the page so page original content rather invokes the include()
size increases at runtime. method of Vendor provided class.

3) It's better for static pages. 3) It's better for dynamic pages.

17. Is JSP technology extensible?


Yes. JSP technology is extensible through the development of custom actions, or tags,
Web Technology
Unit wise/ Oral Questions
which are encapsulated in tag libraries.

18. How can I implement a thread-safe JSP page? What are the advantages
and Disadvantages of using it?

You can make your JSPs thread-safe by having them implement the SingleThreadModel interface.
This is done by adding the directive <%@ page isThreadSafe="false" %> within your JSP page.

19. How can I prevent the output of my JSP or Servlet pages from being cached by the
browser?

<
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","0");//preventscachingattheproxyserver %>

Unit IV Server Side Technologies


https://phpinterviewquestions.co.in/
http://placement.freshersworld.com/php-interview-questions/33121834

What is PHP?

PHP is a web language based on scripts that allows developers to dynamically create
generated web pages.

What does the initials of PHP stand for?

PHP means PHP: Hypertext Preprocessor.

Which programming language does PHP resemble to?

PHP syntax resembles Perl and C


Differences between GET and POST methods ?
We can send 1024 bytes using GET method but POST method can transfer large amount of data
and POST is the secure method than GET method .
How to declare an array in php?
Eg : var $arr = array('apple', 'grape', 'lemon');
What is use of in_array() function in php ?
in_array used to checks if a value exists in an array
What is use of count() function in php ?
count() is used to count all elements in an array, or something in an object
what's the difference between include and require?
It's how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the
execution of the script. If the file is not found by include(), a warning will be issued, but execution will
continue.
What is the difference between Session and Cookie?
Web Technology
Unit wise/ Oral Questions

The main difference between sessions and cookies is that sessions are stored on the server, and
cookies are stored on the user's computers in the text file format. Cookies can't hold multiple variable
while session can hold multiple variables..We can set expiry for a cookie,The session only remains
active as long as the browser is open.Users do not have access to the data you stored in
Session,Since it is stored in the server.Session is mainly used for login/logout purpose while cookies
using for user activity tracking
How to set cookies in PHP?
Setcookie("sample", "ram", time()+3600);
How to Retrieve a Cookie Value?
eg : echo $_COOKIE["user"];
How to create a session? How to set a value in session ? How to Remove data from a
session?
Create session : session_start();
Set value into session : $_SESSION['USER_ID']=1;
Remove data from a session : unset($_SESSION['USER_ID'];

what types of loops exist in php?

for,while,do while and foreach

What is the difference between PHP and JavaScript?

javascript is a client side scripting language, so javascript can make popups and other things
happens on someone’s PC. While PHP is server side scripting language so it does every stuff with
the server.
https://www.javatpoint.com/ajax-interview-questions
1) What is AJAX?

AJAX stands for Asynchronous JavaScript and XML. It is a group of related technologies to display data
asynchronously. More details...

2) What are the advantages of AJAX?


Quick Response
Bandwidth utilization
User is not blocked until data is retrieved from the server.

3) What are the disadvantages of AJAX?


Dependent on JavaScript
Security issues
Debugging is difficult

4) What are the real web applications of AJAX currently running in the market? Twitter
Facebook
Gmail
Javatpoint
Youtube etc.
Web Technology
Unit wise/ Oral Questions

5) What are the security issues with AJAX?


AJAX source code is readable
Attackers can insert script into the system

6) What is the difference between synchronous and asynchronous requests?

Synchronous request blocks the user until response is retrieved whereas asynchronous doesn't
block the user.

7) What are the technologies used by AJAX?


HTML/XHTML and CSS
DOM
XML
XMLHttpRequest
JavaScript

8) What does XMLHttpRequest?


sends data in the background
receives data
updates data without reloading the page

9) What are the properties of XMLHttpRequest?

The important properties of XMLHttpRequest object are given below.


onReadyStateChange
readyState
responseText
responseXML

10) What are the important methods of XMLHttpRequest?


open()
send()
setRequestHeader()

11) What is JSON in AJAX?

JSON stands for JavaScript Object Notation. It is easy to understand and data exchange is fast than
XML. It supports array.

12) What are the tools for debugging AJAX applications?

There are two most widely used tools for debugging AJAX applications.
Firebug for Mozilla Firefox
Fiddler for IE (Internet Explorer)

13) What are the types of post back in AJAX?

There are two types of post back in AJAX.


Web Technology
Unit wise/ Oral Questions
Synchronous Postback
Asynchronous Postback

14) What are the different ready states of a request in AJAX?

There are 5 ready states of a request in AJAX.


0 means UNOPENED
1 means OPENED
2 means HEADERS_RECEIVED
3 means LOADING
4 means DONE

15) What are the common AJAX frameworks?


Dojo Toolkit
YUI
Google Web Toolkit (GWT)
Spry
MooTools
Prototype

16) What is the difference between JavaScript and AJAX?

JavaScript makes a request to the server and waits for the response. It consumes more
bandwidth as it reloads the page.

AJAX sends a request to the server and doesn't wait for the response. It doesn't reload the page so
consumes less bandwidth.

Unit V Client and Server Side Frameworks


https://www.javatpoint.com/angularjs-interview-questions

1) What is AngularJS?

AngularJS is a JavaScript framework i.e. used to create single web page application. It follows MVC
(Model View Controller) pattern. It is open source, cross browser compliant and easy to maintain.

2) What are the advantages of AngularJS?

allows us to create single page application

follows MVC pattern

predefined form validations

supports animation

open source

cross browser compliant


Web Technology
Unit wise/ Oral Questions

supports two way data binding

its code are unit testable

3) What are the disadvantages of AngularJS?

JavaScript Dependent: If end user disables JavaScript, AngularJS will not work.

Not Secured: It is JavaScript based framework so it is not safe to authenticate user through
AngularJS only.

4) Is AngularJS dependent on JQuery?- No.

5) What IDE's are currently used for the development of AngularJS?

Eclipse
Visual Studio
WebStorm
TextMate etc.
6) What are the features of AngularJS?

1. MVC
2. Validations
3. Modules
4. Directives
5. Templates
6. Scope
7. Expressions
8. Data Binding
9. Filters
10.Services
11.Routing
12.Dependency Injection
13.Testing
7) What are directives in AngularJS?

Directives are the markers on DOM element that is used to specify behavior on that DOM element. All
AngularJS directives start with the word "ng". There are many in-built directives in AngularJS such as
"ng-app", "ng-model", "ng-controller", "ng-repeat" etc.

Let's see a simple example of AngularJS directive.

1. <inputtype="text"id="empName"ng-model="EmpName"/>

8) What are controllers in AngularJS?

Controllers are JavaScript functions that are used to provide data and logic to HTML UI. It acts as an
interface between Server and HTML UI.

9) What are the usage of controllers in AngularJS?


Web Technology
Unit wise/ Oral Questions

AngularJS Controllers are used to:

Set up initial state of the $scope object, and

Add behavior to the $scope object.

10) What is data binding in AngularJS?

Data Binding is the automatic synchronization of data between model and view. There are two ways of
data binding:
One way data binding (used in classical template)
Two way data binding (used in AngularJS template)

11) What are services in AngularJS?

Services are objects that can be used to store and share data across the application. AngularJS
offers many built-in services such as $http i.e. used to make XMLHttpRequest.

12) What is scope in AngularJS?

Scope is an object that represents application model.

Each AngularJS application can have only one root scope but can have multiple child scopes.

13) What is template in AngularJS?

A template consists of HTML, CSS and AngularJS directives that are used to render dynamic
view.

14) What are expressions in AngularJS?

Expressions are the code snippets that resolves to a value. AngularJS expressions are placed
inside {{expression}}. For example:

AngularJS supports one-time binding expressions.

15) What is the use of filter in AngularJS?

A filter is used to format the value of expression to display the formatted output. AngularJS
enables us to write our own filter.

https://career.guru99.com/top-25-interview-questions-on-node-js/ 1) What is
node.js?

Node.js is a Server side scripting which is used to build scalable programs. Its multiple advantages
over other server side languages, the prominent being non-blocking I/O.

2) How node.js works?

Node.js works on a v8 environment, it is a virtual machine that utilizes JavaScript as its scripting
language and achieves high output via non-blocking I/O and single threaded event loop.
Web Technology
Unit wise/ Oral Questions
3) What do you mean by the term I/O ?

I/O is the shorthand for input and output, and it will access anything outside of your application. It
will be loaded into the machine memory to run the program, once the application is started.

4) What does event-driven programming mean?

In computer programming, event driven programming is a programming paradigm in which the flow of
the program is determined by events like messages from other programs or threads. It is an
application architecture technique divided into two sections 1) Event Selection 2) Event Handling

5) Where can we use node.js?


a) Web applications ( especially real-time web apps )
b) Network applications
c) Distributed systems
d) General purpose applications

6) What is the advantage of using node.js?


a) It provides an easy way to build scalable network programs
b) Generally fast
c) Great concurrency
d) Asynchronous everything
e) Almost never blocks
7) What are the two types of API functions in Node.js ?

The two types of API functions in Node.js are


a) Asynchronous, non-blocking functions
b) Synchronous, blocking functions
8) What is control flow function?

A generic piece of code which runs in between several asynchronous function calls is known as
control flow function.

9) Explain the steps how “Control Flow” controls the functions calls?
a) Control the order of execution
b) Collect data
c) Limit concurrency
d) Call the next step in program
10) Why Node.js is single threaded

For async processing, Node.js was created explicitly as an experiment. It is believed that more
performance and scalability can be achieved by doing async processing on a single thread under
typical web loads than the typical thread based implementation.

11) Does node run on windows?

Yes – it does. Download the MSI installer fromhttp://nodejs.org/download/ 12) Can


you access DOM in node?

No, you cannot access DOM in node.

Web Technology
Unit wise/ Oral Questions

13) Using the event loop what are the tasks that should be done asynchronously? a) I/O
operations
b) Heavy computation
c) Anything requiring blocking

14) Why node.js is quickly gaining attention from JAVA programmers?

Node.js is quickly gaining attention as it is a loop based server for JavaScript. Node.js gives user the
ability to write the JavaScript on the server, which has access to things like HTTP stack, file I/O, TCP
and databases.

15) What are the two arguments that async.queue takes?

The two arguments that async.queue takes


a) Task function
b) Concurrency value

16) What is an event loop in Node.js ?

To process and handle external events and to convert them into callback invocations an event loop
is used. So, at I/O calls, node.js can switch from one request to another .

17) Mention the steps by which you can async in Node.js?


By following steps you can async Node.js
a) First class functions
b) Function composition
c) Callback Counters
d) Event loops

18) What are the pros and cons of Node.js?

Pros: a) If your application does not have any CPU intensive computation, you can build it in Javascript
top to bottom, even down to the database level if you use JSON storage object DB like MongoDB.

b) Crawlers receive a full-rendered HTML response, which is far more SEO friendly rather than a single
page application or a websockets app run on top of Node.js.

Cons: a) Any intensive CPU computation will block node.js responsiveness, so a threaded platform is
a better approach.
b) Using relational database with Node.js is considered less favourable 19) How Node.js

overcomes the problem of blocking of I/O operations?

Node.js solves this problem by putting the event based model at its core, using an event loop instead
of threads.

20) What is the difference between Node.js vs Ajax?

The difference between Node.js and Ajax is that, Ajax (short for Asynchronous Javascript and XML) is
a client side technology, often used for updating the contents of the page without refreshing it.
While,Node.js is Server Side Javascript, used for developing server
Web Technology
Unit wise/ Oral Questions
software. Node.js does not execute in the browser but by the server.

21) What are the Challenges with Node.js ?

Emphasizing on the technical side, it’s a bit of challenge in Node.js to have one process with one
thread to scale up on multi core server.
22) What does it mean “non-blocking” in node.js?

In node.js “non-blocking” means that its IO is non-blocking. Node uses “libuv” to handle its IO in a
platform-agnostic way. On windows, it uses completion ports for unix it uses epoll or kqueue etc.
So, it makes a non-blocking request and upon a request, it queues it within the event loop which
call the JavaScript ‘callback’ on the main JavaScript thread.

23) Mention the framework most commonly used in node.js?


“Express” is the most common framework used in node.js

Unit VI Web Services


https://www.journaldev.com/9193/web-services-interview-questions-
soap-restful What is a Web Service?
Web Services work on client-server model where client applications can access web services over
the network. Web services provide endpoint URLs and expose methods that can be accessed over
network through client programs written in java, shell script or any other different technologies.
Web services are stateless and doesn’t maintain user session like web applications. What

are the advantages of Web Services?

Some of the advantages of web services are:


Interoperability:
Reusability: One web service can be used by many client applications at the same time.
Loose Coupling: Web services client code is totally independent with server code, so we
have achieved loose coupling in our application.
Easy to deploy and integrate, just like web applications.
Multiple service versions can be running at same time.

What are different types of Web Services?

1. SOAP Web Services: Runs on SOAP protocol and uses XML technology for sending data.

2. Restful Web Services: It’s an architectural style and runs on HTTP/HTTPS protocol almost all
the time. REST is a stateless client-server architecture where web services are resources
and can be identified by their URIs. Client applications can use HTTP GET/POST methods to
invoke Restful web services.

What is SOAP?

SOAP stands for Simple Object Access Protocol. SOAP is an XML based industry standard protocol
for designing and developing web services. Since it’s XML based, it’s platform

Web Technology
Unit wise/ Oral Questions

and language independent. So our server can be based on JAVA and client can be on .NET,
PHP etc. and vice versa.

What are advantages of SOAP Web Services?


WSDL document provides contract and technical details of the web services for client
applications without exposing the underlying implementation technologies.

SOAP uses XML data for payload as well as contract, so it can be easily read by any technology.

SOAP protocol is universally accepted, so it’s an industry standard approach with many easily
available open source implementations.

What are disadvantages of SOAP Web Services?

Some of the disadvantages of SOAP protocol are:

Only XML can be used, JSON and other lightweight formats are not supported.

SOAP is based on the contract, so there is a tight coupling between client and server
applications.

SOAP is slow because payload is large for a simple string message, since it uses XML
format.

Anytime there is change in the server side contract, client stub classes need to be generated
again.

Can’t be tested easily in browser

What is REST Web Services?

REST is the acronym for REpresentational State Transfer. REST is an architectural style for
developing applications that can be accessed over the network. REST architectural style was brought
in light by Roy Fielding in his doctoral thesis in 2000.

REST is a stateless client-server architecture where web services are resources and can be identified
by their URIs. Client applications can use HTTP GET/POST methods to invoke Restful web services.
REST doesn’t specify any specific protocol to use, but in almost all cases it’s used over HTTP/HTTPS.
When compared to SOAP web services, these are lightweight and doesn’t follow any standard. We can
use XML, JSON, text or any other type of data for request and response.

What are advantages of REST web services?

Some of the advantages of REST web services are:


Learning curve is easy since it works on HTTP protocol
Supports multiple technologies for data transfer such as text, xml, json, image etc. No
contract defined between server and client, so loosely coupled implementation. REST is a
lightweight protocol
REST methods can be tested easily over browser.

What are disadvantages of REST web services?


Web Technology
Unit wise/ Oral Questions

Some of the disadvantages of REST are:

Since there is no contract defined between service and client, it has to be


communicated through other means such as documentation or emails.

Since it works on HTTP, there can’t be asynchronous calls.

Sessions can’t be maintained.

Compare SOAP and REST web services?


SOAP REST

SOAP is a standard protocol for REST is an architectural style to create


creating web services. web services.

SOAP is acronym for Simple Object REST is acronym for REpresentational


Access Protocol. State Transfer.

SOAP uses WSDL to expose REST exposes methods through URIs,


supported methods and technical there are no technical details.
details.

SOAP web services and client REST doesn’t have any contract defined
programs are bind with WSDL between server and client
contract

SOAP web services and client are REST web services are loosely coupled.
tightly coupled with contract.

SOAP learning curve is hard, REST learning curve is simple, POJO


requires us to learn about WSDL classes can be generated easily and
generation, client stubs creation etc. works on simple HTTP methods.

SOAP supports XML data format only REST supports any data type such as
XML, JSON, image etc.

https://www.javatpoint.com/ejb-interview-questions

1) What is EJB?

EJB stands for Enterprise Java Bean. It is a server-side component to develop scalable, robust and
secured enterprise applications in java. More details...

2) What are the types of Enterprise Bean?

There are 3 types of enterprise bean in java.


1. Session Bean
2. Message Driven Bean
3. Entity Bean

3) What is session bean?

Session Bean encapsulates business logic. It can be invoked by local, remote or web service
client.
There are 3 types of session bean.
1. Stateless Session Bean
2. Stateful Session Bean
3. Singleton Session Bean
4) What is stateless session bean?
Web Technology
Unit wise/ Oral Questions

Stateless session bean is a business object that doesn't maintain conversational state with the client.

5) What is stateful session bean?


Stateful session bean is a business object that maintains conversational state with the client.

6) What is singleton session bean?

Singleton session bean is instantiated only once for the application. It exists for the life cycle of the
application.

7) What is Entity Bean?

Entity Bean is a server side component that represents the persistent data. Since EJB 3.x, it is
replaced by JPA.

https://career.guru99.com/top-14-jsf-interview-questions/

1) Explain what is JSF or Java Server Faces?

Java Server Faces or JSF : It is a java based web application framework to make the user
interface simple for JEE applications. Instead of traditional request driven MVC framework it uses
component based approach.

2) Explain what is the JSF architecture?

JSF is designed on the MVC (Model-View-Controller) framework and this allows for applications
to be scaled better. A JSF application is same like other Java technology based web application,
it runs in a JAVA servlet container and it contains
JavaBeans components as models consisting data and application-based
functionality
Custom tag library for representing validators and event handlers Custom
tag library for rendering UI components
UI components signified as stateful objects on the server
Server side helper classes
Event handlers, validators and navigation handlers

Application configuration resource file for organizing and configuring application resources

3) Explain the life cycle of JSF?

Restore view phase: During this phase binding of components to its event handlers and
validators are executed and view is saved in the FacesContext object

Apply request values phase: The motive of this phase is to retrieve its current date for each
component

Process validation phase: During this phase, local values saved for the component in the tree
are compared to the components validation rules registered

Update model value phase: After verifying, that data is genuine or valid in the
Web Technology
Unit wise/ Oral Questions

previous phase, local values of components can be set to related server side object properties

Invoke application phase: Prior to this phase the component values have been transformed,
validated and applied to the bean objects, so that you can avail them to run the application’s
business logic

Render response phase: JSP container renders the page back to the user in this phase
4) List out the available implementations of JavaServer faces?

When it comes to JSF there are Reference Implementation (RI) by Sun Microsytems; Apache MyFaces
is an open source JavaServer Faces (JSF) implementation and for Oracle there is ADF Faces.

5) Mention what does a typical JSF application consist of?

The typical JSF application consist of


JSF JavaBeans components for managing the application state and its behavior Event
driven development
Pages that represent MVC style views, pages reference view roots via the JSF component
tree

6) Explain how JSF is different from conventional JSP?


JSP JSF

JSP is a Java based technology used in JSF is a web application used to


order to help developers to create simplify development
dynamic web pages integration of web based user
interfaces
JSP must be compiled in JAVA byte-code in
respect to function properly JSF contains multiple core
features like managed beans,
JSP does not support validator and component system etc. that is
conversion, ajax etc. based on template, and tag
libraries
JSP is not an interface within the view
template. However, JSP are compiled JSF supports validator and
within the server conversion, ajax etc.
JSP is not managed or processed by the Within a view template JSF is an
faces servlet. Instead, JSP are Java interface
Servlets by themselves
JSF is processed by Faces
Servlet

7) Mention what is the difference between JSF and Struts?


JSF Struts

JSF is a specification Struts is an open source


framework
JSF action methods can be applied in
Java objects Struts actions are restricted to
struts API only
JSF has event model which reacts on

Web Technology
Unit wise/ Oral Questions
actions, value changes and phase There are no such event models in
changes in JSF lifecycle struts

JSF component tag does not produce Struts tag generates HTML
HTML-instead they declare a directly
component renderer pair on the server
To define navigation struts uses the
By mentioning a navigation rule in the notation
faces configuration file, JSF supports
navigation There is no dependencies
injection in struts
JSF uses dependencies injection

https://www.javatpoint.com/spring-interview-questions

1) What is Spring?

It is a lightweight, loosely coupled and integrated framework for developing enterprise applications
in java.

2) What are the advantages of spring framework?


1. Predefined Templates
2. Loose Coupling
3. Easy to test
4. Lightweight
5. Fast Development
6. Powerful Abstraction

3) What are the modules of spring framework?


1. Test
2. Spring Core Container
3. AOP, Aspects and Instrumentation
4. Data Access/Integration
5. Web

https://career.guru99.com/top-25-bootstrap-interview-questions/ 1) Explain
what is Bootstrap?

Bootstrap is a HTML, CSS, and JS framework for building the rich web applications with minimal
effort. This framework emphasis more on building mobile web applications.

2) Explain why to choose Bootstrap for building the websites? There are
few reason why we choose Bootstrap for building websites

Mobile Support: For mobile devices it provides full support in one single file rather than in
separate file. It supports the responsive design including adjusting the CSS based on the
different types of device, size of the screen etc. It reduces extra effort for developers.
Web Technology
Unit wise/ Oral Questions

Easy to learn: Writing application in bootstrap is easy if you know CSS and HTML

Browser Support: It supports all the popular browsers like Firefox, Opera, Safari, IE etc.

3) What are the key components of Bootstrap?

The key components of Bootstrap are

CSS : It comes with plenty of CSS files


Scaffolding : It provides a basic structure with Grid system , link styles and background

Layout Components : List of layout components

JavaScript Plugins: It contains many jQuery and JavaScript plugins

Customize: To get your own version of framework you can customize your
components

http://www.javapedia.net/JNDI
https://career.guru99.com/top-25-joomla-interview-questions/
https://career.guru99.com/top-40-word-press-interview-questions/

What is JNDI?
JNDI stands for Java Naming and Directory Interface. JNDI allows distributed applications
to look up services in an abstract, resource-independent way.
What is JNDI Lookup?
lookup() attempts to find the specified object in the given context. It looks for a single, specific
object and either finds it in the current JNDI context or it fails.

Explain what is Joomla?


Joomla is a content management system. It allows you to build online applications and web
sites. Joomla is an open source and available freely.
List out the benefits of using Joomla?
Benefits of Joomla is
It is an open source software
Tons of free components are available in extensions.joomla.org/
Permission and user role are inbuilt with Joomla
It allows to update your old Joomla from the admin section
Templates are available free of cost and can apply with one click

What is WordPress?
Word press is a best Open Source CMS which allows it to be used free of cost. You can
use it on any kind of personal or commercial website without have to pay a single penny for
it. It is built on PHP/MySQL (which is again Open Source) and licensed under GPL.

You might also like