Development Flashcards

1
Q

What is the software architecture of the app?

A

It is a layered architecture, having 2 tiers: the client and the server if we take Firebase as one entity. However, it can also constitute a multi-layered architecture if we think about the Firebase services that I used: Firebase Authentication, Firestore Database, and Firebase Storage as independent layers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the data model used for the app?

A

Firestore Database is a No-SQL database where the data is organized in JSON-like documents.
I am using it because of
-the ease of application development,
-it is horizontally scalable(meaning it offers the possibility to scale using multiple machines rather than increasing the CPU and memory of a single machine),
-does not require any planning upfront
-it is flexible
-offers a GUI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are other data models and why are not they used in this app?

A

Other data models can be relational, graph, or key-value. The most popular are relational databases which require upfront planning of tables with rows and columns, and the relationship between them. Also, it needs to be normalized to avoid redundancy. It supports Joins - combining data from multiple tables and it is ACID compliant - guarantees that it remains consistent and accurate.
key-value data models like Redis which runs in memory and is used for caching
graph data model - when the data is highly connected and there are many to many relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does it mean to run in-memory?

A

This means that the data is not written on disk, but exists in the RAM memory (cached) of the server that runs the redis service - to temporarily store data - which means better and faster performance and retrieval.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Advantages and disadvantages of using BaaS?

A
The advantages of Firebase are:
- quick development
- cost-effectiveness
- community
- ease of integration and ease to use of the SDK
- implement real-time features like comments
The disadvantages of Firebase are:
- not having the freedom to customize exactly as you need
- platform dependent
- not used for complicated queries
- a limited set of security standards
- not able to use your own database
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is JSX?

A

A syntax that makes it possible to write elements inside JavaScript. Similar to HTML syntax, but because it is JavaScript, variables can be written inside it, embedding them with curly brackets. Any JavaScript expression will work between curly braces, including function calls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the different types of security concerns?

A

In web:
- XSS (Cross site scripting) - steal another user’s cookie
- CSRF (Cross site request forgery) - user tricked into interacting with a page or script on a third-party site and generates a malicious request
- File upload vulnerabilities
- SQL injection
In mobile / my app (where the application code is stored inside the device and it can collect more info about the user):
- Async storage
- Data validation
- Access control

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Promises? How are await async used?

A

Used for long running tasks that won’t return the response right away, but rather return a Promise that will be solved at a later time.
Await is called inside a async function before a method call and the response will be used when the promised is settled without giving errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is asynchronous communication?

A

It is a form of parallel programming that allows a unit of work to run separately from the primary application thread. When the work is completed, it notifies the primary application thread.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is state in React Native?

A

A state is a snapshot of the app at any given moment in time. It refers to properties that will be changed and so need to be tracked thorought the application.
You can add state to a component by calling React’s useState Hook. A Hook is a kind of function that lets you “hook into” React features. For example, useState is a Hook that lets you add state to function components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between React Native and React.js?

A

React.js is a JavaScript library used for building a high performing UI, while React Native is an entire platform allowing to build native, cross platform mobile applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are React custom components?

A

React custom components are independent pieces of functionality that can be reused thorought the code, written by us. Unlike the core components which are built in React: Text, View, TextInput, TouchableOpacity, Button. Each components can be customized with a prop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are props in React Native?

A

Props let you customize React components. This is handy if you are passing something other than a string as props, like an array or number: . However, JS objects are also denoted with curly braces: {width: 200, height: 200}. Therefore, to pass a JS object in JSX, you must wrap the object in another pair of curly braces: {{width: 200, height: 200}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why is const used to declare state?

A

The component re-renders when it is changed, so the variable remains immutable in the scope of the function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are atoms in React.js?

A

Atoms are units of state. They’re updatable and subscribable: when an atom is updated, each subscribed component is re-rendered with the new value. They can be created at runtime, too. Atoms can be used in place of React local component state. If the same atom is used from multiple components, all those components share their state.

Atoms are created using the atom function.

Atoms need a unique key, which is used for debugging, persistence, and for certain advanced APIs that let you see a map of all atoms. It is an error for two atoms to have the same key, so make sure they’re globally unique. Like React component state, they also have a default value.

To read and write an atom from a component, we use a hook called useRecoilState.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are hooks in React Native?

A

Hooks allows you to use React Native features without writing a class. These built-in functions let React Native developers use state and lifecycle methods inside functional components. With hooks, the complexity of developing the application is lessened.

17
Q

Why did you use Recoil.js?

A

Recoil.js is a state management tool, and unlike Redux, is much simpler and easy to use, having a few core concepts that need to be understood. It is used for reading and writing to a state that needs to be accessible from different components.