SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Buzzvil Client Modularization
Created by Ethan Yoo
What is the App modularization
Modular programming
● Is a software design technique
● Separates a program into modules according to the functionality
Module
● Is independent and interchangeable
● Contains everything necessary
● Contains only one aspect of the desired functionality
“App Modularization is to modularize the Android App.”
Why do we need to modularize app
● Faster build time
● Separation of concerns
● Fine-grained dependency control
● Improved reusability across other apps
● Improved the ownership & the quality of the codebase
Faster build time
App
Feature
Feature
Library
Library
Build only what we need
Build by Parallel
Feature
Feature
Library
Library
Separation of Concerns
● A basic principle of software design
● Software modules should have distinct responsibilities as much as
possible
Appshell
Feed Locker Tutorial
Auth Ad Content
Fine-grained dependency control
● Reusability
● Scalability
● Testability
Appshell
Feed Locker Tutorial
Auth Ad Content
Improved reusability across other apps
H/S
Feed Locker Tutorial
Auth Ad Content
S/J
Improved the ownership & the quality of the codebase
H/S
Feed Locker Tutorial
Auth Ad Content
S/J
JD MJ Josh
How to modularize
● Modularization by Feature
● Modularization by Library
Modularize by Feature
Feature is a unit of app functionality
App
App
Feature Feature Feature
Modularize by Library
App
Feature Feature Feature
App
Feature Feature Feature
Library Library Library
Make a library module for sharing code
● Appshell Module
● Feature Module
● Library Module
Multi Module Architecture
App
Appshell
Feature Feature Feature
Library Library Library
Appshell Module
Appshell
Feature Feature Feature
Library Library Library
● Dependency Injection
○ Feature Module
○ Library Module
○ Navigator
● Project build script
● Project configs. (ex : APP_KEY)
Feature Module
Appshell
Feature Feature Feature
Library Library Library
● Feature is a unit of app functionality
● Feature module can be divided into more smaller feature modules
○ The smaller is the better
● Boundary depends on stakeholder’s decision
● Feature module is not referred by other feature modules
● Feature module may have the view or not
● Dependency scope should be created for each module
Library Module
Appshell
Feature Feature Feature
Library Library Library
● There can be redandant codes between feature modules
● Redandant codes should be extracted into the library
● Recommendations
○ No business logic for specific feature
○ Stateless
Considerations
● Do we need a core module?
○ Core module is a module that has no state and has removed its business logic completely
● Should android service belong to feature module?
● How can we define auth module?
● Should we design each module to follow a specific architecture?
● Should we make the dynamic feature module?
Should we need a core module?
● Core module is a module that has no state and has removed its business
logic completely
● There are not many modules yet
● It is better to manage Library and Core modules together
Library
Core Library
Core
Feature Feature Feature
Appshell
Should android service belong to feature module?
● Android service
○ Could be a feature module
○ Could be a library module, otherwise
○ Depends on the stakeholder’s decision
How can we define auth module?
Appshell
Feed Locker Tutorial
Auth Ad Content
● Define auth module as a library module that has purely authentic logic
without any feature-specific logic
● Define feed module as a feature module that handles to login using auth
module
Should we design each module to follow a specific architecture?
● Each module can be built with independant architecture
● Some modules have data and domain layer
● Some modules have only one class
● Therefore, no rule can be defined for the architecture we must follow
Should we make the dynamic feature module?
● One of module belongs to the app bundle, being pushed by google
○ Allowing the module not to be installed at the initial installation
○ Reducing the app size
● The key point is the inversion of dependency between app and module
● If we have well architectured modules, we can integrate it easily at anytime
Module Navigation
● Each feature modules don’t know class in another module
● Therefore, navigator should be injected to the feature modules
● How to implement?
○ Reflection
○ DI Interface
○ Jetpack Navigation
Navigation with Reflection (Google)
Google’s example
Navigation with Reflection (Airbnb)
Airbnb’s example
Navigation with Interface
Navigation with Jetpack’s Navigation
Navigation with Jetpack’s Navigation
Navigation with Jetpack’s Navigation
If you wanna more information, visit this
Which implementation of navigation should we choose
● Navigation is one of the most important module on modularization
● Navigation needs changeable abstraction
● Reflection seems to be the best for now
○ There are use case of major company
○ It can implement without any dependencies
● Jetpack’s navigation seems to be restricted yet
Module Communication
● Callback or Listener Interface
● RxJava
● LiveData
Callback or Listener Interface
RxJava
LiveData
LiveData
● Callback or Listener : simple and easy
● RxJava : reactive stream and functional operator
● LiveData : reactive stream and lifecycle management
We do not have to enforce certain principles
Source Repository
● Multirepo vs Monorepo
Monorepo is better
Source Control Management
● Git
○ DVCS
○ Based on Snapshot
○ Sensitive to the size of repository
● Mercurial
○ DVCS
○ Based on Patch
○ Not sensitive to the size of repository
Depends on the code scale.
→ Git is better for now
Branching Strategy
● Git Flow
○ Well-defined branching procedures
○ There can be many conflicts during the merging process.
● Trunk Based Development
○ Always ready to be released
○ Universal versioning
○ Simple merging strategy
Trunk Based Development is better for monorepo.
Git Flow
Trunk Based Development
Version Management
● Do not assign a version to each module
○ Management of each version causes dependency hell
● Just assign only universal version
Build Tool
● Gradle
○ Google Standard
○ Simple and easy
○ Slow in many modules
● Buck
○ Used by Facebook, Uber, and Twitter
○ Challenging configuration
○ Fast in many modules
● Bazel
○ Used by Google
○ Challenging configuration
○ Fast in many modules
Depends on the code scale.
Gradle is better for now
Continuous Integration
● There are so many tools for CI
● It does not matter which tool we use
● The most important part is to build and test the exact modules we need
3rd Party Library
● Dagger
● RxJava
● LiveData
● ViewModel
Just use it
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.jsPagepro
 
Ionic, AngularJS,Cordova,NodeJS,Sass
Ionic, AngularJS,Cordova,NodeJS,SassIonic, AngularJS,Cordova,NodeJS,Sass
Ionic, AngularJS,Cordova,NodeJS,Sassmarwa baich
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 
Panorama des Technologies mobiles
Panorama des Technologies mobilesPanorama des Technologies mobiles
Panorama des Technologies mobilesAbdoulaye Dieng
 
AngularJS - Services
AngularJS - ServicesAngularJS - Services
AngularJS - ServicesNir Kaufman
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web AppBinh Bui
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentationThanh Tuong
 
Angular data binding
Angular data binding Angular data binding
Angular data binding Sultan Ahmed
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Knoldus Inc.
 
Nest.js Introduction
Nest.js IntroductionNest.js Introduction
Nest.js IntroductionTakuya Tejima
 

Was ist angesagt? (20)

An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Introduction to flutter
Introduction to flutter Introduction to flutter
Introduction to flutter
 
React workshop
React workshopReact workshop
React workshop
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
VueJS: The Simple Revolution
VueJS: The Simple RevolutionVueJS: The Simple Revolution
VueJS: The Simple Revolution
 
Java Server Faces 2
Java Server Faces 2Java Server Faces 2
Java Server Faces 2
 
Vue.js
Vue.jsVue.js
Vue.js
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Ionic, AngularJS,Cordova,NodeJS,Sass
Ionic, AngularJS,Cordova,NodeJS,SassIonic, AngularJS,Cordova,NodeJS,Sass
Ionic, AngularJS,Cordova,NodeJS,Sass
 
React-cours.pdf
React-cours.pdfReact-cours.pdf
React-cours.pdf
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Panorama des Technologies mobiles
Panorama des Technologies mobilesPanorama des Technologies mobiles
Panorama des Technologies mobiles
 
AngularJS - Services
AngularJS - ServicesAngularJS - Services
AngularJS - Services
 
Introduction to Progressive Web App
Introduction to Progressive Web AppIntroduction to Progressive Web App
Introduction to Progressive Web App
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
Angular data binding
Angular data binding Angular data binding
Angular data binding
 
Google android Activity lifecycle
Google android Activity lifecycle Google android Activity lifecycle
Google android Activity lifecycle
 
Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2Routing & Navigating Pages in Angular 2
Routing & Navigating Pages in Angular 2
 
Nest.js Introduction
Nest.js IntroductionNest.js Introduction
Nest.js Introduction
 

Ähnlich wie Android Modularization

Choosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectChoosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectHristo Chakarov
 
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...DevDay.org
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQueryMichael Edwards
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoVMware Tanzu
 
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!Parth Lawate
 
Creating An App for 650 million customers v.2.pdf
Creating An App for 650 million customers v.2.pdfCreating An App for 650 million customers v.2.pdf
Creating An App for 650 million customers v.2.pdfDmitry Osipa
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with AngularMukundSonaiya1
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsFedir RYKHTIK
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.jsEugene Vozniuk
 
Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework Mutual Mobile
 
Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBeroza Paul
 
Deccan ruby-conf-talk
Deccan ruby-conf-talkDeccan ruby-conf-talk
Deccan ruby-conf-talkprchaudhari
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in PractiseDavid Bosschaert
 
Modules and Modularization.pptx
Modules and Modularization.pptxModules and Modularization.pptx
Modules and Modularization.pptxPriyankaBhatia66
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersJon Peck
 

Ähnlich wie Android Modularization (20)

RealDay: Angular.js
RealDay: Angular.jsRealDay: Angular.js
RealDay: Angular.js
 
Choosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectChoosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our project
 
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
 
Django PPT.pptx
Django PPT.pptxDjango PPT.pptx
Django PPT.pptx
 
Ionic
IonicIonic
Ionic
 
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
 
Creating An App for 650 million customers v.2.pdf
Creating An App for 650 million customers v.2.pdfCreating An App for 650 million customers v.2.pdf
Creating An App for 650 million customers v.2.pdf
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with Angular
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and Projects
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.js
 
Angular vs react
Angular vs reactAngular vs react
Angular vs react
 
Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework 
 
Libreplan architecture
Libreplan architectureLibreplan architecture
Libreplan architecture
 
Benefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design patternBenefits of using software design patterns and when to use design pattern
Benefits of using software design patterns and when to use design pattern
 
Deccan ruby-conf-talk
Deccan ruby-conf-talkDeccan ruby-conf-talk
Deccan ruby-conf-talk
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
Modules and Modularization.pptx
Modules and Modularization.pptxModules and Modularization.pptx
Modules and Modularization.pptx
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for Publishers
 

Mehr von Young-Hyuk Yoo

How to make web based collaborate code editor
How to make web based collaborate code editorHow to make web based collaborate code editor
How to make web based collaborate code editorYoung-Hyuk Yoo
 
Dagger with multi modules
Dagger with multi modulesDagger with multi modules
Dagger with multi modulesYoung-Hyuk Yoo
 
Dagger in multi module sdk
Dagger in multi module sdkDagger in multi module sdk
Dagger in multi module sdkYoung-Hyuk Yoo
 
Clean architecture intro
Clean architecture introClean architecture intro
Clean architecture introYoung-Hyuk Yoo
 
Component, Redux 기반 비디오 구조 제안
Component, Redux 기반 비디오 구조 제안Component, Redux 기반 비디오 구조 제안
Component, Redux 기반 비디오 구조 제안Young-Hyuk Yoo
 

Mehr von Young-Hyuk Yoo (9)

Rx java intro
Rx java introRx java intro
Rx java intro
 
Retrofit intro
Retrofit introRetrofit intro
Retrofit intro
 
How to make web based collaborate code editor
How to make web based collaborate code editorHow to make web based collaborate code editor
How to make web based collaborate code editor
 
Dagger2 Intro
Dagger2 IntroDagger2 Intro
Dagger2 Intro
 
Dagger with multi modules
Dagger with multi modulesDagger with multi modules
Dagger with multi modules
 
Dagger in multi module sdk
Dagger in multi module sdkDagger in multi module sdk
Dagger in multi module sdk
 
Clean architecture intro
Clean architecture introClean architecture intro
Clean architecture intro
 
Component, Redux 기반 비디오 구조 제안
Component, Redux 기반 비디오 구조 제안Component, Redux 기반 비디오 구조 제안
Component, Redux 기반 비디오 구조 제안
 
Android QA Process
Android QA ProcessAndroid QA Process
Android QA Process
 

Kürzlich hochgeladen

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 

Kürzlich hochgeladen (20)

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 

Android Modularization

  • 2. What is the App modularization Modular programming ● Is a software design technique ● Separates a program into modules according to the functionality Module ● Is independent and interchangeable ● Contains everything necessary ● Contains only one aspect of the desired functionality “App Modularization is to modularize the Android App.”
  • 3. Why do we need to modularize app ● Faster build time ● Separation of concerns ● Fine-grained dependency control ● Improved reusability across other apps ● Improved the ownership & the quality of the codebase
  • 4. Faster build time App Feature Feature Library Library Build only what we need Build by Parallel Feature Feature Library Library
  • 5. Separation of Concerns ● A basic principle of software design ● Software modules should have distinct responsibilities as much as possible Appshell Feed Locker Tutorial Auth Ad Content
  • 6. Fine-grained dependency control ● Reusability ● Scalability ● Testability Appshell Feed Locker Tutorial Auth Ad Content
  • 7. Improved reusability across other apps H/S Feed Locker Tutorial Auth Ad Content S/J
  • 8. Improved the ownership & the quality of the codebase H/S Feed Locker Tutorial Auth Ad Content S/J JD MJ Josh
  • 9. How to modularize ● Modularization by Feature ● Modularization by Library
  • 10. Modularize by Feature Feature is a unit of app functionality App App Feature Feature Feature
  • 11. Modularize by Library App Feature Feature Feature App Feature Feature Feature Library Library Library Make a library module for sharing code
  • 12. ● Appshell Module ● Feature Module ● Library Module Multi Module Architecture App Appshell Feature Feature Feature Library Library Library
  • 13. Appshell Module Appshell Feature Feature Feature Library Library Library ● Dependency Injection ○ Feature Module ○ Library Module ○ Navigator ● Project build script ● Project configs. (ex : APP_KEY)
  • 14. Feature Module Appshell Feature Feature Feature Library Library Library ● Feature is a unit of app functionality ● Feature module can be divided into more smaller feature modules ○ The smaller is the better ● Boundary depends on stakeholder’s decision ● Feature module is not referred by other feature modules ● Feature module may have the view or not ● Dependency scope should be created for each module
  • 15. Library Module Appshell Feature Feature Feature Library Library Library ● There can be redandant codes between feature modules ● Redandant codes should be extracted into the library ● Recommendations ○ No business logic for specific feature ○ Stateless
  • 16. Considerations ● Do we need a core module? ○ Core module is a module that has no state and has removed its business logic completely ● Should android service belong to feature module? ● How can we define auth module? ● Should we design each module to follow a specific architecture? ● Should we make the dynamic feature module?
  • 17. Should we need a core module? ● Core module is a module that has no state and has removed its business logic completely ● There are not many modules yet ● It is better to manage Library and Core modules together Library Core Library Core Feature Feature Feature Appshell
  • 18. Should android service belong to feature module? ● Android service ○ Could be a feature module ○ Could be a library module, otherwise ○ Depends on the stakeholder’s decision
  • 19. How can we define auth module? Appshell Feed Locker Tutorial Auth Ad Content ● Define auth module as a library module that has purely authentic logic without any feature-specific logic ● Define feed module as a feature module that handles to login using auth module
  • 20. Should we design each module to follow a specific architecture? ● Each module can be built with independant architecture ● Some modules have data and domain layer ● Some modules have only one class ● Therefore, no rule can be defined for the architecture we must follow
  • 21. Should we make the dynamic feature module? ● One of module belongs to the app bundle, being pushed by google ○ Allowing the module not to be installed at the initial installation ○ Reducing the app size ● The key point is the inversion of dependency between app and module ● If we have well architectured modules, we can integrate it easily at anytime
  • 22. Module Navigation ● Each feature modules don’t know class in another module ● Therefore, navigator should be injected to the feature modules ● How to implement? ○ Reflection ○ DI Interface ○ Jetpack Navigation
  • 23. Navigation with Reflection (Google) Google’s example
  • 24. Navigation with Reflection (Airbnb) Airbnb’s example
  • 28. Navigation with Jetpack’s Navigation If you wanna more information, visit this
  • 29. Which implementation of navigation should we choose ● Navigation is one of the most important module on modularization ● Navigation needs changeable abstraction ● Reflection seems to be the best for now ○ There are use case of major company ○ It can implement without any dependencies ● Jetpack’s navigation seems to be restricted yet
  • 30. Module Communication ● Callback or Listener Interface ● RxJava ● LiveData
  • 31. Callback or Listener Interface
  • 34. LiveData ● Callback or Listener : simple and easy ● RxJava : reactive stream and functional operator ● LiveData : reactive stream and lifecycle management We do not have to enforce certain principles
  • 35. Source Repository ● Multirepo vs Monorepo Monorepo is better
  • 36. Source Control Management ● Git ○ DVCS ○ Based on Snapshot ○ Sensitive to the size of repository ● Mercurial ○ DVCS ○ Based on Patch ○ Not sensitive to the size of repository Depends on the code scale. → Git is better for now
  • 37. Branching Strategy ● Git Flow ○ Well-defined branching procedures ○ There can be many conflicts during the merging process. ● Trunk Based Development ○ Always ready to be released ○ Universal versioning ○ Simple merging strategy Trunk Based Development is better for monorepo.
  • 40. Version Management ● Do not assign a version to each module ○ Management of each version causes dependency hell ● Just assign only universal version
  • 41. Build Tool ● Gradle ○ Google Standard ○ Simple and easy ○ Slow in many modules ● Buck ○ Used by Facebook, Uber, and Twitter ○ Challenging configuration ○ Fast in many modules ● Bazel ○ Used by Google ○ Challenging configuration ○ Fast in many modules Depends on the code scale. Gradle is better for now
  • 42. Continuous Integration ● There are so many tools for CI ● It does not matter which tool we use ● The most important part is to build and test the exact modules we need
  • 43. 3rd Party Library ● Dagger ● RxJava ● LiveData ● ViewModel Just use it
  • 44. Q & A