Flashcards
Front-end Developer Concepts 1
Flashcards do conjunto (39)
- 1What type of language is Javascript?Multi-paradigm
- 2What types of programming does JavaScript support?Imperative/Procedural
Object Oriented (OOP)
Functional - 3JavaScript supports OOP with...Prototypal inheritance
- 4What are the two pillars of JavaScript?Prototypal Object Oriented programming
and
Functional programming - 5What is functional programming?Functional programming produces programs by composing mathematical functions
- 6Functional programming avoids...Shared State and Mutable Data
- 7Name some essential functional programming concepts that were added to JavaScript in ES5Pure functions
Avoidance of side-effects
Simple function composition - 8Name some features that support functional programmingFirst-class functions
Higher order functions
Functions as arguments/values - 9What are the two types of inheritance in JavaScript?Classical and Prototypal
- 10Describe class inheritanceInstances inherit from classes, like a blueprint - a description of the class, and create sub-class relationships called hierarchical class taxonomies.
- 11In class inheritance instances are generally instantiated via...Constructor functions with the 'new' keyword. It may or may not use the 'class' keyword from ES6.
- 12Describe prototypal inheritanceInstances inherit directly from other objects.
- 13In prototypal inheritance instances are generally instantiated via...Factory functions or 'Object.create()'
- 14In prototypal inheritance instances may be......composed of many different objects, allowing for easy selective inheritance.
- 15In JavaScript __________ inheritance is simpler and more flexible than __________ inheritance.Prototypal is simpler & more flexible than class inheritance.
- 16Name one pro of OOPEasy to understand basic concept of objects and easy to interpret the meaning of method calls.
- 17OOP tends to use _________ style rather than _________ styleImperative rather than declarative, which read like a straight-forward set of instructions for the computer to follow.
- 18Name one con of OOPOOP typically depends on shared state. Objects and behaviors are tacked together on the same entity which may lead to undesirable behavior such as race conditions.
- 19Name one pro of functional programmingAvoid shared state or side-effects, eliminating bugs caused by multiple functions competing for the same resources (like in OOP)
- 20In functional programming functions tend to be...Radically simplified and easily recomposed for more generally reusable code compared to OOP.
- 21Name one con of functional programmingOver exploitation of FP features like point-free style and large comps can reduce readability due to over abstraction.
- 22When is classical inheritance an appropriate choice?Almost never and certainly never more than one level.
- 23Multi-level class hierarchies are an...Anti-pattern
- 24When is prototypal inheritance an appropriate choice?There is more than one type of PI, each has its own set of use-cases, but all of them are equally useful in their ability to enable composition.
- 25Name three types of prototypal inheritanceDelegation (i.e. prototype chain)
Concatenative (i.e. mixins, 'Object.assign()')
Functional - 26Describe functional prototypal inheritanceA function used to create a closure for private state/encapsulation.
- 27Why would you favor object composition over class inheritance?To avoid:
Class hierarchies
Brittle base class problem
Tight coupling
Rigid taxonomies
Makes code more flexible. - 28What is two-way data binding?UI fields are bound to model data dynamically such that wen a UI field changes, the model data changes with it and vice versa.
- 29What is one-way data flow?The model is the single source of truth. Changes in the UI trigger messages that signal user intent to the model. Only the model has the access to change the app's state.
- 30One way data flows are...Deterministic
- 31__________ is a popular framework which uses two-way data binding.Angular
- 32____________ is the new canonical example of one-way data flow.React
- 33What is asynchronous programming?Async programming means that the engine runs in an event loop.
- 34What happens when a blocking operation is needed in async programming?The request is started and the code keeps running without blocking for the result. When a response is ready an interrupt is fired which causes an event handler to be run.
- 35In async programming a single program thread can handle...Many concurrent operations due to the lack of blocking operations.
- 36User interfaces are ______ by nature, and spend most of their time waiting for ________Async by nature, waiting for user input to interrupt the event loop and trigger event handlers.
- 37What is synchronous programming?Barring conditionals and function calls, code is executed sequentially from top-to-bottom, blocking on long-running tasks such as network requests.
- 38Node is _______ by defaultAsync by default, waiting in a loop for a network request, and accepting more incoming requests while the first one is being handled.
- 39—
Informações
- Descrição
- FlashCards sobre Front-end Developer Concepts 1, criado por Jeff Scotti em 07-10-2018.
- Criado por
- Jeff Scotti
- Visualizações
- 1
- Avaliação