0% found this document useful (0 votes)
71 views9 pages

Default Implementations or State. Java Collections Offer Good Examples of This (Map

Interfaces are more flexible than abstract classes as a class can implement multiple interfaces but only extend one abstract class. Abstract classes allow for default implementations and internal state while interfaces do not. Even if default implementations are needed, consider using an interface with an abstract implementation to provide flexibility. $routeProvider in AngularJS is used to configure URLs and map them to components and controllers. Factories return objects while services return the instantiated service constructor function. Single page applications improve performance by loading content asynchronously without page refreshes using JavaScript and AJAX.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views9 pages

Default Implementations or State. Java Collections Offer Good Examples of This (Map

Interfaces are more flexible than abstract classes as a class can implement multiple interfaces but only extend one abstract class. Abstract classes allow for default implementations and internal state while interfaces do not. Even if default implementations are needed, consider using an interface with an abstract implementation to provide flexibility. $routeProvider in AngularJS is used to configure URLs and map them to components and controllers. Factories return objects while services return the instantiated service constructor function. Single page applications improve performance by loading content asynchronously without page refreshes using JavaScript and AJAX.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1. From java What is Interface?

Why we need interface when we have abstract class?

 Interfaces are more flexible, because a class can implement multiple interfaces. Since
Java does not have multiple inheritance, using abstract classes prevents your users from
using any other class hierarchy. In general, prefer interfaces when there are no
default implementations or state. Java collections offer good examples of this (Map,
Set, etc.).
 Abstract classes have the advantage of allowing better forward compatibility. Once
clients use an interface, you cannot change it; if they use an abstract class, you can still
add behavior without breaking existing code. If compatibility is a concern, consider
using abstract classes.
 Even if you do have default implementations or internal state, consider offering an
interface and an abstract implementation of it. This will assist clients, but still
allow them greater freedom if desired

OOPS and about Inheritance.

2. Angular JS. Core Features of Angular JS

What is $routeprovider

$routeProvider is the key service which set the configuration of URLs, maps them with the corresponding
HTML page or ng-template, and attaches a controller with the same.

difference between services and factory?

In Factory,you create an object,add properties to it and return the same object.

In service,you dont create an object explicitly,Angularjs instantiates it behind the scenes with a
‘new’ keyword,basically it constructs the object with a constructor function.

Confusion ?lets simplify it with this example.

app.service(‘myService’,serviceFunction)

app.factory(‘myFactory’,factoryFunction)

var serviceFunction=function(){

//here you will assign the values to this function using ‘this’ keyword

//behind the scenes,angular will declare var this={}

this.name=”abc from service”,

//return this

var factoryFunction=function(){

var someObject={}

someObject.name=”abc from factory”;

return someObject.name;
}

app.controller(‘myCtrl”,function(myService,myFactory){

console.log(“Data from Service”,myService) //o/p serviceFunction:{“name”: “abc from service”}

console.log(“Data from Factory”,myFactory) //o/p “abc from factory”

})

so basically in service it will return the whole instance of function implicitly…but n factory you can
return what ever you want..so you have more control in factory as compared to service.

what is directive? Tell me about directives, services and factory that you created?
Tell me about Routing

3. Node JS. Establish connection between Node JS and MongoDB That's it.

How to improve performance of a website?

what is a single page application?

Single Page Application(SPA) is a web application that fits on a single web page with dynamic actions without
refreshing the page. Single Page Application interactions can be handle without reaching server. Single Page
Application can improve performance in several ways like loading time, using AJAX, easy to navigate pages
etc. End users will be more comfortable with Single Page Application, It is very easy to navigate to different
page and filter content. There are many tricks and technique can use to build awesome Single Page
Application. AngularJS is the more popular Single Page Application framework.

What is AJAX?
Asynchronous JavaScript and XML(AJAX). It is not a programming language. AJAX is the method of
exchanging data and updating in website without refreshing the page.

Advantages:
Single Page Application is good for making Responsive Websites, Support mobile, Tablet & Desktop.
 No extra queries to the server to download pages.
 User friendly.
 Performance improvement, Single Page Application can improve performance in many ways, Single time
file load each of HTML, CSS, JS.

Disadvantages:
 Client must enable JavaScript, Single Page Application build with JavaScript, So JavaScript should be
enabled in client browser. JavaScript enabled in all modern browsers by default.
 Security: Compare to traditional page Single Page Application is less secure due to Cross-site scripting
(XSS).
 Memory Leak: Memory leak in JavaScript can even cause powerful system to slow down.

Validation through javascript


4) How do you test the website performance?

Site Execution plays a major role. According to Think With Google site, a site is a great id its stacking time is under 5
seconds. A site is reasonable if stacking time is 5 to 8 seconds. However, a site is poor if stacking time is over 8
seconds.

Complete your UI design course to get the knowledge on responsive web design
5) Explain the ways to reduce the page loading time?

Decrease picture sizes, remove unnecessary gadgets, HTTP pressure, put CSS at the top and content references at
the base or in outer documents, lessen queries, limit diverts, reserving, and so on.

{ Info: use google page insights to check your page loading time }

6) What is Web Accessibility?

Web openness implies a web for distinctively able or incapacitated individuals. HTML5 presented WAI-ARIA so that
even incapacitate individuals can communicate, comprehend and explore a site.

7) what is the CSS Box Model?

CSS Box Model is the foundation of CSS design. Box Model incorporates Content, cushioning, outskirt and edge of a
component. In the CSS Box Model, each div or component is considered as a rectangular box. That crate can have
content, for example, width and height, margin, padding and border.

8) Is a CSS case sensitive?

Cascading Style Sheets (CSS) isn’t case Sensitive. However, textual style families, URLs to pictures, and other direct
references with the template might be. The secret is that in the event that you compose a report utilizing an XML
assertion and an XHTML doc-type, at that point the CSS class names will be case touchy for some browsers

9) How do you check coding errors in CSS?

Open your website page in Firefox. Press Ctrl + move + j. You will see all security, JavaScript and CSS related issues.
You can also utilize W3C validator for HTML and CSS related issues. Indeed, even W3C approval can check CSS
mistakes now.

10) What is a CSS Reset? Differentiate between the CSS Reset and Normalize CSS?

CSS Reset expels program default styles. Normalize css sets a standard overall program (It doesn’t ‘reset’ them).

11) What is meant by Ajax Request?

AJAX is Asynchronous JavaScript and XML. It is customer side procedure written in JavaScript used to get or post
information from a remote server without reloading page

12) What is Scrapping in UI path?

Data Scrapping is getting organized information from the program into a database, CSV document, or Excel record.

13) What is “Semantic HTML?”

Semantic HTML is a coding style where the labels specify what the content is intended to pass on. In Semantic HTML,
labels like for strong, and for italic ought not to be utilized, the reason being they simply speak to organizing, and
give no sign of importance or structure. The semantically right activity is useful and. These labels will have a similar
striking and italic impacts while showing importance and structure (accentuation for this situation).
14) what is the limitation when serving XHTML pages?

Maybe the greatest issue is the poor program support XHTML as of now appreciates. Web Explorer and various
other client specialists can’t parse XHTML as XML. Hence, it isn’t the extensible language it was guaranteed to be

15) What is Frameset?

Frames enable a designer to partition a program window into different (rectangular) regions. Numerous records can
be shown in a solitary window, each inside its very own frame. Graphical programs enable these casings to be looked
over freely of one another, and connections can refresh the record showed in one casing without influencing the
others.

{ Related Article – Latest UI Frameworks and Libraries for Angular 6 }

16) As a UI designer do you need to memorize the tags?

No. Most projects that help you compose HTML code definitely know most labels and make them when you press a
catch. In any case, you should comprehend what a tag is, and how it works. That way you can address blunders in
your page all the more effectively.

17) How can you allow file uploads to the website?

These things are fundamental for Web-based transfers:

* A HTTP server that acknowledges transfers.

* Access to the/cgi-canister/to put the getting content. Prewritten CGI record transfer contents are accessible.

18) How to combine multiple sheets to one?

To consolidate numerous/halfway templates into one set the TITLE property taking one and a similar incentive to the
LINK component. The joined style will apply as a favored style, e.g.:

<LINK REL=Stylesheet HREF=”default.css” TITLE=”combined”>

<LINK REL=Stylesheet HREF=”fonts.css” TITLE=”combined”>

<LINK REL=Stylesheet HREF=”tables.css” TITLE=”combined”>

19) How to design a backward compact-ability with style sheets ?

Existing HTML style techniques, (for example, <font SIZE> and <b>) might be effectively joined with template
particular strategies. Programs that don’t comprehend templates will utilize the more established HTML designing
strategies, and templates particulars can control the presence of these components in programs that help CSS1

20) Is it possible to hide the HTML Side?

In general, there is no genuine strategy or content for making standard HTML source code not distinguishable. You
may consider doing any of the below in the event that they are worried about your source code.

Make the website page in Macromedia Flash or a comparable program. The guest would need to download the
Macromedia Flash module and would be unfit to see the source code for the blaze applet.
There are different contents that will cripple the correct snap include, keeping the client from sparing pictures or
survey the source. Be that as it may, this won’t secure the source code of your page. For instance, Internet Explorer
clients may in any case click “View” and “Source” to see the source code of the page, or a client could incapacitate
contents and pictures can be spared by just sparing the website page to the hard drive.
There are a few projects that will help scramble your code, making it troublesome (certainly feasible) to peruse.
Once more, this won’t keep somebody from survey your code.
21) The color of the webpage looks different when viewed on PC and Mac Why?

To put it plainly, there is no genuine strategy or content for making standard HTML source code not perceptible. You
may consider doing any of the underneath on the off chance that they are worried about your source code.

Make the site page in Macromedia Flash or a comparative program. The guest would need to download the
Macromedia Flash module and would be unfit to see the source code for the glimmer applet.
There are different contents that will incapacitate the correct snap highlight, keeping the client from sparing pictures
or survey the source. In any case, this won’t ensure the source code of your page. For instance, Internet Explorer
clients may at present snap “View” and “Source” to see the source code of the page, or a client could handicap
contents and pictures can be spared by just sparing the site page to the hard drive.
There are a few projects that will help scramble your code, making it troublesome (certainly feasible) to peruse.
Once more, this won’t keep somebody from reviewing your code.
22) How to make the frame with the vertical Scroll bar but not a horizontal Scroll bar?

The best way to have a frame with a vertical scrollbar yet without an even scrollbar is to characterize the casing with
SCROLLING=”auto” (the default) and to have content that does not require level looking over. There is no real way to
indicate that an edge ought to have one scrollbar yet not the other. Utilizing SCROLLING=”yes” will drive scrollbars in
the two headings (notwithstanding when they aren’t required), and utilizing SCROLLING=”no” will restrain all
scrollbars (notwithstanding when looking over is important to get to the edge’s substance). There are no different
qualities for the SCROLLING property.

23) differentiate Div and Span?

DIV is utilized to choose a block of content with the goal that one can apply styles to it. span is utilized to choose
inline content and let clients apply styles to it. The principal contrast among DIV and SPAN will be SPAN does not do
arranging without anyone else’s input. Additionally, the DIV tag is utilized as a section break as it makes a legitimate
division of the record wherein it is connected. This is as opposed to the SPAN as SPAN basically dos the usefulness of
applying the style and arrangement whatever was determined in it.

24) What is the difference between the <strong> and < b>?

<b> is a presentational component used to give bolder look to content. While <strong> gives bolder look and solid
significance in Search Results

25) What is the difference between <i> and <em>?

<i> is a presentational component used to give italic look to content. While <em> gives italic look and underscore in
query items.

26) Differentiate between Position Relative, Absolute and Fixed?

Position relative can move a component as for its present position. Position outright can move a component as for
its present position or parent components position. Total Elements doesn’t consume space in DOM Flow. Position
fixed gives a fixed position to a component regarding the gadget screen. These components don’t proceed onward
looking over. Fixed Elements additionally doesn’t consume space in DOM Flow

Get angularjs videos with completion of ui course at onlineitguru


27) Differentiate standard and quirks mode?

in “standard mode” pages are rendered by the HTML and CSS particulars, while in “quirks mode” attempts are made
to imitate the conduct of more established programs.

28) Differentiate event bubbling and Capturing?


Event Propagation is the request that occasion fire on the component. Bubbling is the point at which an occasion fire
on the component and afterwards bulb up DOM Tree. Means First kid and after that parent will call. Catching is
actually inverse. First parent hub is called and after that engenders down towards target component.

29) Differentiate Jquery ready function and ready on – load?

the window.onload is a JavaScript work through $(document).ready is a Jquery work. Jquery prepared capacity
burdens content somewhat quicker than the JavaScript window. onload work. window. onload hang tight for all
DOM substance including media to stack first and after that executed, though Jquery prepared capacity to sit tight
for just HTML components, not media, hence burden quick.

30) Differentiate linking to the image, email address and website

To connect a picture, use labels. You need to indicate the picture in statements utilizing the source quality, src in the
opening tag. For hyperlinking, the stay tag is utilized and the connection is determined in the href trait. Content to
be hyperlinked ought to be put between the labels. Minimal known reality: href means “HYPERTEXT REFERENCE.”
When connecting to an email, the href determination will be mailto:[email protected].

1) Explain about HTML5 local storage ?

There are two ways to store data in HTML as objects locally :

1. localStorage – store data across session acess


2. sessionStorage – storing data for current session only

Data will be stored in key/value pair format.

example:

localStorage.empid=”420″;

sessionStorage.companyname = “SHARAG INFOTECH”;

2) explain CSS media queries ?

CSS media queries are used to develop responsive templates for different layout of screen, print, mobile , tablet or
any other resolutions

CSS media queries can be added in 3 ways as like CSS style sheet :

1. Internal stylesheet : <style type=”text/css”>


@media only screen and (max-width: 600px){
/* rules apply to the device resolution is 480px or less */
}
</style>
2. Imported stylesheet : @import “tablet.css” (min-width: 800px) and (max-width: 1200px);
3. External stylesheet: <link rel=”stylesheet” type=”text/css” href=”deskto.css” media=”screen and
(min-width: 1200px), print and (min-resolution: 300dpi)” />

3) explain css inheritance ?

Inheritance propagates property values from parent elements to their children. The inherited value of a property
on an element is the computed value of the property on the element’s parent element. For the root element, which
has no parent element, the inherited value is the initial value of the property.

A property can also be explicitly inherited by using the inherit keyword in property.

CSS inheritance example:


class inheritance for an HTML tag :
<div class=”firstClass secondClass thirdClass fourthClass ” > </div >
CSS property inheritance from parent :
p{
color: #000;
}
p a:link {
color: inherit;
}

and using LESS method for inheritance example:


//through variable
@color: #123456;
#emp {
color: @color;
}
div {
color: @color;
}

//through class name calling [MIXINS]

.rounded-corners (@radius: 2px) {


-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}

#navtable {
.rounded-corners;
}

#maintable {
.rounded-corners(5px);
}

4) what is javascript inheritance ?

In simple terms, inheritance is the concept of one thing gaining the properties or behaviours of something else.
Inherited children inherit their parent’s behaviour To say A inherits from B, is saying that A is a type of B.
In JavaScript You must use a special object called prototype.
function Animal() {}; // This is the Animal *Type*
Animal.prototype.eat = function () {
alert(“All animals can eat!”);
};

function Bird() {}; // Declaring a Bird *Type*


Bird.prototype = new Animal(); // Birds inherit from Animal
Bird.prototype.fly = function() {
alert(“Birds are special, they can fly!”);
};

The effect of this is that any Birds you create (called an instance of Bird) all have the properties of Animals
var aBird = new Bird(); // Create an instance of the Bird Type
aBird.eat(); // It should alert, so the inheritance worked
aBird.fly(); // Important part of inheritance, Bird is also different to Animal

var anAnimal = new Animal(); // Let’s check an instance of Animal now


anAnimal.eat(); // Alerts, no problem here
anAnimal.fly(); // Error will occur, since only Birds have fly() in its prototype

5) explain javascript associative array ?

Associative arrays are where we can associate a key string with a value string
JavaScript objects are also associative arrays.
i.e the property emp.Name can also be read by calling emp[‘Name’]
We can access each property by entering the name of the property as a string into the array
it refers to accessing the DOM elements of HTML also [as object or associative array]
6) explain JS Namespace ?

Namespacing is a technique employed to avoid collisions with other objects or variables in the global namespace
and also helps to organize blocks of functionality into easily manageable groups that can be uniquely identified.

JavaScript doesn’t builtin support of namespacing but using objects and closures we can achieve a similar effect.
javascript Namespacing patterns :
1) Single global variables :
var myApplication = (function(){
function(){
/*…*/
},
return{
/*…*/
}
})();

2) Object literal notation :

var myApplication = {
getInfo:function(){ /**/ },
// we can also populate our object literal to support
// further object literal namespaces containing anything
// really:
models : {},
views : {
pages : {}
},
collections : {}
};

3) Nested namespacing :

var myApp = myApp || {};


// perform a similar existence check when defining nested
// children
myApp.routers = myApp.routers || {};
myApp.model = myApp.model || {};
myApp.model.special = myApp.model.special || {};
// nested namespaces can be as complex as required

4) Immediately-invoked Function Expressions :

// an (anonymous) immediately-invoked function expression


(function(){ /*…*/})();
// a named immediately-invoked function expression
(function foobar(){ /*..*/}());
// this is technically a self-executing function which is quite different
function foobar(){ foobar(); }
5) Namespace injection :

// define a namespace we can use later


var ns = ns || {}, ns2 = ns2 || {};
// the module/namespace creator
var creator = function(val){
var val = val || 0;
this.next = function(){
return val++
};

this.reset = function(){
val = 0;
}
}
creator.call(ns);
// ns.next, ns.reset now exist
creator.call(ns2, 5000);
// ns2 contains the same methods
// but has an overridden value for val
// of 5000
for more details on namespace read http://addyosmani.com/blog/essential-js-namespacing/
7) explain Jquery live and bind methods ?
.bind() attacheds events to elements that exist or match the selector at the time the call is made.
Any elements created afterwards or that match going forward because the class was changed, will not fire the
bound event.

$(‘img’).bind(‘click’, function(){…});

.live() works for existing and future matching elements.


Before jQuery 1.4 this was limited to the following events:
click, dblclick mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup
$(‘img’).live(‘click’, function(){…});

8) what is bootstrap ?

Bootstrap is an open-source Javascript framework developed by the team at Twitter.


It is a combination of HTML, CSS, and Javascript code designed to help build user interface components.
Bootstrap is Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
Bootstrap was also programmed to support both HTML5 and CSS3
Bootstrap is a CSS and Javascript framework that is used within your HTML. Bootstrap provides more advanced
functionality to your web site.
More details http://getbootstrap.com
9) type of webservice ?

there are two types of web service….1. SOAP [Simple Object Access Protocol] Webservice and 2. RESTful
[REpresentational State Transfer] Webservice.
SOAP is a messaging protocol , REST is a design philosophy , not a protocol.
SOAP:

you define your interface in a .wsdl file, which describes exactly which input parameters are expected and how the
return values will look like
there are tools to generate the .wsdl files out of java class hirarchies. JAXB for example
there are also tools to generate java objects/classes as part of eclipse for example (don’t know the name in the
moment).
SOAP is very strict. Every request is validatet against the wsdl before processing.

A good but not so easy to start with framework for SOAP WS is Apache CXF

REST (no hands on experience up to now, feel free to correct and improve ;) ):

a way to access a webserver or web application to retrieve data from or send to it.
it’s only negotiated, how it is accessed.
common is something like this http://server.domain.com/app/type/id=123 to retrieve object of type type with
id=123
very intuitive, but no automatic validation of requests.

The main advantages of REST web services are:

Lightweight – not a lot of extra xml markup


Human Readable Results
Easy to build – no toolkits required

SOAP also has some advantages:

Easy to consume – sometimes


Rigid – type checking, adheres to a contract
Development tools

You might also like