2 Flashcards
4.
R
5.
T
When was React released?
2013.
What did we have before React?
The front end landscape was very different. In the 90s and early 2000s we only had HTML, CSS and JavaScript.
What was the problem with different browsers?
They implemented their browsers differently, so developers had to accommodate JavaScript to work with these different browsers.
What helped developers implement JavaScript on different browsers?
jQuery.
What did jQuery allow for developers?
To easily interact with the DOM across multiple browsers.
Why is jQuery not needed as much now days.
There are more similarities between browsers.
What happened to websites when jQuery was released?
They became more complex.
What happened when websites become full applications that people can interact with?
Libraries like backbone.js came we made.
Why was backbone.js created?
As JavaScript files keeps getting bigger, it allowed us to organise our JavaScript files.
What happened when it became easier to work with the DOM?
We had the birth of the single page application (SPA).
What changed when SPA’s become more popular?
We focused less on HTML and a lot more on JavaScript. You also only load the application code once.
What changed when SPA’s become more popular in regards to the server?
You were able to sign into an application and interact with that application without communicating to the server.
When was AngularJS released?
2010.
What became the first standard way of building SPA’s?
AngularJS.
Who created AngularJS?
Google.
What was the difference between AngularJS and jQuery?
AngularJS allowed developers to build large applications by forming containers that wrapped your project.
What does MVC stand for?
Model View Controller.
What happened when websites started getting even more complex?
It got harder to find bugs in the code and it was harder to understand how each part of the app was affecting the other.
When was AngularJS completely rewritten to Angular?
2014.
6.
D
What four core things made React so successful?
Don’t touch the DOM. I’ll do it.
Build website like Lego blocks.
Unidirectional data flow.
UI, the rest is up to you.
What does ‘Don’t touch the DOM. I’ll do it’ mean in React?
Many existing frameworks and libraries before React were directly manipulating the DOM
What does DOM stand for?
Document Object Model.
What is the DOM?
It’s what the browser uses to display a website or a web app. It’s the tree representation of the page.
What does JavaScript do in regards to the DOM?
Manipulating it.
How could you show an example of JavaScript manipulating the DOM?
Inspect an element that has interactivity, interact with it and you should see a flash in the elements panel. This flash is JavaScript updating.
Show examples of what methods were used to manipulate the DOM of websites before React.
document. getElementById(id)
element. innerHTML
What did DOM api’s allow us to do.
Traverse to DOM, access any node we wanted to, remove them, add new nodes etc.
What is an imperative paradigm?
Where you directly change individual parts of your app in response to various user events.
What’s the problem with the imperative paradigm?
Even though it sounds intuitive it becomes difficult to see the relationships between events and all the edge cases/
What approach does React use?
A declarative approach.
Why is it good that React uses a declarative approach? (to DOM manipulation???)
DOM manipulation is one of the biggest performance bottle necks.