Comments (1)
模块划分主要还是为了解耦和复用,没有最好的模块划分,需要针对不同业务来划分不同的模块,一般来说分为以下几个不同模块:
主模块
做为所有业务模块的壳,初始化各个组件等。
业务模块
建议早期实施模块化的时候,可以以一种”较粗”的粒度来进行,这样左右的好处在于后期随着对业务的理解进行再次细分,而不会有太大的成本,这也是一个孰能生巧的过程。
common模块
存放一些要使用到的三方库,最好封装好,比如支付、分享、登录等业务这一块都可以放在这里
base模块
这里主要存放一些base类,封装好的baseactivity、basefragment等,网络模块、数据库操作等也可放这里,当然也可以放common子模块
希望能对你有帮助
from wanandroid.
Related Issues (5)
- RxLifecycle替换方案,可以了解一下 HOT 1
- 没有搜索到该库 HOT 1
- 编译成功,但有警告 HOT 1
- Model层不进行封装么? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wanandroid.