Interview Questions 2

Primary tabs

Interview Questions for stack developer

Bookmark to learn: Login to use bookmarks.

Bookmark to learn: Login to use bookmarks.

Add to collection ... add Interview Questions 2 to your collections:

Help using Flashcards ...just like in real life ;)

  1. Look at the card, do you know this one? Click to flip the card and check yourself.
  2. Mark card Right or Wrong, this card will be removed from the deck and your score kept.
  3. At any point you can Shuffle, Reveal cards and more via Deck controls.
  4. Continue to reveal the wrong cards until you have correctly answered the entire deck. Good job!
  5. Via the Actions button you can Shuffle, Unshuffle, Flip all Cards, Reset score, etc.
  6. Come back soon, we'll keep your score.
    “Repetition is the mother of all learning.”
  7. Signed in users can Create, Edit, Import, Export decks and more!.

Bookmark to learn: Login to use bookmarks.

Share via these services ...

Email this deck:

Right: #
Wrong: #
# Right & # Wrong of #

What is Inheritance? Why is it useful? Give an Example.

Inheritance is a feature of object-oriented programming languages that allows you to define a base class that provides specific functionality (data and behavior) and to define derived classes that either inherit or override that functionality.
It reduces the redundancy of code.
It provides the reusability of code.
It reduces the code size and improves the code readability.
It manages the code easily and divides the class into base class and derived class.

What is dependency injection?

Dependency Injection (DI) is an object-oriented programming design pattern that allows us to develop loosely coupled code. DI helps in getting rid of tightly coupled software components. The purpose of DI is to make code maintainable and easy to update.
DI is a technique to create a dependency or dependencies outside the class that uses it. The dependencies are injected from the code that calls the class and any information about their creation are kept away from the inside of the class. This is also why DI is an implementation of the Inversion of control (IoC) principle.

What is reflection?

Reflection in C# is used to retrieve metadata on types at runtime. ... In using reflection, you get objects of the type "Type" that can be used to represent assemblies, types, or modules. You can use reflection to create an instance of a type dynamically and even invoke methods of the type.

What is container?

The Container class is the default implementation for the IContainer interface. Containers are objects that encapsulate and track zero or more components. ... The components in a container are tracked in a first-in, first-out list, which also defines the order of the components within the container.

What is Polymorphism? Why is it useful? Give an Example.

Polymorphism, in C#, is the ability of objects of different types to provide a unique interface for different implementations of methods. It is usually used in the context of late binding, where the behavior of an object to respond to a call to its method members is determined based on object type at run time.

What is Encapsulation? Why is it useful? Give an Example.

In c#, Encapsulation is a process of binding the data members and member functions into a single unit. In c#, the class is the real-time example for encapsulation because it will combine various types of data members and member functions into a single unit

What does a protected method mean?

In c#, protected modifier is used to specify that access is limited to the containing type or types derived from the containing class so the type or member can only be accessed by code in the same class or in a derived class.

What is the difference between interface and class ?

An Interface is a reference type and it included only abstract members such as Events, Methods, Properties etc. ... A Class is a full body entity with members, methods along with there definition and implementation. An Interface is just a set of definition that you must implement in your Class inheriting that Interface.

Are you familiar with Design Patterns? Which ones? Why are they useful?

There are three categories of design patterns, Creational, Structural, and Behavioral. Builder, Factory, and Singleton are examples of Creational, Decorator, Facade, Proxy are examples of Structural, and Observer, Visitor, Command are examples Behavior.

What is a Database index?

An index is a data structure that enables data to be found quickly. There are primarily two kinds of database indexes, clustered and non-clustered.

Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be stored in only one order.

Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value.

What are the differences between MVC and Web Forms and MVVM ?

MVC focuses on separation of concern, i.e., there is no fixed code behind page for every view. A view can be called from multiple action. Web form based on functions and page behind code, i.e., there is code behind page for each view. You have to write code in that class related to this view only.

Whereas the MVC format is specifically designed to create a separation of concerns between the model and view, the MVVM format with data-binding is designed specifically to allow the view and model to communicate directly with each other. This is why single page applications work very well with ViewModels.

What is Agile and Waterfall

Waterfall is a Liner Sequential Life Cycle Model whereas Agile is a continuous iteration of development and testing in the software development process. ... Agile allows changes in project development requirement whereas Waterfall has no scope of changing the requirements once the project development starts.

What are Stored Procedures?

A stored procedure (also termed proc, storp, sproc, StoPro, StoredProc, StoreProc, sp, or SP) is a subroutine available to applications that access a relational database management system (RDBMS). Such procedures are stored in the database data dictionary.

What are Dynamic Queries?

Dynamic SQL refers to SQL statements that are generated at run-time. For example, a user would enter a search parameter, and the query would run with that value. Dynamic SQL is useful when we don't know the table or the items we are querying.

What technologies have you used to consume web services on the front-end?

Ones that I have used
SoapUI.
Postman.

Some others that I have not used
TestingWhiz.
SOAPSonar.
SOAtest.
TestMaker.
vRest.
HttpMaster

What is JSONP?

JSONP stands for JSON with Padding. Requesting a file from another domain can cause problems, due to cross-domain policy. Requesting an external script from another domain does not have this problem. JSONP uses this advantage, and request files using the script tag instead of the XMLHttpRequest object.

What is the difference between REST & SOAP?

SOAP stands for Simple Object Access Protocol whereas REST stands for Representational State Transfer. ... SOAP needs more bandwidth for its usage whereas REST doesn't need much bandwidth. SOAP only works with XML formats whereas REST work with plain text, XML, HTML and JSON.

What is the difference between clustered and non-clustered indexes

Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be stored in only one order.

Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value.

AngularJS vs Angular - What are the Architectural differences?

Architecture
AngularJS followed the MVC design, Angular followed more like MVVM. Controllers and $scope where replaced by components and directives. There are two kinds of directives in Angular. These are structural directives that alter the layout of the DOM by removing and replacing its elements, and attributive directives that change the behavior or appearance of a DOM element.

AngularJS vs Angular - What are the differences of the languages?

AngularJS is written in JavaScript.
Angular uses TypeScript

AngularJS vs Angular - What is the Expression Syntax difference?

In AngularJS, To bind an image/property or an event with AngularJS, you have to remember the right ng directive.
Angular focuses on “( )” for event binding and “[ ]” for property binding.

AngularJS vs Angular - What is the difference on how to handle mobile support.

AngularJS was not built with mobile support in mind, but Angular 2 and 4 both feature mobile support.

AngularJS vs Angular - What is the difference on how to handle routing.

AngularJS uses $routeprovider.when() to configure routing while Angular uses @RouteConfig{(…)}.

What is a component

Components are a logical piece of code for Angular JS application. A Component consists of the following −

Template − This is used to render the view for the application. This contains the HTML that needs to be rendered in the application. This part also includes the binding and directives.

Class − This is like a class defined in any language such as C. This contains properties and methods. This has the code which is used to support the view. It is defined in TypeScript.

Metadata − This has the extra data defined for the Angular class. It is defined with a decorator.

TypeScript – what is it? How is it related to Angular

TypeScript is a strongly typed, object oriented, compiled language. It was designed by Anders Hejlsberg (designer of C#) at Microsoft. TypeScript is both a language and a set of tools. TypeScript is a typed superset of JavaScript compiled to JavaScript. In other words, TypeScript is JavaScript plus some additional features.

What are Angular expressions

In Angular, a template expression in curly braces still denotes one-way binding. This binds the value of the element to a property of the component. The context of the binding is implied and is always the associated component, so it needs no reference variable.

In relation to Angular, what is scope?

The $scope in an AngularJS is a built-in object, which contains application data and methods. You can create properties to a $scope object inside a controller function and assign a value or function to it. The $scope is glue between a controller and view (HTML).

Angular2 and newer versions of Angular has done without $scope and controllers. Therefore, you use shared services instead of $scope. You include a service in providers. The scope of such a provider is the component where it is provided and it's descendants when no descendant has the same provider registered.

What is Event bubbling?

When Angular attaches event handlers to standard HTML element events, the event propagation works in the same way as standard DOM event propagation works. This is also called event bubbling.

Custom events in Angular by default do not bubble up. It is because they are not really events, they are based on EventEmitter.

Observables vs calls backs vs promises

What actually the difference is? Promise emits a single value while Observable emits multiple values. So, while handling a HTTP request, Promise can manage a single response for the same request, but what if there are multiple responses to the same request, then we have to use Observable.

The main difference between callbacks and promises is that with callbacks you tell the executing function what to do when the asynchronous task completes, whereas with promises the executing function returns a special object to you (the promise) and then you tell the promise what to do when the asynchronous task

Annotation vs Decorator

A decorator corresponds to a function that is called on the class whereas annotations are "only" metadata set on the class using the Reflect Metadata library. With TypeScript and ES7, @Something is a decorator.

What is string interpolation?

String Interpolation is a special syntax which is converted to property binding by Angular. It's a convenient alternative to property binding. When you need to concatenate strings, you must use interpolation instead of property binding.

What are angular templates?

A template is an HTML snippet that tells Angular how to render the component in angular application. The template is immediately associated with a component defines that component's view.

Transpiling in Angular?

The compiler takes the TypeScript code and converts it into JavaScript. This process is commonly referred to as transpiling, and since the TypeScript compiler does it, it's called a transpiler. JavaScript as a language has evolved over the years with every new version adding new features/capabilities to the language.

Explain routing in angular?

You register your routs in the Imports section of the app.module of your application using RoutModule.forRoot (imported from @angular/router)
Each route will contain component in which the route is referring to. In your app.component.html file you insert the directive.