Handling API Response Handling Updating State Merging Api Responses Business Logic API Calling Data Transformation View Layer Service Layer Navigation Logic Logical Layers Layered Architectures (MVC,MVP,MVVM,VIPER)
for data ❖ Easily reusable business logic components ❖ Should easily separate pure and impure functions or Unit testable code. ❖ Should follow the basic SOLID principles. ❖ Architecture should be adaptive to platform APIs and external SDKs. ❖ Should be scalable and flexible while not creating the overhead for the developer to implement it. ❖ Every class of the project must be part of any architecture component
type ❖ A flow state represent each step of the user in application ❖ View layer maps flow state with activity and fragments ❖ Feature layer execute actions and business logics according to flow state
types of V1, V2, V3, V4 and their data source APIs are A1, A2, A3, A4. ❖ An API will give the ordering of views like V3, V2, V4, V1 or V2, V4, V3, V1 ❖ Display the views as soon as the response of that view is received, there should not need to wait for others, suppose if display order is V2, V4, V3, V1 and if the V3 response comes first, it should be visible to screen and shouldn’t wait for the response of V2 and V4
V3, V4. ❖ Add those adapters to MultiListAdapter in display order like V3, V2, V4, V1 or V2, V4, V3, V1 ❖ Assign MultiListAdapter object to recyclerview as an adapter ❖ Whenever response of any API is received, just update the respective adapter
architecture, It is the part of M in MVP, it has the business logic and flow logic (decides the flow of the application). Feature classes are singleton and segregated as per the business logics
between the feature classes • Every feature class register for request types which it can handle • One request type can be registered by one feature, later will get the exception • Whenever any feature class needs to access the logic of another feature class, it asks to Request Message Pool
help to reduce the application state size which tends to reducing the complexity to manage the state ❖ Client will get almost view ready data so no need of mapping ❖ Will remove API response merging code ❖ Common business logics of client will be handled by GraphQL ❖ Size of feature layer will be reduced, it will help us to concentrate more on unit test cases
help to reduce the application state size which tends to reducing the complexity to manage the state ❖ Client will get almost view ready data so no need of mapping ❖ Will remove API response merging code ❖ Common business logics of client will be handled by GraphQL ❖ Size of feature layer will be reduced, it will help us to concentrate more on unit test cases
Platform APIs Consumers View Event Handling API Response Handling Updating State Business Logic API Calling View Layer Service Layer Navigation Logic Logical Layers Layered Architectures (MVC,MVP,MVVM,VIPER) Merging Api Response Data Transformation