PHP / May 31, 2018

In this section we will look at OOP with PHP . Refering the below explanations prior to interviews will surely help you to answer some of the most common questions an rookie/intermediate level developer might face in interviews.Here is a diagram depicting object oriented programming concepts CLASSES In object-oriented programming , a class is a template definition of the method s and variables in a particular kind of object . Thus, an object is a specific instance of a class; it contains real values instead of variables.

A CLASS is a template of an object.An OBJECT  is an instance of class

DATA ABSTRACTION Concept of Abstraction in PHP is important php oop (object oriented programming) concept.To show the needed/relevant information or details without showing all information which is not necessary is called abstraction.   Abstract Classes. – An abstract class is a class that is only partially implemented by the programmer. It may contain one or more abstract methods. An abstract method is simply a function definition that serves to tell the programmer that the method must be implemented in a child class.

    The constructor of a class defines what happens when you instantiate an object from this class. The destructor of a class defines what…

php and oops interview questions
interview questions / May 31, 2018

What is Object Oriented Programming? Object-oriented programming (OOP) is a programming language model organized around objects rather than functions as in procedural programming; Objects are instances of classes, are used to interact with one another. What are the advantages of OOPS concepts? Major advantages of OOPS programming are; Simplicity: OOPS programming models on  objects, so the complexity is reduced and the program structure is better. Modularity: Each object forms a separate entity whose internal workings are decoupled from other parts of the system. Modifiability: Easy to modify Extensibility: Adding new features and modifying some existing ones is so much easier Maintainability: Objects can be maintained independantly Re usability: Objects can be reused in different programs. What is data asbstraction To show the needed/relevant information or details without showing all information which is not necessary is called abstraction.   What is data encapsulation It is a concept of wrapping up or binding up related data members and methods in a single module known as Encapsulation. Encapsulation refers to a concept where we encapsulate all the data and member functions together to form an object.Achieved using public,private and protected methods and attributes What is the difference between Procedural programming and OOPS? What is data…

js/nodejs/angularjs/ts interview questions
interview questions / May 31, 2018

1  What is data binding in angularjs Data binding in AngularJS is the synchronization between the model and the view.                                      2  What are the key features of angularjs    Modules.    Directives.    Expressions.    Controller.    Scope.    Data Binding.    Validations.    Filters.    Services.  Routing.  Dependency Injection.  Testing. 3  What are directives AngularJS extends HTML attributes with directives 4  What are controllers Controllers are functions which provide data and logic to the HTML page we are going to visualize the data. 5  What do you mean by compile and link in angularjs To have a complete understanding of angularjs understanding the angular is lifecycle is necessary .Angularjs lifecycle        has three phases. Bootstrap phase- The bootstrap phase is the phase in which the library is loaded,module is created based on your ng-app and any                dependencies to your module is loaded Compilation phase- The  compilation phase is the phase which include two steps Traversing the  DOM and collecting all the directives and        then linking the directives to the…

js (ES6,ES7,ES8),OOPS js,Node.js
Javascript / May 31, 2018

ABOUT JAVASCRIPT JavaScript  is an interpreted language.A program such as C++ or Java needs to be compiled before it is run. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute. In the case of javascript  an interpreter  reads over the JavaScript code, interprets each line and runs it.Google’s V8 increases performance by compiling JavaScript to native machine code before executing it, versus executing bytecode or interpreting it. ADVANCD JAVASCRIPT (ES6) Here, we look at some advanced javascript concepts which might come useful while facing an interview for javascript developer HOISTING IN JAVASCRIPT Hoisting is JavaScript’s default behavior of moving declarations to the top of the current scope

  Consider the above code.The function and var declarations automatically gets hoisted towards top . So the above code works fine. VARIABLE SCOPE OF JAVASCRIPT var,let,const,function,class,import are ways of declaring a variable Both let and const create variables that are block-scoped –ie, they only exist within the innermost block that wraps them.(Blocks are what exists inside curley braces and the nested curley braces) The scope of a variable declared with var is its current execution context, which is either the enclosing function or, for variables declared outside any…

Angularjs and ts(Angular 5)
Javascript / May 31, 2018

WHAT IS ANGULAR JS AngularJS is a JavaScript framework. It is written in JavaScript.AngularJS extends HTML attributes with DIRECTIVES, and binds data to HTML with EXPRESSIONS.With AngularJS we can create single page applications(SPA) The following are the key features of AngularJs: Modules. Directives. Expressions. Controller. Scope. Data Binding. Validations. Filters. Services. Routing. Dependency Injection. Testing.

Here in the above example ng-app,ng-model,ng-bind are directives.HTML attributes with ng prefix are directives.ng-app defined an application and ng-controller defines a controller.AngularJS expressions can be written inside double braces: {{ expression }}.AngularJS expressions can also be written inside a directive: ng-bind=”expression” DIGEST CYCLE IN ANGULARJS The digest cycle inAngularJS Compilation phase- The  compilation phase is the phase which include two steps Traversing the  DOM and collecting all the directives and       then linking the directives to the appropriate JavaScript functionality in the AngularJS built-in library or custom directive       code. The directives are combined with a scope to produce the dynamic page binding phase-In this the changes in scope are reflected in the DOM. In AngularJS,there are watchers for every scope variable that we declare.It keeps a watch list with the variable and the data.Digest cycle can be considered as a loop, during which AngularJS checks if there…

Share this page in social media platforms