SlideShare a Scribd company logo
Modular Android Project
Raka Westu Mogandhi
Mobile Engineer @prismapp.io
Table of Contents
- Background
- Solution
- Case Study
- Conclusion
Background
Single Application Module
- Architecture → Model-View-Presenter
- HTTP data source → Retrofit
- Local data source → SQLite
- Packaging strategy → feature based
Common Implementation Stack
- Highly coupled code
- Hard to add new feature or just update the feature
- Single implementation style
- New members will need time to adapt the new style
- Adapting new technology may need to refactor entire app
- Not good enough for team workflow
- Working one one module may cause conflicts when integrating new feature
Common Weaknesses
Solution → App Decomposition
Approach Microservice is a particular way of
designing software applications as
suites of independently deployable
services.Microservice like Architecture
using Android Module
What is Android Module?
- It is a component of Android project.
- Module types
- Library
- Application
- An Android project can consists of several modules
- Each module can be developed independently
Examples of Android Module
- Android support libraries
- Firebase android libraries
- Third party libraries
- Glide
- RxJava
- Retrofit
Applying App Decomposition
How can we do it?
- Decompose app into several independent components
- The approach is based on our team and project needs
- Base → feature, function
- Approach example
- Ecommerce app can be decomposed based on feature
- Login module
- Products module
Case Study
Ecommerce App
Analytics
Module
Ecommerce
App
Checkout
Module
Products
Module
Authentication
Module
History
Module
App Flow
Show login page if user is isn’t
authenticated
Show product catalog if user is already
authenticated
Start
Show login page
Auth.
startLoginPage
Auth.
isLoggedIn
Show product catalog
Prod.
startProductCatalogPage
yes
no
App Flow (Contd)
Show product catalog
Show product search
Show product details
- Add to favorites
- Add to cart
Product Catalog Product Details
Add to cart
Checkout
.AddProductToCart
Add to favorites
Product Search
Show shopping cart
Checkout
.startShoppingCartPage
App Flow (Contd)
Add to cart from product page
Remove item from shopping cart page
Go to payment
Show transaction history
Add to cart
Redirect to
shopping cart
page
Continue shopping
Back to previous
screen
Shopping Cart Page
Remove item
from cart
Go to payment Finish payment
Show transaction history
History.
showTransactionHistory
Authentication
Module
- Login
- Register
- Forgot password
Example Auth module abstraction
// Start page
ModularAuth.getInstance().startLoginPage()
// Check if already logged in
val loggedIn =
ModularAuth.getInstance().isLoggedIn()
// Get Authenticated user data
val userData =
ModularAuth.getInstance().getAuthenticatedUse
r()
Products Module
- Products catalog → product
details
- Products search → product
details
- Products favorites
- Get product in favorites
Example Products module abstraction
// Start page
ModularProd.getInstance().startProductCatalog
Page()
ModularProd.getInstance().startProductSearchP
age()
ModularProd.getInstance().startProductFavorit
esPage()
// Get Data
val favorites =
ModularProd.getInstance().getFavoriteProducts
()
Checkout Module
- Add product to cart
- Start checkout screen
- Start payment preview
- Get current active checkout
data
- Get current cart data
Example Checkout module abstraction
// Start page
ModularCheckout.getInstance().addProductToCar
t()
ModularCheckout.getInstance().showCheckoutPag
e()
// Get Data
val carts =
ModularCheckout.getInstance().getShoppingCart
()
History Module
- Show all generated transaction
Example History module abstraction
// Start page
ModularHistory.getInstance().startAllTransact
ionsPage()
// Get Data
val transaction =
ModularHistory.getInstance().getTransactionDe
tails()
Analytics Module
- Track event
Example Analytics module abstraction
// Track Event
ModularAnalytics.getInstance().trackEvent()
App Module
- Starting point of the application
- Compose the available modules in here
- App module have dependencies to each modules
How to communicate between modules?
- Using interface or callback
- Event bus
Interface or Callback Example
EcommerceAuth.getInstance.startLoginPage(object: LoginResultListener {
override fun onLoginSuccess() {
}
override fun onLoginFailure() {
}
})
Example Code
github.com/rakawestu/modular-android-example
Advantages
- Good for teams
- Each person/small team can work on small independent module
- Each module can have different implementation style
- Some module can be reused on different app
- Common implementation module → base activity, base fragment, etc.
- Utils module → string utilities, money utilities, etc.
- The module is generic
Disadvantages
- Documentation should be clearer because communication between
module is important
- There may be a duplicate code because implementation between module
are similiar → can be minimized if using common module for repeated
codes
- More build time on complete app
- https://nearsoft.com/blog/the-microservices-approach-and-how-it-beats-
monolithics/
- https://medium.com/@tomsoderlund/micro-frontends-a-microservice-
approach-to-front-end-web-development-f325ebdadc16
Slide: bit.ly/modAndroid2017
References
Thank you!

More Related Content

What's hot

Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
Rakesh Jha
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
Anton Keks
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
Mohammad Faizan
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servlets
Nuha Noor
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
洪 鹏发
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Software testing and process
Software testing and processSoftware testing and process
Software testing and process
gouravkalbalia
 
Testing web application
Testing web applicationTesting web application
Testing web application
jayashreesaravanan
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
medsherb
 
Automation testing
Automation testingAutomation testing
Automation testing
Tomy Rhymond
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
didev
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
Savvycom Savvycom
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
MUHAMMAD FARHAN ASLAM
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce Testing
Atul Pant
 
Automation Testing Syllabus - Checklist
Automation Testing Syllabus - ChecklistAutomation Testing Syllabus - Checklist
Automation Testing Syllabus - Checklist
Sunil Kumar Gunasekaran
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
Suyash Srijan
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
sonukalpana
 
Performance testing
Performance testing Performance testing
Performance testing
BugRaptors
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan
 

What's hot (20)

Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
 
Java Course 11: Design Patterns
Java Course 11: Design PatternsJava Course 11: Design Patterns
Java Course 11: Design Patterns
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servlets
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Software testing and process
Software testing and processSoftware testing and process
Software testing and process
 
Testing web application
Testing web applicationTesting web application
Testing web application
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce Testing
 
Automation Testing Syllabus - Checklist
Automation Testing Syllabus - ChecklistAutomation Testing Syllabus - Checklist
Automation Testing Syllabus - Checklist
 
Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
 
Performance testing
Performance testing Performance testing
Performance testing
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 

Similar to Modular android Project

MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
Dilip Patel
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013
Arjan
 
SeedStack feature tour
SeedStack feature tourSeedStack feature tour
SeedStack feature tour
SeedStack
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
Folio3 Software
 
Micro frontend: The microservices puzzle extended to frontend
Micro frontend: The microservices puzzle  extended to frontendMicro frontend: The microservices puzzle  extended to frontend
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
Mage Guru
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
cummings49
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
Erik Mitchell
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
Violetta Villani
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
Commit University
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
Akshay Mathur
 
Prototyping applications with heroku and elasticsearch
 Prototyping applications with heroku and elasticsearch Prototyping applications with heroku and elasticsearch
Prototyping applications with heroku and elasticsearch
protofy
 
React django
React djangoReact django
React django
Heber Silva
 
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Joke Puts
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8
Italo Mairo
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
Albert Brand
 
Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile Híbrido
Juliano Martins
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connections Developers
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 

Similar to Modular android Project (20)

MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013
 
SeedStack feature tour
SeedStack feature tourSeedStack feature tour
SeedStack feature tour
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
 
Micro frontend: The microservices puzzle extended to frontend
Micro frontend: The microservices puzzle  extended to frontendMicro frontend: The microservices puzzle  extended to frontend
Micro frontend: The microservices puzzle extended to frontend
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Approaches to mobile site development
Approaches to mobile site developmentApproaches to mobile site development
Approaches to mobile site development
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
 
Level up apps and websites with vue.js
Level up  apps and websites with vue.jsLevel up  apps and websites with vue.js
Level up apps and websites with vue.js
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
 
Prototyping applications with heroku and elasticsearch
 Prototyping applications with heroku and elasticsearch Prototyping applications with heroku and elasticsearch
Prototyping applications with heroku and elasticsearch
 
React django
React djangoReact django
React django
 
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
Introduction to Magento 2 module development - PHP Antwerp Meetup 2017
 
Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8Custom Forms and Configuration Forms in Drupal 8
Custom Forms and Configuration Forms in Drupal 8
 
Vue micro frontend implementation patterns
Vue micro frontend implementation patternsVue micro frontend implementation patterns
Vue micro frontend implementation patterns
 
Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile Híbrido
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
 

Recently uploaded

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 

Recently uploaded (20)

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 

Modular android Project

  • 1. Modular Android Project Raka Westu Mogandhi Mobile Engineer @prismapp.io
  • 2. Table of Contents - Background - Solution - Case Study - Conclusion
  • 5. - Architecture → Model-View-Presenter - HTTP data source → Retrofit - Local data source → SQLite - Packaging strategy → feature based Common Implementation Stack
  • 6. - Highly coupled code - Hard to add new feature or just update the feature - Single implementation style - New members will need time to adapt the new style - Adapting new technology may need to refactor entire app - Not good enough for team workflow - Working one one module may cause conflicts when integrating new feature Common Weaknesses
  • 7. Solution → App Decomposition
  • 8. Approach Microservice is a particular way of designing software applications as suites of independently deployable services.Microservice like Architecture using Android Module
  • 9. What is Android Module? - It is a component of Android project. - Module types - Library - Application - An Android project can consists of several modules - Each module can be developed independently
  • 10. Examples of Android Module - Android support libraries - Firebase android libraries - Third party libraries - Glide - RxJava - Retrofit
  • 12. How can we do it? - Decompose app into several independent components - The approach is based on our team and project needs - Base → feature, function - Approach example - Ecommerce app can be decomposed based on feature - Login module - Products module
  • 14. App Flow Show login page if user is isn’t authenticated Show product catalog if user is already authenticated Start Show login page Auth. startLoginPage Auth. isLoggedIn Show product catalog Prod. startProductCatalogPage yes no
  • 15. App Flow (Contd) Show product catalog Show product search Show product details - Add to favorites - Add to cart Product Catalog Product Details Add to cart Checkout .AddProductToCart Add to favorites Product Search Show shopping cart Checkout .startShoppingCartPage
  • 16. App Flow (Contd) Add to cart from product page Remove item from shopping cart page Go to payment Show transaction history Add to cart Redirect to shopping cart page Continue shopping Back to previous screen Shopping Cart Page Remove item from cart Go to payment Finish payment Show transaction history History. showTransactionHistory
  • 17. Authentication Module - Login - Register - Forgot password Example Auth module abstraction // Start page ModularAuth.getInstance().startLoginPage() // Check if already logged in val loggedIn = ModularAuth.getInstance().isLoggedIn() // Get Authenticated user data val userData = ModularAuth.getInstance().getAuthenticatedUse r()
  • 18. Products Module - Products catalog → product details - Products search → product details - Products favorites - Get product in favorites Example Products module abstraction // Start page ModularProd.getInstance().startProductCatalog Page() ModularProd.getInstance().startProductSearchP age() ModularProd.getInstance().startProductFavorit esPage() // Get Data val favorites = ModularProd.getInstance().getFavoriteProducts ()
  • 19. Checkout Module - Add product to cart - Start checkout screen - Start payment preview - Get current active checkout data - Get current cart data Example Checkout module abstraction // Start page ModularCheckout.getInstance().addProductToCar t() ModularCheckout.getInstance().showCheckoutPag e() // Get Data val carts = ModularCheckout.getInstance().getShoppingCart ()
  • 20. History Module - Show all generated transaction Example History module abstraction // Start page ModularHistory.getInstance().startAllTransact ionsPage() // Get Data val transaction = ModularHistory.getInstance().getTransactionDe tails()
  • 21. Analytics Module - Track event Example Analytics module abstraction // Track Event ModularAnalytics.getInstance().trackEvent()
  • 22. App Module - Starting point of the application - Compose the available modules in here - App module have dependencies to each modules
  • 23. How to communicate between modules? - Using interface or callback - Event bus
  • 24. Interface or Callback Example EcommerceAuth.getInstance.startLoginPage(object: LoginResultListener { override fun onLoginSuccess() { } override fun onLoginFailure() { } })
  • 26. Advantages - Good for teams - Each person/small team can work on small independent module - Each module can have different implementation style - Some module can be reused on different app - Common implementation module → base activity, base fragment, etc. - Utils module → string utilities, money utilities, etc. - The module is generic
  • 27. Disadvantages - Documentation should be clearer because communication between module is important - There may be a duplicate code because implementation between module are similiar → can be minimized if using common module for repeated codes - More build time on complete app

Editor's Notes

  1. Android development has been easier day by day. There are many choices of how we can develop Android application. MVP MVVM etc. Here I want to present to you about one Android development workflow to help developer increase their productivity.
  2. Here the list of topics that I want to talk about. Background → This will cover about how important is a workflow will affect team’s productivity Solution → At this part I will propose a solution about the workflow and project structure to help team increase productivity so they can deliver value faster to their customer Case study → Next I want to showcase a simple example of how this workflow and project structure helping the team Conclusion → Last but not least is I will show some conclusion about this solution
  3. First part is the background. Before we proceed to the background let’s see how is most people’s project structure.
  4. Common implementation depends only on one module with many packages and dependencies. When creating new project, Android studio only create a module It’s app
  5. When an app module depends on one implementation stack, team members should learn it and implement it correctly. This will be hard on new developer since they may not know the stack, so it will delay the project.
  6. When app becomes complex it’s even harder to safely add a feature without affecting existing function It’s harder to divide team workloads Single implementation style means when we’re using new technology or stack we need to refactor entire app. That doesn’t sound good. Or when someone with different stack and style joins they need time to readjust their style and that sacrifice some time.
  7. Typically android application is a module. It may depends on other modules. A project can have more than one module. Each module can be developed independently → it’s easier to divide team workloads since each person or small team may own a specific domain of developed app.
  8. Actually in common applications, they already depends to many popular Android modules like this, they just use it. Imagine if we have similiar structure in our app, we can have a specific module for specific purpose just like this.
  9. The approach can be anything, function, domain, feature, etc. Another example is function based decomposition Core module → API call and feature based function only → can be java module too for more generic purpose UI module → Implement UI for each feature. It depends on core module.
  10. Interface or callback use basic java interface. Event bus for more complex communication