Best practices to follow when developing mobile apps. Important things to consider when designing the mobile app.
Credits:
https://www.peerbits.com/blog/all-about-app-architecture-for-efficient-mobile-app-development.html
2. Good Architecture
● Right distribution of responsibilities
● Testability of each component
● Ease of use and a low maintenance cost
3. Considerations
1. Determining the device
a. Screen size, CPU, resolution, Memory, Storage
b. Any special hardware requirement
2. Bandwidth
a. Connectivity
b. Technology (2G, 3G, 4G)
3. UI flows
a. Platform specific or agnostic (back button)
b. Navigations (Tabbed, stacked, Scrolled)
4. Design Patterns
1. MVC
2. MVP
3. MVVM
4. VIPER
Models— responsible for the domain data or a data access layer which manipulates the data.
Views— responsible for the presentation layer
(GUI)Controller/Presenter/ViewModel— the glue or the mediator between the Model and the
View, in general responsible for altering the Model by reacting to the user’s actions performed on
the View and updating the View with changes from the Model.
5. Performance
● Retrieve data that the application needs
● Retrieve data when the application needs it
● Use push notification updates over continuous polling
● CPU intensive tasks should be pushed to server
6. Usability
● Follow platform specific guidelines
● Real estate is limited. Only display most relevant information and options
● Make use of the Summary / Detail / Edit UI paradigm
● Limit the need to repeated scroll
7. Data Access
1. Logic of validation and authorization can be duplicated on client and
server.
2. Number of clients can change with time so implement business logic on
server side.
8. Security
● Web services must be authenticated. Level of authentication depends on
the data it expose.
● Token based auth like oAuth is popular
● All communication between server and client should be over SSL secured
connection.
● Data stored on device should be encrypted and keys can be stored on
server if required.
● Highly confidential data like CC, SSN, PHI should not be stored on device
9. Connectivity
● Mobile switches between different networks and no networks. “Always-
on” internet connectivity cannot be assumed.
● Implement offline usage if business case makes sense.
● Offline access require caching and queuing mechanism.
● Conserve bandwidth by using more aggressive data transfer when on wi-fi
vs when on mobile network.
● Cache can cause conflicts, handle that.