Skip to the content.

Data Modeling

Name 3 advantages to Test Driven Development

1-High test coverage 2-You receive fast feedback. 3-Better program design and higher code quality

2- In what case would you need to use beforeEach() or afterEach() in a test suite?

before() is run once before all the tests in a describe beforeEach() is run before each test in a describe

(beforeEach) and (afterEach) can handle asynchronous code in the same ways that tests can handle asynchronous code - they can either take a done parameter or return a promise. For example, if initializeCityDatabase() returned a promise that resolved when the database was initialized.

3- What is one downside of Test Driven Development

When feature changes, implementation will change as well, and many test cases will fail. … This problem exists as long as unit test exists, but more severe especially when the test cases are written during TDD. Since during TDD process people tend to focus on implementation, the test cases are more prone to change.

4- What’s the primary difference between ES6 Classes and Constructor/Prototype Classes?

Classes can’t be called without new, but functions intended as constructors can (and their this will be wrong) Classes can extend more types than constructors can (like functions and arrays) Classes’ prototypes are their parents (they inherit static properties); writers of constructor functions usually don’t bother with this 5- Why REST?

its like creating knowledge of actions that happened before the client made the request and what will or should happen after the response is sent back to the client. REST is used when you are talking to your API

Document the following Vocabulary Terms 1- functional programming

it is a programming paradigm where you mostly construct and structure your code using functions. 2- object-oriented programming (OOP)

it is about creating objects that contain both data and functions. 3- Class

it’s a special functions in ES6, it’s like a bluebrint for data modeling. 4- Super

we use this when extending the class, to inherit the previous properties from the parent class. 5- this

it is a keyword in javascript that refers to the scope that will be called in. 6- Test Driven Development (TDD)

it’s a software development practice, by testing then correct the test, then refactor the code. 7- jest

it is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It allows you to write tests. 8- Continuous Integration (CI)

it is the practice of automating the integration of code changes from multiple contributors into a single software project. 9- REST

REpresentational State Transfer, is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other. 10- Data Model

Data Model is the modeling of the data description, data semantics, and consistency constraints of the data. It provides the conceptual tools for describing the design of a database at each level of data abstraction. there are four data models used for understanding the structure of the database.