Android 之 APP 架构
2014-12-23 22:21
176 查看
关键词:
android architecture patterns
题目好大,吓死自己了……
架构是自己一直都不了解的东西,只有好好地不断积累学习。
如何描述软件的架构
移动App设计之分层架构+MVC
Android Architectural patterns
Architectural patterns for Mobile Application Development
Android Passive MVC: a Novel Architecture Model for Android Application Development
先看看别人是怎么做的:Fitness Android Application
从传统的 MVC 思想出发,参考: Android Architecture,这个博客里有三篇相关文章,介绍比较详细,要翻墙才能看,我下载放到 csdn 来了。
另一种思想是,把 MVC 变成 MVP,因为在 Android 使用 controller 一般是在 activity 或 fragment ,经常会把 View 层的东西混进来。
参考:Android application architecture - what is the suggested model?
The most popular architecture for software is:
Presentation Layer
Business Layer
Data Layer
存储 - 文件、数据库、配置;
缓存、更新、清理。
后台进程 - 是运行一个 services 还是新建一个 thread ?
UI进程管理
网络状态管理:添加了一个 receiver 监听网络状态变化,如有变化,发送一个全局事件,让感兴趣的主体来接收处理。
存储:简单来做,定时清理(一个月)而不是定量清理。
代码结构:
参考:App工程结构搭建
关于 Android 的进程:
APP crash 之后,有可能主进程还在活动,如果有 Socket 连接的,Socket 连接也还可以会在。下次进来就可能不会再初始化了。
APP crash 之后,可能直接重新进入上次 crash 的 activity ,当然,还会初始化自定义的 Application,但可能会不经过 android.intent.action.MAIN 声明的 activity ,此时要注意初始化的东西。
android architecture patterns
题目好大,吓死自己了……
架构是自己一直都不了解的东西,只有好好地不断积累学习。
如何描述软件的架构
移动App设计之分层架构+MVC
Android Architectural patterns
Architectural patterns for Mobile Application Development
Android Passive MVC: a Novel Architecture Model for Android Application Development
先看看别人是怎么做的:Fitness Android Application
从传统的 MVC 思想出发,参考: Android Architecture,这个博客里有三篇相关文章,介绍比较详细,要翻墙才能看,我下载放到 csdn 来了。
另一种思想是,把 MVC 变成 MVP,因为在 Android 使用 controller 一般是在 activity 或 fragment ,经常会把 View 层的东西混进来。
参考:Android application architecture - what is the suggested model?
The most popular architecture for software is:
Presentation Layer
Business Layer
Data Layer
存储 - 文件、数据库、配置;
缓存、更新、清理。
后台进程 - 是运行一个 services 还是新建一个 thread ?
UI进程管理
网络状态管理:添加了一个 receiver 监听网络状态变化,如有变化,发送一个全局事件,让感兴趣的主体来接收处理。
存储:简单来做,定时清理(一个月)而不是定量清理。
代码结构:
参考:App工程结构搭建
关于 Android 的进程:
APP crash 之后,有可能主进程还在活动,如果有 Socket 连接的,Socket 连接也还可以会在。下次进来就可能不会再初始化了。
APP crash 之后,可能直接重新进入上次 crash 的 activity ,当然,还会初始化自定义的 Application,但可能会不经过 android.intent.action.MAIN 声明的 activity ,此时要注意初始化的东西。
相关文章推荐
- 王家林的81门一站式云计算分布式大数据&移动互联网解决方案课程第14门课程:Android软硬整合设计与框架揭秘: HAL&Framework &Native Service &App&HTML5架构设计与实战开发
- App工程结构搭建:几种常见Android代码架构分析
- android app 组成架构
- Android App整体架构设计的思考
- (转)App工程结构搭建:几种常见Android代码架构分析
- Android平台添加外设的架构流程(kernel->HAL->JNI->API->APP)之学习提高篇
- App工程结构搭建:几种常见Android代码架构分析
- App工程结构搭建:几种常见Android代码架构分析
- Android App整体架构设计的思考(二)
- App工程结构搭建:几种常见Android代码架构分析
- Android修炼之道—APP架构MVC
- 『ANDROID』App工程结构搭建:几种常见Android代码架构分析
- App工程结构搭建:几种常见Android代码架构分析
- App工程结构搭建:几种常见Android代码架构分析
- 一个通用的Android App架构
- App工程结构搭建:几种常见Android代码架构分析
- android app 架构设计02
- 【Android 开发实例】时间管理APP开发之整体包架构分析
- android APP是否需要缓存?+简单架构
- App工程结构搭建:几种常见Android代码架构分析