Server Side Questions Flashcards
What are the parts of this url https://github.com/mariusbanea/web-developers-toolkit/?key=value&anotherKey=differentValue?
http / https ===> the access protocol
github.com ===> domain name
mariusbanea / web-developers-toolkit ===> both are parameters / routes that we get to send to the domain name (mariusbanea = username; web-developers-toolkit = repository name)
/?key=value&anotherKey=differentValue ===> are usually query that we get to send to the domain name (mariusbanea = username; web-developers-toolkit = repository name)
URLS structure: PROTOCOL + DOMAIN NAME + PARAMETERS + QUERIES
What are the typical parts of a server js file?
- import external resources (i.e. Express)
- api end points (app.get)
- app listen with the port settings (app.listen)
Is Node primarily a sync or async programing language?
Async ( it’s built on callbacks https://github.com/mariusbanea/web-developers-toolkit/blob/master/js/callback-function-example.html)
How many threads does node have?
1 thread (thread = an operation that is happening in the same time with another one)
What are the projects suitable for node?
Single thread websites with simple NoSQL DBs and API support
What are the three definitions of Mongoose?
- A middleware connecting the Controller with the Model
- “validation” layer (validates data between the controller and the model)
- Object Document Mapper (maps the connection between the Documents inside the DB with the Objects in the controller)
How many threads does node have
1 thread (thread = an operation that is happening in the same time with another one)
Is Node primarily a sync or async programing language
Async ( it’s built on callbacks )
What is a callback function?
A callback is function which is sent as a parameter to another function in order to be used after the initial function runs
What is the difference between a SQL database and a NoSQL database?
SQL (Structured Query Language) is a relational data model and NoSQL is a document data model
What projects are suitable for node?
Single thread websites with simple NoSQL DBs and API support
What is the DOM?
Document-Object-Model, a copy of the code from the server that can be manipulated with javascript
What are the parts of a url?
protocol: domain name/parameters ? queries
What is the difference between callback, closure, and recursive functions?
- Callback functions are parameters inside of another function that are called after the initial function runs.
- Closures are functions that is written inside another function so the scope of the inner function is protected
- Recursive functions are functions that calls itself repeatedly until the function ends
What are RESTful web services?
Clients can make requests to a resources URI that elicits response in HTML, XML or JSON format
- Representational State Transfers