Full Stack Developer Interview

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is HTML?

(HyperText Markup Language) It is the markup language used to view content on the web browser (markup language used to create web pages).

What is a table in a SQL database?

A table is a collection of related data entries and it consists of columns and rows.

What is the generic name of the library used in .Net that is used to communicate with Databases?

ADO.Net

What is AJAX?

AJAX = Asynchronous JavaScript and XML. AJAX is the art of exchanging data with a server, and updating parts of a web page - without reloading the whole page.

What is Attribute routing?

Attribute routing uses attributes to define routes. Attribute routing gives you more control over the URIs in your web application. Attribute routing can be achieved by decorating a controller and controller methods

What are Collections in .Net?

Collections provide a more flexible way to work with groups of objects. Unlike arrays, the group of objects you work with can grow and shrink dynamically as the needs of the application change. For some collections, you can assign a key to any object that you put into the collection so that you can quickly retrieve the object by using the key. Such as a list or a dictionary, lives in the Collections namespace

How can you test if an instance of an object implements a particular interface?

Icar c = obj as Icar; if (c != null) { // it implements the interface }

What is a null reference exception?

It is referencing an object that is null. Get a null reference exception when trying to access properties of an object that are not there and therefore null.

What are the benefits of Separation of Concerns?

It simplifies development and maintenance of programs. Code can be developed and updated independently. It improves testability. It promotes the reusability of code. It reduces coupling, the degree to which classes are depended on each other, and increases cohesion, the degree to which members of the class relate to the purpose of the class.

Describe the main differences or considerations between the two languages?

JS C# use Razor

What are some common Structure types in C#?

Numeric and logical built-in types (value types): *decimals, integers, floating-point values, booleans.*

How many times does the "document ready" event fire?

Once

What are the different types of HTTP Methods? When would you use these over the others?

Post, Put, Delete, Get

What is foo?

Programmers tend to use the term "foo" (pronounced FOO) as a universal substitute for something real when discussing ideas or presenting examples. e.g., foo();

What is SQL Injection?

SQL injection is a technique where malicious users can inject SQL commands into an SQL statement, via web page input. Injected SQL commands can alter SQL statement and compromise the security of a web application. Using the *paramCollection.AddWithValue(@UserID, userID)* in the Visual Studio Service file help protect against SQL injection.

What is Serialization?

Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.

What are the .Net objects and classes used to communicate and execute commands at the database?

Sql.DAO DAO (Data Access Objects) is an application program interface (API) available with Microsoft's Visual Basic that lets a programmer request access to a Microsoft Access database. Through Jet Sql functions, it can also access other Structured Query Language (SQL) databases.

...

Strict equality (===) and strict inequality (!==) consider only values that have the same type to be equal. Normal (or "lenient") equality (==) and inequality (!=) try to convert values of different types before comparing them as with strict (in)equality.

What are JSON's basic types?

String Number Boolean Object (name:value pairs) Null Array

Back-end

The back-end of a website is everything that the user can't see and interact with. Typically back-end coding languages like PHP or .NET are run on a server. For this reason, the back-end code is also sometimes referred to as server-side code. A functional website needs a strong back-end to interact with the front-end in order to be successful.

How can you identify a primitive (or value) type?

The best way is to use the 'typeof' operator. console.log(typeof "Taylor"); //string console.log(typeof 10); //number console.log(typeof "10"); //string console.log(typeof true); //boolean console.log(typeof undefined); //undefined NULL is tricky. Null will console.log as //"object". The best way to determine if a 'value' is 'null' is to compare the value against null itself. console.log(value === null); //true or false

Front-end

The front-end of a website refers to part of the site that your user interacts with directly. Coding languages like HTML and CSS are parts of the site that encompass the front-end because they're the languages that your user's browser reads. The front-end is basically anything the uer can see and interact with.

What is data (database) normalization? Why would we go through the process of normalizing our data? How many normal forms are there?

The process of organizing the fields and tables of a relational database to minimize redundancy. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. There are 5-7 normal forms.

Is there a difference between a named function and a function expression?

They are basically the same, but named functions (function declarations) have two advantages over function expressions: They are hoisted , so you can call them before they appear in the source code. They have a name, and the name of a function is useful for debugging. However, JavaScript engines are getting better at inferring the names of anonymous function expressions.

What namespace do these attributes live in? What are all the different types of validations that these attributes let you perform?

Validation attributes live in the System.ComponentModel.DataAnnotations namespace. Required, Min/Max Length, Email, RegEx, DateTime, Credit Card, etc.

How do you access the arguments without using the parameters' names?

arguments[a] [b] [c]

What are the fundamentals that a developer should consider when working to wire up model binding correctly?

data types validation spelling

Write out JavaScript function that accepts two numbers, adds these numbers and returns the result. Write the same add function in C#. Adjust the Add function from the previous answer to accept an optional third parameter and to throw an error if it is not passed at least two arguments.

function addTwoNumbers(a, b){ a + b } return(); OR function addTwoNumbers(a, b){ return a + b; } public static int addNumbers(int a, int b, int c=null){ return a + b + c; } function addNumbers(a, b, c){ if(!a || !b) { throw error } else { return a + b + (c || 0); }

Comparison between Abstract class and Interface

http://www.codeproject.com/Articles/11155/Abstract-Class-versus-Interface

What is jQuery? Is it required to build HTML pages? Is it required to build interactivity into your web pages?

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like DOM traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. jQuery is not required to build HTML pages or build interactivity in web pages.

How do you find duplicate names in a list of Names?

public static void check(string[] arr) { Dictionary<string, int> names = new Dictionary<string, int>(); foreach (string name in arr) { if (!names.ContainsKey(name)) { names.Add(name, 0); } } }

What the basic elements that exist in all HTML pages between the start and closing <html> tags?

<Head> //some text </Head> <Body> //main text </Body>

What is a Primary Key? What is a Foreign Key?

A Primary Key uniquely identifies a column or set of columns in a record or database. There is only one primary key in a table. A Foreign Key is a primary key in a another table that allows you to create a relationship between the tables. A table can have numerous Foreign Keys.

What is a Database? What is a Relational Database?

A database is a place to store data. A relational database is one that stores relationships between the data stored.

What a Model?

A model is a package of data.

What is Namespace?

A naming convention that helps to organize code. Both the client side and server side use namespace.

How do you do a null check in SQL?

COL<11 AND COL IS NULL COL IS NOT NULL AND COL<11 OR COL IS NULL

What is CSS?

Cascading Style Sheets. CSS works hand-in-hand with HTML to create sites that are more than plain text. If HTML is the backbone, then CSS is the skin, the hair and the style of clothes. You'll use CSS to tell the browser things like what color your text should be and what fonts to display.

Give examples of primitive (or value) types. What are primitive (or value) types?

Ex: number, boolean, string, null, undefined Primitive (or value) type represent simple pieces of data that are stored as is. Ex: true, 5, "Hi". Primitive types are literals (values that aren't stored in a variable, such as a hardcoded name.)

How do you store Flags in an Enum? What are the first 4 numeric values of a Enum like this?

Decorate the Enum with Flag attribute and set the value of the flags. first 4 values of Enum w/Flags are 0(not set), 1, 2, 4 [8, 16, 32, 64, etc] NOTE: Enum has 0(zero) as default

What is the DOM?

Document Object Model The DOM defines a standard for accessing documents. The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.

What is JSON? What are the benefits of JSON serialization over XML serialization?

JavaScript Object Notation, is an open standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML. Benefits of JSON is that the JSON object has fewer characters to transport and is therefore faster and more efficient. Also better readability for the developer.

How do you send email on the server?

You write a service that connects to an API such as SendGrid that sends email.

How do you know if your jQuery selector found any matching elements?

use .length method

Using JQuery syntax write out your typical Ajax request and discuss how each part is used.

var call = function(myData){ var url = 'url ajax call is using'; var settings = { content type: 'some string' , data: myData , data type: 'json' //data format , success: onsuccess //response callback , error: onerror //response callback , type: 'POST' //type of HTTP request }; $.ajax(uri, settings); }; //call the ajax function passing in the uri and the declared settings

What are the different SQL joins?

*INNER JOIN:* Returns all rows when there is at least one match in BOTH tables *LEFT JOIN:* Return all rows from the left table, and the matched rows from the right table *RIGHT JOIN:* Return all rows from the right table, and the matched rows from the left table *FULL JOIN:* Return all rows when there is a match in ONE of the tables

What is a Class?

A class describes all the attributes of objects, as well as the methods that implement the behavior of member objects. It is a comprehensive data type, which represents a blue print of objects. It is a template of object.

...

A class whose properties are meant to be implemented by another class.

What is an Abstract Class?

An Abstract Class is a special kind of class that cannot be instantiated. So the question is why do we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.

Define an array.

An array is defined as a homogeneous collection of elements, stored at contiguous memory locations, which can be referred by the same variable name. All the elements of an array variable can be accessed by index values. An Index value specifies the position of a particular element in an array variable.

What is an Interface?

An interface is a contract and defines the requisite behavior of generalization of types. For example, vehicle behavior includes ignition on, ignition off, turn left, turn right, accelerate, and decelerate. A car, truck, bus, and motorcycle are included in the vehicle category. As such, they must encapsulate baseline behavior representative of all vehicles. The vehicle interface defines that baseline. Specific vehicle types implement that baseline behavior differently than others. A car accelerates differently from a motorcycle. A motorcycle turns differently from a bus. An interface mandates a set of behaviors, but not the implementation. The derived type is free to implement the interface in an appropriate manner. Interfaces must be inherited. An interface has no implementation; it only has the signature or, in other words, just the definition of the methods without the body. Since C# doesn't support multiple inheritance, interfaces are used to implement multiple inheritance. You cannot create an instance of an interface. As one of the similarities to Abstract class, it is a contract that is used to define hierarchies for all subclasses or it defines specific set of methods and their arguments. The main difference between them is that a class can implement more than one interface but can only inherit from one abstract class.

Passing Data from the Controller to the View

Before we go to a database and talk about models, though, let's first talk about passing information from the controller to a view. Controller classes are invoked in response to an incoming URL request. A controller class is where you write the code that handles the incoming browser requests, retrieves data from a database, and ultimately decides what type of response to send back to the browser. View templates can then be used from a controller to generate and format an HTML response to the browser. Controllers are responsible for providing whatever data or objects are required in order for a view template to render a response to the browser. A best practice: A view template should never perform business logic or interact with a database directly. Instead, a view template should work only with the data that's provided to it by the controller. Maintaining this "separation of concerns" helps keep your code clean, testable and more maintainable.

What types of Serialization are you familiar with?

Binary, XML, JSON, name-value pairs, SOAP Either binary or XML serialization can be used. In binary serialization, all members, even those that are read-only, are serialized, and performance is enhanced. XML serialization provides more readable code, as well as greater flexibility of object sharing and usage for interoperability purposes. XML serialization can also be used to serialize objects into XML streams that conform to the SOAP specification. SOAP is a protocol based on XML, designed specifically to transport procedure calls using XML. As with regular XML serialization, attributes can be used to control the literal-style SOAP messages generated by an XML Web service. SOAP, originally an acronym for Simple Object Access protocol, is a protocol specification for exchanging structured information in the implementation of web services in computer networks. It uses XML Information Set for its message format, and relies on other application layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.

What is the best was to concatenate strings in .Net?

Create an instance of the StringBuilder class and append the values to the instance. StringBuilder mySB = new StringBuilder("string A") ; mySB.Append(" string B");//note: spaces! mySB.Append(" string C"); string concatString = mySB.ToString();

When creating a new controller, what class does it inherit from?

From Controller. An API Controller inherits from API Controller and the Controller from Base Controller, which extends the functionality of the 'regular' Controller.

What is State or Application State?

From time to time you be taken to a page in an application or return to a page in an application and you will notice that the application remembers certain aspects of the state of the page where you last left it. Maybe there are multiple tabs on the page and the last tab you had been viewing is still selected. The fact that the application remembers you at all is also a demonstration of the application "remembering" you is commonly referred to as "maintaining state". We will refer to this simply as "state" or "application state".

In .Net, what are reference types and value types?

In .Net, reference types are objects created from classes. *References types contain a pointer (reference) to an allocated memory area on the heap. Their default value is null.* These are destroyed by the Garbage Collector when they go out of scope and are no longer used. Value types are the built-in struct types like bool, int, decimal. *Value types hold the data within its own memory allocation. *The value is stored directly (so on the stack) and they are faster. *Their default value is 0 (zero).*

In C#, everything is an instance of a class or structure. What is the difference between a structure and a class?

In C#, a structure is a value type (primitive type in JS). var v1 = 5; var v2 = v1; // v2 is a copy of v1. changing v2 does not change v1. In C#, a class is a reference type var obj1 = new Obj(); var obj2 = obj1 // obj2 references obj1. changing obj2 changes obj1 because they both point to the same space in memory.

What are Indexes?

Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index in a database is very similar to an index in the back of a book.

What is Object-Oriented Programming (OOP)?

It is a type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects. One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify.

What is Model Binding? Why is it important?

Model binding introduces an abstraction layer that automatically populates controller action parameters, taking care of property mapping and type conversion code. It is important to data integrity. Reduces errors in mapping and type conversion.

What are the benefits of bundling code into individual software objects?

Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system. Information-hiding (Encapsulation): By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world. Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code. Pluggability and debugging ease: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement. This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace it, not the entire machine.

What is an Object?

Objects help divide and organize desired functions and features of a program. An object is an instance of a class. It is an entity (a software bundle) that has state (data) and behavior (code). By attributing state (current speed, current pedal cadence, and current gear) and providing methods for changing that state, the object remains in control of how the outside world is allowed to use it. It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Attributes and behavior of an object are defined by the class definition.

What are Nullable Types?

Represents a value type that can be assigned null. Nullable types allow the value to be set to NULL instead of the usual possible values of the data type.

Describe the Request-Response life cycle.

Request (comes in from View) (user calls a method on a class[controller]) | | Controller (retrieves the appropriate model[request model, services, etc]) | | View (visually represents the model) | | Reponse (displayed to the user)

Name 4 types of models.

Request Model > passed to an API or view controller Response Model > passed into an API controller and goes out to the browser View Controller > gets the JS file with HTML and CSS Domain Objects

In an MVC application, what information is used to route a request?

Route (URL) HTTP request (Type of request) Cookies Data sending over

What are SQL joins?

SQl joins are used to combine rows from two or more tables. Joins allow you to select only the info you want where two or more tables intersect.

What is Separation of Concerns?

Separation of concerns (SoC) is a design principle for separating a computer program into distinct sections, such that each section addresses a separate concern. A concern is a set of information that affects the code of a computer program. For example, object-oriented programming languages such as C#, C++, Delphi, and Java can separate concerns into objects, and architectural design patterns like MVC or MVP can separate content from presentation and the data-processing (model) from content. Encapsulation is used in SoC.

What is a DocType and when is it used?

Tells browser what type of document is contained in code. First line in HTMl before open element. <!DOCTYPE html>

What is the .Net Framework?

The .NET Framework is Microsoft's programming model for building applications that have user experiences, seamless and secure communication, and the ability to model a range of business processes.

What is the MVC Design Pattern?

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes. MVC separates web applications into 3 separate classes: Models for data Views for display Controllers for input Models: Classes that represent the data of the application and that use validation logic to enforce business rules for that data. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). Views: The view manages the display of information. Template files that your application uses to dynamically generate HTML responses. Controllers: Classes that handle incoming browser requests, retrieve model data, and then specify view templates that return a response to the browser.

What is a SQL UNION join?

The SQL UNION operator combines the result of two or more SELECT statements. The UNION operator selects only distinct values by default. To allow duplicate values, use the ALL keyword with UNION. The following SQL statement uses UNION ALL to select all (duplicate values also) German cities from the "Customers" and "Suppliers" tables: SELECT City, Country FROM Customers WHERE Country = 'Germany' UNION ALL SELECT City, Country FROM Suppliers WHERE Country='Germany' ORDER BY City;

In which namespace are all .NET collection classes are contained?

The System.Collections namespace contains all the collection classes.

What is Responsive Design?

The term responsive design refers to a specific design technique in which your site will shift around by using grids and flexible images. The goal is so it'll rearrange itself depending on the screen size the user is using while still keeping a great user experience across all devices. This is often how a site will look different on your phone than on your computer.

Why is this broken? <button id="mybutton" value="click me">click me</button> .... $("#mybutton").on("click", hideelement); var hideelement = function() { this.hide(); }

This function won't fire because 'hideelement' is not defined prior to calling it.

Describe what is happening with this INNER JOIN: SELECT Customers.CustomerID, Customers.CustomerName, Customers.ContactName, Orders.OrderID, Orders.OrderDate FROM [Customers] INNER JOIN [Orders] ON Customers.CustomerID = Orders.CustomerID ORDER by Orders.OrderDate DESC;

This join is selecting the CustomerID, CustomerName, and ContactName from the CUSTOMERS table and joining those columns with the OrderID and OrderDate columns from the ORDER table where the two tables intersect on the CustomerID column and then ordering the new table in descending order by OrderDate.

What is the purpose of routing?

To find a controller method. The route maps a URL to a controller. Routing is the process of taking a URI endpoint (that part of the URI which comes after the base URL) and decomposing it into parameters to determine which module, controller, and action of that controller should receive the request.

What do you use to debug C#? How do you start a debug session? Are there multiple ways? What are breakpoints?

Use Visual Studio

How do you capture the first time the html document is ready to be manipulated? Write out two different ways to accomplish this task.

Use jQuery function $(document).ready(); $(document).ready(); > will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute. $(window).onload(); > will run once the entire page (images or iframes), not just the DOM, is ready.

Model Binding uses the ActionResult method with 'try' and 'catch'.

[HttpPost] public ActionResult Create(Student student) { try { if (ModelState.IsValid) { studentsList.Add(student); return RedirectToAction("Index"); } } catch { return View("Create"); } return View("Create"); }

How to make a call to a database.

private void CallDatabase() { SqlConnection conn = new SqlConnection("connection string in here"); conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = "stored proc name"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@nameofParam", new object()); // the cmd.ExecuteReader is the call used by the ExecuteCommand that you use to map/hydrate Domain objects IDataReader reader = cmd.ExecuteReader(); while(reader.Read()) { //read data/map data } conn.Close(); //have a nice day }

public class Contact { public string FirstName { get; set; } public string LastName { get; set; } public int Age { get; set; } } Decorate this class to the following specs:F/L Name should be at least 3 chars long and no more than 50. Age should be at least 18 years old.

public class Contact { [MinLength = 3, MaxLength = 50] public string FirstName { get; set; } [MinLength = 3, MaxLength = 50] public string LastName { get; set; } [Range(18, Int32.MaxValue] public int Age { get; set; } }

Write out the .Net class for that Contact object in the previous slide. If this class was going to participate in Model binding in the MVC request life cycle, is it currently set up to report as invalid when no data is sent to the Server? (Assuming F/L Name is required). What would you have to do to make this model report as "Invalid" in such case?

public class Contact { public string FirstName { get; set; } public string LastName { get; set; } public int Age { get; set; } } This class is currently not set up to report invalid. Would need to add validation attributes such as [Required], [StringLength(6, MinimumLength = 3)] or a RegEx like [RegularExpression(@"(\S)+", ErrorMessage = "White space is not allowed.")]

How do you find duplicate names in a list of Names?

public static void check(string[] arr) { Dictionary<string, int> names = new Dictionary<string, int>(); foreach (string name in arr) { if (!names.ContainsKey(name)) { names.Add(name, 0); } } }

Give examples of primitive methods.

var name = "Taylor"; var firstLetter = name.charAt(0); var middleOf Name = name.substring(3, 4) var count =10; NOTE: Null and Undefined types do not have methods.

Write out the JSON for the following Contact Object Bob Smith is 30 years old and has two direct reports. They are Sally Smith, 30 y/o and Jane Doe 34 y/o String FirstName String LastName IntAge Contacts[] Reports

{ "firstName": "Bob", "lastName": "Smith", "age": 30, "contactReports": [ { "firstName": "Sally", "lastName": "Smith", "age": 30, }, { "firstName": "Jane", "lastName": "Doe", "age": 34 }, }

Example of a JSON representation of a person

{ "firstName": "John", "lastName": "Smith", "isAlive": true, "age": 25, "height_cm": 167.6, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100" }, "phoneNumbers": [ { "type": "home", "number": "212 555-1234" }, { "type": "office", "number": "646 555-4567" } ], "children": [], "spouse": null }

What are the differences between an Api Controller and "regular" Controller in the .Net MVC?

API Controller is concerned with the data and routing that data, while the Controller is concerned with the view (content).

What is ASP.NET?

ASP.NET is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.

What do you use to debug JavaScript? What do you look for when debugging JavaScript?

Firebug and Developer Tools in the browser. Error messages, .Net tab

Describe the relationship between HTML, CSS and JavaScript?

HTML is the markup and tags, CSS designs the HTML for the user's view, and JavaScript gives HTML functionality.

What are HTTP Headers?

HTTP headers are metadata that gets sent over with a request. Includes info about the computer, such as browser used)

When would you use a Nullable Type?

NULL is frequently used to represent a missing value or invalid value, such as from a function that failed to return or a missing field in a database, as in NULL in SQL.

What is the major difference between the *While* loop and the *Do* loop?

The condition of the *While* loop is evaluated before it enters the code block. The *Do* loop evaluates the condition after the loop has executed, which makes sure that the code block is always executed at least once.

How do you know if your jQuery selector found any matching elements?

Use .length method on the object

How do you access the underlying value of a Nullable Type?

Use the GetValueOrDefault() method in C# if obj.val, then obj.hasValue

Write a JavaScript function that will console.log out "Fizz Buzz"; divisible by 2 = Fizz, divisible by 3 = Buzz, divisible by 3 & 2 = Fizz Buzz

function(){ for(var a = 1; a <= 100; a++){ if (a % 2 == 0 && a % 3 == 0){ console.log("Fizz" + " " + "Buzz"); } else if (a % 2 == 0){ console.log("Fizz"); } else if (a % 3 == 0) { console.log("Buzz); } }

What is Dependency Injection(DI)?

http://www.jamesshore.com/Blog/Dependency-Injection-Demystified.html Dependency Injection (DI) allows you to inject objects into a class, rather than relying on the class to create the object itself. That would "inject" the "dependency" into the class. Now when we use the variable (dependency), we use the object that we were given rather than the one we created. DI facilitates Inversion of Control(IoC). C# and Angular use DI

What are the principles of object-oriented programming (OOP)?

*Inheritance* Rather than duplicate functionality, inheritance allows an object to inherit functionality from another class. Object-oriented programming allows classes to inherit commonly used state and behavior from other classes. *Polymorphism* The concept that a single method can behave differently depending on the type of the object that calls it. Allows you to use an entity in multiple forms. There are 2 basic types of polymorphism. Overridding, also called run-time polymorphism, and overloading, which is referred to as compile-time polymorphism. *Abstraction* Refers to the process of exposing only the relevant and essential data without showing unnecessary information. Reduces complexity by focusing on what's important for the purpose of the application. *Encapsulation* Prevents the data from unwanted access by binding of code and data in a single unit called object. Encapsulation hides the details of abstraction implementation.


Ensembles d'études connexes

D127 Module 2: Math for Elementary Educators

View Set

Anki: 7,000 Sentences, French (1-2000)

View Set

FIN: Ch 13 Return, Risk, and the Security Market Line

View Set

Atmosphere Unit 3 Lesson 2 pages 146-151

View Set

Demand Forecasting Measures of Accuracy

View Set

pharmceutics exam 2 (1-45: 2013) (46-90: 2018)

View Set

Abeka: American Literature Appendix Quiz N

View Set

ISYS 271 Network+ Final Exam Study, All Quizzes

View Set