JavaScript

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

What is a callback function?

A callback function is any function to be called at a later time, whether by the browser in the event-handling phase or by other code

Is the browser execution model single-threaded or multi-threaded?

Single-threaded

Prototype

The Prototype JavaScript Framework is a JavaScript framework created by Sam Stephenson in February 2005 as part of the foundation for AJAX support in Ruby on Rails. It is implemented as a single file of JavaScript code, usually named prototype.js. Prototype is distributed standalone, but also as part of larger projects, such as Ruby on Rails, script.aculo.us and Rico.

Three.js

Three.js the aim of the project is to create a lightweight 3D library with a very low level of complexity. The library can be used in conjunction with the HTML5 <canvas>, <svg>, CSS3D and WebGL renderers. It has been popularized as one of the most important for creating animations WebGL.

TypeScript

TypeScript is a super-set of the JavaScript language that introduces types (plus interfaces and new JavaScript features). It allows type-checking during development time with supported editors such as Visual Studio. The compiler requires information about the "shape" of a module in a type-definition-file.

VueJS

VueJS is a JavaScript library for creating user interfaces (views) based on underlying data-models. Instead of only updating user data in the DOM, a data-model will be in sync to reflect the changes. Vue works through reactive data-binding. It means when you update for example a form-field, the underlying data-model is updated automatically. When other parts of the website are also bound to the same data-model, its content will update immediately.

XHR

XMLHttpRequest is an API that provides client functionality for transferring data between a client and a server. It provides an easy way to retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just a part of the page without disrupting what the user is doing.

What is jQuery?

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and AJAX much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.

What is hoisting?

"Hoisting" is an action performed by the JavaScript interpreter that moves function declarations of the form function foo() {}, and variable declarations of the form var foo; to the top of their containing scope. During this process, only the actual declarations are moved; any value assignments are left in the place where they were written.

AngularJS

AngularJS is a structural framework for dynamic web apps. It lets developers use HTML as their template language and lets them extend HTML's syntax to express their application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code developers would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.

Arity

Arity (from Latin) is the term used to refer to the number of arguments or operands in a function or operation, respectively. You're most likely to come across this word in the realm of JavaScript when it's used to mention the number of arguments expected by a JavaScript function. There's even a property named arity, of the Function object that returns the number of expected arguments in a function. It's now obsolete though and replaced by length.

What is CoffeeScript?

CoffeeScript is a little language that compiles into JavaScript. It is an attempt to expose the good parts of JavaScript in a simple way and friendly syntax, the golden rule being: "It's just JavaScript". The code compiles one-to-one into the equivalent JavaScript, and there is no interpretation at runtime. The compiled output is readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.

What is CommonJS

CommonJS is a project with the goal of specifying an ecosystem for JavaScript outside the browser (for example, on the server or for native desktop applications). Server side JavaScript has been around for a long time, and potentially offers some unique and interesting advantages over other languages because the same language is spoken by both client and server. Unfortunately, though, server-side JavaScript is very fragmented. A script that accesses files can't be used without modification on both rhino and V8. Spidermonkey and JavaScriptCore can't both load in additional modules in the same way. A JavaScript web framework is very much tied to its interpreter and is often forced to create a bunch of APIs that Python, Ruby and Java programmers take for granted. The goal of this project is to create a standard library that will ultimately allow web developers to choose among any number of web frameworks and tools and run that code on the platform that makes the most sense for their application.

Pure Function

A pure function is a paradigm from the Functional Programming world. The main idea is that a pure function respects the following properties: For a given input, it will always produce the same output. It doesn't produce any side-effect. It doesn't rely on any external state.

AMD

AMD is a standard defining how to load JavaScript libraries or modules asynchronously AMD stands for Asynchronous Module Definition. It is an alternative to CommonJS (CJS) specification. The API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross-domain access problems.

AJAX

Ajax is a technique for creating seamless interactive websites via asynchronous data exchange between client and server. Ajax facilitates communication with the server via partial page updates instead of the traditional full-page refresh.

What is isomorphic?

An isomorphic (or preferably universal) application is one whose code (in this case, JavaScript) can run both in the server and the client. The underlying idea is to allow the server to render and handle routing of an application for non-JavaScript users, while also making it fully working in the browser for fast interactions without involving traditional page reloads. In an isomorphic application, the initial request made by the web browser is processed by the server while subsequent requests are processed by the client.

Node.js

An open-source, cross-platform runtime environment for developing server-side web applications built on Chrome's V8 JavaScript engine. These applications are written in JavaScript and can be run within the Node.js runtime. Node.js uses an event-driven, non-blocking I/O (input/output) model that makes it lightweight and efficient as well as optimized for real-time web applications' throughput and scalability. Its work is hosted and supported by the Node.js Foundation, a collaborative project at Linux Foundation.

What is Memoization?

An optimization used to speed up consecutive function calls by caching the result of calls with identical input.

Polymer

With Google's Polymer library you can extend the vocabulary of HTML with your own custom elements (also known as Web Components) that can carry their own CSS styling and JavaScript code. Once created, these elements can be reused and composed together with other native or custom HTML elements.

npm

npm is a utility to help publishing packages to, and installing from, an npm repository. The repository npmjs.com is the best known, and contains many useful community written and tested packages.

nvm

nvm is a utility to help run multiple versions of Node.js (and its branches) on the same machine. It can install, list, and choose versions. It is analogous to RVM (Ruby Version Manager).

What is the Factory pattern?

In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor.

What is Lodash? Needs cleanup

Lodash is a small modularized library which provides a bunch of helpers to work with Javascript data types (string, object, etc.) in a much more simpler way. Every single helper can be required and used itself without requiring the whole library. Additionally, it makes Javascript code look elegant and more efficient by offering functional style, method chaining and more. Think of Lodash as an utility library to simplify Javascript development by providing functions for Javascript basic types, such as: Array manipulations: map, reduce, filter, merge, difference... String transformations: capitalize, camelCase, truncate, template... Collection querying: find, where, contains, any, all... Object manipulations: pick, omit, forIn, pluck... Property getters and setters: property, method, get, set... Functional programing utilities: partial, curry, compose, debounce...

What is MEAN?

MEAN is a software technology stack based on JavaScript for building web sites and web applications, and comprised of the following components: MongoDB, ExpressJS, Node.js, and AngularJS.

What is Metalsmith?

Metalsmith is an abstraction for manipulating a directory of files. To put it simply, it is a static site generator. Metalsmith, at its core, takes files in a source directory, perform operations on them via plugins, and writes those files into a destination directory. Plugins can do virtually anything: create new files, filter out files, modify files based on some logic, etc (note this means that plugin order does matter; transformations done by one plugin can be seen and used by following plugins, making the process a modular build pipeline). The entire ecosystem of plugins is what makes Metalsmith so flexible.

Nightmare

Nightmare is a high-level browser automation library. The goal is to expose just a few simple methods, and have an API that feels synchronous for each block of scripting, rather than deeply nested callbacks. It is designed for automating tasks across sites that do not have APIs. Under the cover, it uses Electron, which is similar to PhantomJS but faster and more modern.

NightwatchJS

NightwatchJS is an extensible, open-source JavaScript testing framework that runs in Node.js. It has clean syntax, a built-in test runner, support for Cloud providers such as SauceLabs or BrowserStack, continuous integration such as Teamcity, Jenkins etc. NightwatchJS also supports CSS and XPath selectors.

Passport.js

Passport.js is a simple authentication middleware for Node.js that is express compatible. It focuses primarily on authentication requests through a comprehensive list of strategies including username and password credentials, OAuth (Facebook, Twitter, Google+) and SAML. These strategies are packaged as individual modules to prevent unnecessary dependencies. Passport is also designed to be flexible as it does not mount route and database independent. The API is simple: you provide Passport a request to authenticate, and it provides hooks to control what occurs when authentication succeeds or fails.

PhantomJS

PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selectors, JSON, Canvas, and SVG. Use Cases: - Headless web testing. Lightning-fast testing without the browser is now possible! Various test frameworks such as Jasmine, Capybara, QUnit, Mocha, WebDriver, YUI Test, BusterJS, FuncUnit, Robot Framework, and many others are supported. - Page automation. Access and manipulate web pages with the standard DOM API, or with usual libraries like jQuery. - Screen capture. Programmatically capture web contents, including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. - Network monitoring. Automate performance analysis, track page loading and export as standard HAR format. Features: - Multiplatform, available on major operating systems: Windows, Mac OS X, Linux, and other Unices. - Fast and native implementation of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation! - Pure headless (no X11) on Linux, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io. - Easy to install: Download, unpack, and start having fun in just 5 minutes.

PostCSS

PostCSS is a tool to transform CSS styles using JavaScript plugins. Popular plugins include autoprefixer, future CSS transpiling, CSS linting and media queries. Autoprefixer helps developer to automatically generate vendor specific prefixes. Take a look at the interactive demo of Autoprefixer in action POSTCSS-cssnext is a PostCSS transpiler plugin that transforms new CSS specs into CSS that is more compatible with browsers. This includes CSS nesting, custom selectors and media queries.

Canvas

The Canvas HTML-Element allows access to individual pixels to enable fast drawing applications. Its API gives access to WebGL for 3D graphics and to the 2D drawing API

What is Closure Compiler?

The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.

True or False: NaN == NaN

false

Apache Cordova

Cordova enables software programmers to build applications for mobile devices using JavaScript, HTML5, and CSS3, instead of relying on platform-specific APIs like those in Android, iOS, or Windows Phone. It enables wrapping up of CSS, HTML, and JavaScript code depending upon the platform of the device. It extends the features of HTML and JavaScript to work with the device. The resulting applications are hybrid, meaning that they are neither truly native mobile application (because all layout rendering is done via Web views instead of the platform's native UI framework) nor purely Web-based (because they are not just Web apps, but are packaged as apps for distribution and have access to native device APIs). Mixing native and hybrid code snippets has been possible since version 1.9.

In what order are events from the event queue processed?

FIFO (First In First Out) - like a queue

What is JSHint?

JSHint was created as a more configurable version of JSLint (of which it is a fork). You can configure every rule, and put them into a configuration file, which makes JSHint easy to use in bigger projects. JSHint also has good documentation for each of the rules, so you know exactly what they do.

Universal

A universal (or isomorphic) application is one whose code (in this case, JavaScript) can run both in the server and the client. The underlying idea is to allow the server to render and handle routing of an application for non-JavaScript users, while also making it fully working in the browser for fast interactions without involving traditional page reloads. In a universal application, the initial request made by the web browser is processed by the server while subsequent requests are processed by the client.

Bower

Bower is a package manager for front-end dependencies. It takes care of hunting, finding, downloading, saving these dependencies and keeping track of them in a manifest file called bower.json. Bower uses a flat dependency tree, requiring only one version for each package, reducing page load to a minimum.

What is the DOM?

DOM (for Document Object Model) is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page. This is an overview of DOM-related materials here at W3C and around the web.

What is Flux?

Flux is an application structure that is developed and used at Facebook to complement React's one-way data flow. With Flux, application state and logic are contained in stores.

Redux

Redux is a predictable state container for JavaScript apps, which is a fancy way of saying it controls application state and state mutations. It does so by keeping state in a store, which is the single source of truth. Redux is an alternative to Flux and used a lot together with React, but you can use it with any other view library.

Webpack

Webpack helps you manage dependencies in your project, and also offers a friendly and fast development environment, simplifying a lot of common tasks behind a simple configuration file. It also allows you to bundle your modules into static assets for browsers. Its killer feature is known as hot module replacement, which lets your live code in the browser update automatically as you change files in your preferred editor without a page reload.

What is CouchDB?

Apache CouchDB, commonly referred to as CouchDB, is an open source database that focuses on ease of use and on being "a database that completely embraces the web". It is a document-oriented NoSQL database that uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. CouchDB was first released in 2005 and later became an Apache project in 2008.

What is CORS?

CORS stands for Cross Origin Resource sharing. It's a way for a server to allow pages hosted on other domains (technically other origins) to make http requests to it. A web page can usually embed images, scripts, video, audio, etc. from any location it wants. However, web fonts and AJAX requests can usually only make requests to the same origin the web page is served from, because of the same-origin policy. CORS allows a server to mark resources as shared with other origins, by sending an Access-Control-Allow-Origin header in response to an OPTIONS request from the browser.

Singleton Pattern

In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects. The term comes from the mathematical concept of a singleton. The Singleton Pattern limits the number of instances of a particular object to just one. This single instance is called the singleton. Singletons are useful in situations where system-wide actions need to be coordinated from a single central place. An example is a database connection pool. The pool manages the creation, destruction, and lifetime of all database connections for the entire application ensuring that no connections are 'lost'. Singletons reduce the need for global variables which is particularly important in JavaScript because it limits namespace pollution and associated risk of name collisions. The Module pattern is JavaScript's manifestation of the Singleton pattern.

What is JSON-LD?

JSON-LD (JSON for Linked Data) is a lightweight Linked Data format. It is easy for humans to read and write. It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases such as CouchDB and MongoDB.

What is Knockout?

Knockout (shortened as KO) is a JavaScript library that helps developers creating rich, responsive display and editor user interfaces with a clean underlying data model. Knockout helps implementing sections of UI that update dynamically (e.g. changes depending on user's actions or when external data source gets updated) more simply and maintainably.

What is the only value that is not equal to itself

NaN

Q

Q is a promise library providing many more utilities than the native Promise implementation. List of features: - Deferred values (old school): Q.defer - Multiple promises handling: Q.all, Q.any, Q.spread - Promise creation, resolve and reject: Q(value), Q.when(value), Q.reject(value) - Convert properties to promises: Q.get, Q.set - Convert functions to promises: Q.fcall, Q.invoke - Convert node-based callbacks to promises: Q.nfcall, Q.ninvoke - Convert timeout functions: Q.timeout - Support notify functions - Support chaining and tapping

QUnit

QUnit is a JavaScript unit testing framework. While heavily used by the jQuery Project for testing jQuery, jQuery UI and jQuery Mobile, it is a generic framework to test any JavaScript code. It supports server-side (e.g. node.js) and client-side environments. QUnit's assertion methods follow the CommonJS unit testing specification, which itself was influenced to some degree by QUnit.

Sails

Sails is a web framework that makes it easy to build custom, enterprise-grade Node.js apps. It is designed to resemble the MVC architecture from frameworks like Ruby on Rails, but with support for the more modern, data-oriented style of web app development. It's especially good for building realtime features like chat.

Virtual DOM

The Virtual DOM is a concept pioneered by React but since duplicated in other places including in its own library. With Virtual DOM, rather than modifying the DOM directly (or through some library), you create a set of JavaScript objects that represent the DOM that you would like. A simplistic example might be something like this { nodeType: "DIV", className: "container hero", children: [ { nodeType: "H1", chidren: [ { nodeType: "TEXT", textContents: "Welcome!!!", ], ], } When rendering, this model gets modified (and is often regenerated fully) by application code and passed to a diffing algorithm to identify what needs to change. These changes are then passed to the library which applies them to the DOM. The Virtual DOM is therefore: Method(s) for creating this JavaScript representation of the visual tree A diffing algorithm A set of handlers which can apply patches generated by the diffing algorithm This approach can have significant peformance benefits as the library can optimize rendering in ways that browsers would have difficulty with; for example by batching changes together or chosing to not apply a change if it is undone by one further along in the batch. Virtual DOM is also known for granting code-maintainability benefits. Typically the Virtual DOM is immutable and regenerated fully every time any change is made. Therefore, at its heart, all of rendering is a single function that transforms an input of application state to a Virtual DOM tree. This statelessness can make debugging and testing of rendering code very straightforward as you only need to consider the input and output, not any previously rendered states. A final benefit, is that since the Virtual DOM representation is just JavaScript, it can be output in formats other than a sequence of DOM manipulations. For example isomorphic JavaScript will render it as an HTML string which can be returned from a web request with the client-side app effectively "running" on the server (useful for loading the first page as rapidly as possible or for clients with JavaScript disabled).

UMD

UMD is a pattern of universal module definition for JavaScript modules. These modules are capable of working everywhere, be it in the client, on the server or elsewhere. The UMD pattern typically attempts to offer compatibility with the most popular script loaders of the day (e.g RequireJS amongst others). In many cases it uses AMD as a base, with special-casing added to handle CommonJS compatibility.

Underscore

Underscore is a small library which provides many helpers to write JavaScript in a more functional way without extending built-in prototypes. It may be seen as the swiss army knife of JavaScript development, as it provides a helper for most API shortcomings of built-in objects.

v8

V8 is Google's open source, high performance JavaScript engine. It is written in C++ and is used in Google Chrome and other projects. V8 compiles and executes JavaScript source code, handles memory allocation for objects, and garbage collects objects it no longer needs. Check out the Github repository for more information.

Vanilla

Vanilla (aka VanillaJS) is a name to refer to using plain JavaScript without any additional libraries like jQuery. Other names are Plain Old Javascript or Core Javascript. It is sometimes ironically referred to as a library, as a joke for people who could be seen as mindlessly using different frameworks. Some people have gone so far to release this library, usually with an empty or comment-only JS file.

WebGL

WebGL (for Web Graphics Library) is a cross-platform, royalty-free web standard for a low-level 3D graphics API based on OpenGL ES 2.0, exposed through the HTML5 Canvas element as Document Object Model interfaces. Developers familiar with OpenGL ES 2.0 will recognize WebGL as a Shader-based API using GLSL, with constructs that are semantically similar to those of the underlying OpenGL ES 2.0 API. It stays very close to the OpenGL ES 2.0 specification, with some concessions made for what developers expect out of memory-managed languages such as JavaScript. WebGL does so by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 <canvas> elements.

Yeoman

Yeoman is both a generator builder and an ecosystem. A generator is basically a plugin which will generate files based on user input. Plugins can be run with the yo command to scaffold complete projects or useful parts. Therefore, the goal of a Yeoman generator is usually (but not necessarily) to speed up the setup and installation process of a project or part of a project by packaging it inside a module that can be configured through a question/reply workflow from the command line.

Zepto

Zepto is a lightweight DOM library in the same flavor of jQuery but much lighter. Its main purpose is to provide a faster implementation for people that do not intend to support all browsers and do not need to have all of jQuery's features.

Which two JavaScript values do not have properties?

null and undefined

What are the data types in JavaScript?

number, string, Boolean, function, object, undefined

rnpm

rnpm is built to ease React Native development by automatically linking native dependencies to your iOS/Android project.

Promise

A Promise represents a value that may not be available yet but will eventually be resolved at some point in the future. The point is to allow developers to write asynchronous code in a more synchronous fashion, escaping from the popular callback hell. Promises are not fully supported in all browsers yet (see support), however a lot of libraries mimick their behavior to make them usable right away; Bluebird is one of them.

What is a closure?

A closure is a function that closes over its environment. It has access to the state of the environment, but the variables inside the closure are private. Example: (function (){ var scopeVar = 'Hello'; (function closure(){ var closureVar = ' World'; console.log(scopeVar + closureVar); })(); })(); scopeVar is accessible inside the outer and the inner function, but closureVar is only accessible inside the inner function.

BEM

BEM is a methodology and libraries developed and used at Yandex for building user interfaces. Key concepts of methodology Block: logically and functionally independent page component, encapsulates behavior (JavaScript), templates, styles (CSS), and other implementation technologies Element: a constituent part of a block that can't be used outside of it (For example, a menu item) Modifier: defines the appearance and behavior of a block or an element BEM methodology solves common frontend problems: - Component approach (splitting interface into blocks). - How to name things (in code and on filesystem). - How to reuse components (for JS / CSS and all other techs) — for example you can take bem-core library (a collection of common blocks and solutions). - How to describe components behaviour — i-bem.js library that allows you describe a block logic in declarative style and keep it loosely coupled with others. - How to generate HTML — declarative template engine bem-xjst for server and browsers. - How to manage components dependencies and build project — ENB builder.

Babel

Babel (formerly 6to5) is essentially an ECMAScript 2015 (ES6) and beyond transpiler. It means that it is a program that translates future's JavaScript into today's widely understood (by browsers) JavaScript. The idea behind such a tool is to allow developers to write their code using ECMAScript's new features while still making it work in current (and past) environments. As of version 6, Babel also intends to be a platform, a suite of tools designed to create the next generation of JavaScript tooling. This means Babel is also supposed to power minifiers, linters, formatters, syntax highlighters, code completion tools, type checkers, codemod tools, and every other tool to be using the same foundation to do their job better than ever before.

Backbone

Backbone.js is a framework giving structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to existing APIs over a RESTful JSON interface.

Bluebird

Bluebird is a fully featured promise library with focus on innovative features and performance. It means that it is a tool that completes and reinforces the behavior of JavaScript promises.

Broccoli

Broccoli is a fast, reliable asset pipeline, supporting constant-time rebuilds and compact build definitions. Comparable to the Rails asset pipeline in scope, though it runs on Node.js and is backend-agnostic.

Browserify

Browserify is a tool that allows you to use the require Node.js function while working for the browser by bundling up all the required dependencies. The idea behind Browserify is to make it possible to use existing libraries from npm even when writing code for the client side. To allow this, it goes through the code, request the required dependencies, then create a single file containing everything: both the dependencies and the code using them.

Brunch

Brunch is a builder. Not a generic task runner, but a specialized tool focusing on the production of a small number of deployment-ready files from a large number of heterogenous development files or trees. Brunch is fundamentally specialized and geared towards building assets, these files that get used in the end by the runtime platform, usually a web browser. It thus comes pre-equipped with a number of behaviors and features such as concatenation, minification and watching of source files.

What is Chai?

Chai is a Behavior Driven Development (BDD) / Test Driven Development (TDD) assertion library for Node.js and the browser. It can be paired with any JavaScript testing framework, such as Mocha. The Chai assertion library allows you to write assertions in the classical form: assert.typeOf(foo, 'string'), but where Chai shines is its chain-capable style which makes writing assertions very readable: expect(foo).to.be.a('string').

What is Chakra?

Chakra is a JavaScript engine that powers Microsoft Edge and Windows applications written in HTML/CSS/JS. Chakra is open-sourced as ChakraCore and can optionally be used with Node.js instead of V8.

What is currying?

Currying is the technique of translating the evaluation of a function that takes N arguments into evaluating a sequence of N functions, each with a single argument. This process is done by calling the function with one parameter, and return a new function with the parameter already bound inside a closure. For example, let's say we have an add function that takes two parameters a and b: // The native function definition would be to have a and b as parameters: add(3, 5) // After currying the function, we can then apply it like so: curryAdd(3)(5) This is an interesting technique allowing to partially call a function, leaving the rest of the call for later. For instance, with our previous curryAdd function: var add3 = curryAdd(3); var add10 = curryAdd(10); // Then we can call add3(5) // => 8 add10(5) // => 15 Lodash, Wu and Ramda are 3 of the many libraries that provide currying.

What is D3.js?

D3.js is a library for manipulating documents based on data. D3 helps bringing data to life using HTML, SVG, and CSS. Its emphasis on web standards gives the full capabilities of modern browsers without tying to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.

What is ECMAScript?

ECMAScript (shortened as ES) is the standardized specification of the scripting language used by JavaScript, as well as less known languages JScript and ActionScript. The versioning convention of ECMAScript has been the subject of hot debates. We often refer to ES5 (understood by most browsers), ES6 (the future of JavaScript) and even ES7 (the far future of JavaScript), but the official appellation for ES6 would actually be ES2015. The intention is to publish a version of the specification every year, making the language evolve quicker than ever. Still, most developers use ES5 and ES6 terms.

What is ESLint?

ESLint is the most recent out of the JavaScript linters out there. It was designed to be easily extensible, comes with a large number of custom rules, and is easy to install more in the form of plugins. It gives concise output, but includes the rule name by default so you always know which rules are causing the error messages. There are two very popular ready to use configuration for ESLint: standard (no semicolons) and semistandard.

What is Electron?

Electron is a framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used in the Atom editor.

What is Ember?

Ember is an application framework based on the model-view-controller pattern. By incorporating common patterns and idioms into the framework it aims to allow developers to create ambitious web applications quickly and easily. A side-effect of these abilities (either negative or positive depending upon the readers point of view) is that a certain conformity of naming and structure within those applications is expected. A key aim of the Ember project is that backward compatibility is an important feature of the framework so that applications may be built with Ember in the knowledge that future releases of the framework will not break those applications. Ember relies upon the following core concepts: - Templates: Ember.js templates use handlebars style syntax and are used to integrate data with pre-written HTML. - Models: In Ember.js models allow the objects which the web application makes use of to be persisted. - Components: Components are used to define the behavior of the user interface in Ember.js. By combining a template and some javascript a component works to produce a representation which is useful to the web application user. - Routes: A route loads a component, a template and, optionally, some models. The resulting HTML is then rendered to the user agent. - The Router: Maps a URL to a given route.

What is Enzyme?

Enzyme is a JavaScript Testing utility for React developed by AirBnB that makes it easier to assert, manipulate, and traverse React components' output.

What is Express?

Express is a fast, un-opinionated, minimalist web framework for Node.js. Express provides a thin layer of fundamental web application features, without obscuring Node.js features that developers already know and like. The myriad of HTTP utility methods and middleware provided by Express makes creating a robust API quick and easy.

What is Falcor? Needs more info

Falcor is a JavaScript library for efficient data fetching.

What is Flow?

Flow is a static type checker for JavaScript. It can be used to catch common bugs in JavaScript programs - such as silent type conversions, null dereferences and so on - often without requiring any changes to your code. It also adds type syntax to JavaScript, so that developers can express invariants about their code and have them maintained automatically. Flow's type checking is opt-in: files are not type checked unless you ask it to. This means that you can gradually convert your JavaScript codebase to Flow while reaping incremental benefits. When you do opt-in a file, Flow tries to type check the code automatically by performing type inference, reporting errors without further manual guidance. This simple workflow is usually sufficient when your codebase is broken down into small files, each defining a module that exports a well-defined interface. However, for some files (e.g., monolithic libraries), the analysis Flow performs might turn out to be too imprecise, causing lots of spurious errors to be reported. In such cases, the developer can either try to manually guide Flow with type annotations, or switch to a weaker mode with limited type inference to reduce noise. Flow's type checking is online: it performs an initial analysis of all files in a code base, and then monitors those files for subsequent changes, type checking them and other dependencies piecemeal and proactively in the background. For the developer, this means that there are no perceptible compile-time delays; saving a bunch of files in an editor or rebasing a set of files in a repository automatically triggers type checking, storing the results in a persistent server, so that they are available instantaneously when queried.

What is Four?

Four is a high level graphics API based on WebGL 1.0 for developing 3D content for the web. It lets you avoid the burden of repetition and complexity to speed up and simplify the development while exposing the flexibility of the WebGL API.

What is Grunt?

Grunt is a task runner aiming at automating tedious and possibly complex tasks. The idea behind Grunt (and its peer Gulp) is to define tasks that perform (usually file-based) actions. These tasks can then be run through the command line or as part of another build step.

What is Gulp?

Gulp is a task runner aiming at automating tedious and possibly complex tasks. The idea behind Gulp (and its peer Grunt) is to define tasks that perform (usually file-based) actions. These tasks can then be run through the command line or as part of another build step. Gulp also owes its success to its very large ecosystem of plugins, making it easy to perform everyday's tasks without having to write much code.

What is Hapi?

Hapi is a simple to use configuration-centric framework with built-in support for input validation, caching, authentication, and other essential facilities for building web and services applications. Hapi enables developers to focus on writing reusable application logic in a highly modular and prescriptive approach.

What is an IIFE?

IIFE (for Immediately Invoked Function Expression) is a function that gets called immediately after declaration. It is most often used to create a scoping context (a context in which all variables and function definitions are scoped). (function foo () { // [body] })(); The example above is a named IIFE's (foo) but it is also quite common to write them anonymously (without a function name).

What are design patterns?

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into source or machine code. It is a description or template for how to solve a problem that can be used in many different situations. Patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Patterns that imply mutable state may be unsuited for functional programming languages, some patterns can be rendered unnecessary in languages that have built-in support for solving the problem they are trying to solve, and object-oriented patterns are not necessarily suitable for non-object-oriented languages. Design patterns may be viewed as a structured approach to computer programming intermediate between the levels of a programming paradigm and a concrete algorithm.

What is the Mediator Pattern?

In software engineering, the mediator pattern defines an object that encapsulates how a set of objects interact. This pattern is considered to be a behavioral pattern due to the way it can alter the program's running behavior. Usually a program is made up of a large number of classes. So the logic and computation is distributed among these classes. However, as more classes are developed in a program, especially during maintenance and/or refactoring, the problem of communication between these classes may become more complex. This makes the program harder to read and maintain. Furthermore, it can become difficult to change the program, since any change may affect code in several other classes. With the mediator pattern, communication between objects is encapsulated with a mediator object. Objects no longer communicate directly with each other, but instead communicate through the mediator. This reduces the dependencies between communicating objects, thereby lowering the coupling.

What is Ionic?

Ionic is a HTML5 mobile framework to build beautiful hybrid native mobile applications using AngularJS and Cordova. It comes accompanied with a powerful CLI to create, build, test and deploy your applications into any platform. The framework also offers live reloading features to apply live changes to the application. With the advent of Angular 2, the Ionic team have started working on Ionic 2, which is a complete rewrite of Ionic.

What is JSCS?

JSCS — JavaScript Code Style is different from the others in that it doesn't do anything unless you give it a configuration file or tell it to use a preset. You can download configurations from their website, so it's not a big problem, and it has a number of presets, such as the jQuery coding style preset and the Google preset. JSCS is a code style checker. This means it only catches issues related to code formatting, and not potential bugs or errors.

What is JSLint?

JSLint is a static analysis "code quality" tool for JavaScript.The downsides are that JSLint is not configurable or extensible. You can't disable many features at all, and some of them lack documentation.

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is widely used in RESTful web services. It is both easy for humans to read and write and for machines to parse and generate.

What is JSPM? Needs cleanup

JSPM is a package manager coupled with its own build system. Thus, any kind of module can be loaded (e.g ES6, AMD, CommonJS) within the current installed modules. Those modules can be loaded from npm, as well as Github, Bitbucket or Bower. JSPM creates its own dependencies folder in the project directory, called jspm_packages, instead of the regular node_modules folder. Usage: npm install -g jspm: Install the JSPM CLI. jspm init: Initialize the current project with JSPM. jspm install lodash: Install packages, just like NPM. jspm install github:lodash/[email protected]: Install the specified. version from Github. jspm bundle app/main --inject: Bundle the app, just like Browserify

What is JSX?

JSX is an XML-like syntax extension to JavaScript. It allows developers to write HTML directly in JS but needs to be transpiled before it can be used in the browser. JSX is developed at Facebook and mostly used to complement React.

What is Jasmine?

Jasmine is a BDD framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. Jasmine is developed by Pivotal Labs, and has many features like Spies built in. It also has support for mocking AJAX.

Ramda

Ramda is a library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data. - Ramda emphasizes a purer functional style. Immutability and side-effect free functions are at the heart of its design philosophy. This can help you get the job done with simple, elegant code. - Ramda functions are automatically curried. This allows you to easily build up new functions from old ones simply by not supplying the final parameters. - The parameters to Ramda functions are arranged to make it convenient for currying. The data to be operated on is generally supplied last. Ramda makes it very easy to build functions as sequences of simpler functions, each of which transforms the data and passes it along to the next.

React

React is a library developed and used at Facebook for building user interfaces. It can be seen as the V in MVC as it makes no assumptions about the rest of the technology stack. Using React Native it can even be used to power native apps. In React you can write HTML directly in JS using an XML-like syntax called JSX. JSX compiles to JS and is optional, but does make the code more expressive. Data flow in React is one-way which makes it easier to reason about and avoid mistakes. This quality can be enhanced using Flux, Facebook's complementary application architecture, or Redux which many people see as a "better Flux".

RxJS

RxJS is a library in the ReactiveX family of functional reactive programming libraries. It allows you to develop programs that respond to asynchronous events by composing sequences of observable streams. Observable streams can send zero or more "data" notifications and terminate with either an "completed" or an "error" notification. Subsequent streams can combine and remix these notifications into new observable patterns, making it possible to compose rich sequences of asynchronous events that clean up resources appropriately when done. RxJS is available under an Apache license. It is developed by Microsoft Open Source and numerous third-party contributors.

What is the Facade pattern?

The Facade Pattern (or façade pattern) is a software design pattern commonly used with object-oriented programming. The name is by analogy to an architectural facade. A facade is an object that provides a simplified interface to a larger body of code, such as a class library. A facade can: - make a software library easier to use, understand and test, since the facade has convenient methods for common tasks; - make the library more readable, for the same reason; reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system; wrap a poorly designed collection of APIs with a single well-designed API. The Facade design pattern is often used when a system is very complex or difficult to understand because the system has a large number of interdependent classes or its source code is unavailable. This pattern hides the complexities of the larger system and provides a simpler interface to the client. It typically involves a single wrapper class which contains a set of members required by a client. These members access the system on behalf of the facade client and hide the implementation details.

What is Ext JS?

The most comprehensive JavaScript framework for building feature-rich cross-platform web applications targeting desktop, tablets, and smartphones. Ext JS leverages HTML5 features on modern browsers while maintaining compatibility and functionality for legacy browsers.

Observer Pattern

The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems. The Observer pattern is also a key part in the familiar MVC architectural pattern. The observer pattern is implemented in numerous programming libraries and systems, including almost all GUI toolkits. The observer pattern can cause memory leaks, known as the lapsed listener problem, because in basic implementation it requires both explicit registration and explicit deregistration, as in the dispose pattern, because the subject holds strong references to the observers, keeping them alive. This can be prevented by the subject holding weak references to the observers.

Prototype Pattern

The prototype pattern is a creational design pattern in software development. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. This pattern is used to: avoid subclasses of an object creator in the client application, like the abstract factory pattern does. avoid the inherent cost of creating a new object in the standard way (e.g., using the new keyword) when it is prohibitively expensive for a given application. To implement the pattern, declare an abstract base class that specifies a pure virtual clone() method. Any class that needs a "polymorphic constructor" capability derives itself from the abstract base class, and implements the clone() operation. The client, instead of writing code that invokes the new operator on a hard-coded class name, calls the clone() method on the prototype, calls a factory method with a parameter designating the particular concrete derived class desired, or invokes the clone() method through some mechanism provided by another design pattern.

What is the primary global object that the browser exposes to the JavaScript engine?

The window object

Revealing Module Pattern

This pattern is the same concept as the module pattern in that it focuses on public & private methods. The only difference is that the revealing module pattern was engineered as a way to ensure that all methods and variables are kept private until they are explicitly exposed; usually through an object literal returned by the closure from which it's defined. Personally, I like this approach for vanilla JavaScript as it puts a clear emphasis on both the intent of the developer and the module itself. Advantages Cleaner approach for developers Supports private data Less clutter in the global namespace Localization of functions and variables through closures The syntax of our scripts are even more consistent Explicitly defined public methods and variables which lead to increased readability Disadvantages Private methods are unaccessible. Private methods and functions lose extendability since they are unaccessible (see my comment in the previous bullet point). It's harder to patch public methods and variables that are referred to by something private.

What is localForage?

localForage is offline storage, improved. localForage is a JavaScript library that improves the offline experience of your web app by using an asynchronous data store with a simple, localStorage-like API. It allows developers to store many types of data instead of just strings. localForage includes a localStorage-backed fallback store for browsers with no IndexedDB or WebSQL support. Asynchronous storage is available in the current versions of all major browsers: Chrome, Firefox, Internet Explorer, and Safari (including Safari Mobile). localForage offers a callback API as well as support for the ES6 Promises API, so you can use whichever you prefer.


Ensembles d'études connexes

CSCE 102 Questions Week 1-4 (Test 1)

View Set

Chapter 13 The Spinal Cord, Spinal Nerves, and Spinal Reflexes (by BuGay )

View Set

Fundamentals of information systems security Ch 12 Summary

View Set

Chapter 3: National Differences in Economic Development

View Set

Ch 03: Tissue Renewal and Repair: Regeneration, Healing, and Fibrosis

View Set

Vander's ch 6 thru ch 9, all terms

View Set

Assessment and Management of Patients with Hepatic Disorders

View Set