Android Application Structure Flashcards

1
Q

List some of the components found in android application

A

services, activities, fragments, broad cast receivers and
content providers

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

What is the purpose of the app manifest

A

The app manifest is used by the Android OS to integrate the app
into the device’s overall UX.

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

Describe the design principal: separation of concerns

A

Ensures that the various application modules are independently modeled, including dedicating UI classes to strictly code that controls the UI and app interaction, while dedicating other non-UI
related classes to code that maintains an app’s business logic.

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

Why is there need to adhere to separation of concerns

A

Due to the highly dynamic usage of an Android device by the user,
and given the constrained resources by the environment, there is need to separation of concerns,

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

What are some of the effects of failing to adhere to separation of concerns

A

– Loss of data on app failure
– Frequent crashes in case of network/other incident failure
– Difficulty in code debugging (error-proneness)

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

What are some of the benefits of adhering to separation of concerns

A

– Data consistency
– Less app crashes, if any at all
– Ease of debugging and testing
– More robust apps
– Application scalability

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

What are the three layers of an android application structure. Illustrate the same

A

– UI layer
– Data layer
– Domain layer (optional- to facilitate interaction between the two main ones

*See page 5 for illustration

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

Describe the UI layer, giving its alternative name and role

A

● The UI layer is made up of:
– UI elements that render data on the screen
– State holders that hold data, expose it to the UI, and handle logic
● The main role of this layer, aka the presentation layer, is to display app data on a screen

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

What is the data layer made up of?

A

– Repositories (containing data sources) which:
● Expose data to the app
● Centralize data changes
● Resolve data source conflicts
● Abstract data source from the app
● Contain business logic

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

What is the main purpose of the data layer

A

To contain the business logic, giving an app its value by containing rules
that determine the apps behaviors such as creation, data
storage and data changes.

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

Describe the domain layer

A

● This is an optional layer that may sit in between the initial two layers
● It comes in handy in complex application in order to encapsulate complex business logic or simple business
logic that is reused by multiple ViewModels.
● Not all apps have this requirement, therefore making the layer optional

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

What is a view model

A

A ViewModel is a class that is responsible for preparing and managing the data for an Activity or a Fragment

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

What are the advantages of Adopting this Android
Structure/Architecture

A

● It improves app maintainability, quality and
robustness
● Allows app scalability
● Helps with onboarding given project consistency for quicker adaptation by team members
● It ensures ease of testing
● Improves the debugging process

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

Describe 8 Android Dev Best Practices

A

● Don’t store data in app components
● Reduce dependencies on Android classes
● Create well-defined boundaries of responsibility between various modules in an application
● Expose as little as possible from each module
● Focus on the unique core of your app in order to stand out from other applications
● Make each part of your app testable in isolation
● Ensure that types are responsible for their concurrency policies
● Persist as much relevant and fresh data as possible to ensure app functionality continuity

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