Android应用开发框架结构
2011-05-03 23:27
666 查看
1.Android的应用开发与传统的Win32应用开发的区别
1)Android是一种松散的逻辑对象体
![](http://pic002.cnblogs.com/images/2011/104790/2011042818580676.png)
(Win32应用)
![](http://pic002.cnblogs.com/images/2011/104790/2011042818584472.png)
(Android应用)
P1-P2-P3B2;P1-P2-P3-B3;P1-P2-P3-B2-B3;B1-V1;B1-V2...等等组新的应用集合,应用之间的逻辑讲究的是复用,是一个松散的集合,Android讲究的是这种散的概念。
2)Android是事务先于实体而存在的,传统的Win32是一个实体逻辑通过消息组成事务,就存在实体可以做什么通过win平台消息告诉对方做什么。而Android的平台是告诉平台我想做什么,平台才去找对应的Activity,而并不一定能找到对应的逻辑体。
![](http://pic002.cnblogs.com/images/2011/104790/2011042818591210.png)
2.Android应用文件结构
![](http://pic002.cnblogs.com/images/2011/104790/2011042909182581.png)
Android应用文件系统主要包括3部分,1)可执行代码部分,可执行相对于虚拟机来说的,Android应用是构建在java语言之上的,可以通过jni接入C和C++部分 2)资源文件,包括数据,图片,Activity结构等3)Androidmanifest.xml是整个应用项目的说明书,告诉平台都有什么,在那里
3.Android的应用开发主要包括四个部分
Activity
Intent
Service
Content Provier
1)Activity
![](http://pic002.cnblogs.com/images/2011/104790/2011042818593630.png)
Activity构成Android应用的基本单元,就是一个逻辑单元,也就是一个对象,或者说是一个类,处理一部分工作逻辑。主要完成2部分工作,接收平台传过来的消息或发生到平台消息消息,然后画图,得到给用户提供的交换界面,也就是形成所谓的手机窗体。
An
2)Intent
Intent是Android应用平台的消息体,负责携带命令和数据传给新的Activity。
intent receiver是在AndroidManifest.xml注册的过滤器,启到广播给其它Activity的作用。
Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents. Intent messaging is a facility for late run-time binding between components in the same or different applications. The intent itself, an
3)Service
Service是跑在Android平台的服务,提供类似于系统提醒消息的等
A
A service can essentially take two forms:
StartedA service is "started" when an application component (such as an activity) starts it by calling
4)Content Provider
Content Provider是Android平台提供的一个数据共享的中间层
Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's no common storage area that all Android packages can access(官方文档定义)
1)Android是一种松散的逻辑对象体
![](http://pic002.cnblogs.com/images/2011/104790/2011042818580676.png)
(Win32应用)
![](http://pic002.cnblogs.com/images/2011/104790/2011042818584472.png)
(Android应用)
P1-P2-P3B2;P1-P2-P3-B3;P1-P2-P3-B2-B3;B1-V1;B1-V2...等等组新的应用集合,应用之间的逻辑讲究的是复用,是一个松散的集合,Android讲究的是这种散的概念。
2)Android是事务先于实体而存在的,传统的Win32是一个实体逻辑通过消息组成事务,就存在实体可以做什么通过win平台消息告诉对方做什么。而Android的平台是告诉平台我想做什么,平台才去找对应的Activity,而并不一定能找到对应的逻辑体。
![](http://pic002.cnblogs.com/images/2011/104790/2011042818591210.png)
2.Android应用文件结构
![](http://pic002.cnblogs.com/images/2011/104790/2011042909182581.png)
Android应用文件系统主要包括3部分,1)可执行代码部分,可执行相对于虚拟机来说的,Android应用是构建在java语言之上的,可以通过jni接入C和C++部分 2)资源文件,包括数据,图片,Activity结构等3)Androidmanifest.xml是整个应用项目的说明书,告诉平台都有什么,在那里
3.Android的应用开发主要包括四个部分
Activity
Intent
Service
Content Provier
1)Activity
![](http://pic002.cnblogs.com/images/2011/104790/2011042818593630.png)
Activity构成Android应用的基本单元,就是一个逻辑单元,也就是一个对象,或者说是一个类,处理一部分工作逻辑。主要完成2部分工作,接收平台传过来的消息或发生到平台消息消息,然后画图,得到给用户提供的交换界面,也就是形成所谓的手机窗体。
An
Activityis an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. Each activity is given a window in which to draw its user interface. The window typically fills the screen, but may be smaller than the screen and float on top of other windows.(官方文档的定义)
2)Intent
Intent是Android应用平台的消息体,负责携带命令和数据传给新的Activity。
intent receiver是在AndroidManifest.xml注册的过滤器,启到广播给其它Activity的作用。
Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents. Intent messaging is a facility for late run-time binding between components in the same or different applications. The intent itself, an
Intentobject, is a passive data structure holding an abstract description of an operation to be performed — or, often in the case of broadcasts, a description of something that has happened and is being announced. There are separate mechanisms for delivering intents to each type of component:(官方文档的定义)
3)Service
Service是跑在Android平台的服务,提供类似于系统提醒消息的等
A
Serviceis an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. Additionally, a component can bind to a service to interact with it and even perform interprocess communication (IPC). For example, a service might handle network transactions, play music, perform file I/O, or interact with a content provider, all from the background.
A service can essentially take two forms:
StartedA service is "started" when an application component (such as an activity) starts it by calling
startService(). Once started, a service can run in the background indefinitely, even if the component that started it is destroyed. Usually, a started service performs a single operation and does not return a result to the caller. For example, it might download or upload a file over the network. When the operation is done, the service should stop itself.BoundA service is "bound" when an application component binds to it by calling
bindService(). A bound service offers a client-server interface that allows components to interact with the service, send requests, get results, and even do so across processes with interprocess communication (IPC). A bound service runs only as long as another application component is bound to it. Multiple components can bind to the service at once, but when all of them unbind, the service is destroyed.(官方文档的定义)
4)Content Provider
Content Provider是Android平台提供的一个数据共享的中间层
Content providers store and retrieve data and make it accessible to all applications. They're the only way to share data across applications; there's no common storage area that all Android packages can access(官方文档定义)
相关文章推荐
- Android应用开发框架结构
- android应用开发框架+即时通讯IM app开发(1)-前言和工程目录结构
- Android开发 第二课 熟悉Android应用框架结构
- ZLayer Android企业级应用开发框架(直播代码版)
- 举例讲解Android应用开发中OTTO框架的基本使用
- android 快速开发框架,基于组件化的MVP结构
- CodingBlack的android应用开发框架
- Android应用开发———Android应用程序工程的目录结构
- xUtils简介 (源于afinal框架是一个开源的android的orm和ioc应用开发框架)
- 【Android高级】应用开发必需要掌握的框架<Volley>
- Android应用开发编译框架流程与IDE及Gradle概要
- android 五大应用开发框架是什么
- afinal - afinal 是一个android的 orm 和 ioc 框架。通过afinal的finalAcitivity,finalBitmap,finalDB,finalHttp,开发android应用将更加简单。 - Google Project Hosting
- Android ORM应用开发框架KJFrameForAndroid使用详解
- Jokerlibrary——Android应用开发框架
- android开发框架测评,收录应用最为广泛的开发框架
- Android开发自学笔记(Android Studio1.3.1)—3.Android应用结构解析
- android开发入门之 应用结构分析
- Android开发学习总结(五)——Android应用目录结构分析
- Android应用开发结构分析