android design patterns.pdf,what are the design patterns used in android? - Stack Overflow

Android uses a lot of patterns in side its structure.

The very first pattern you can see is Layer pattern, it is classified as architecture pattern in POSA 1 (Pattern-oriented Software Architecture 1) book. The main structural characteristic of the Layers pattern is that the services of Layer J are only used by LayerJ+1 there are no further direct dependencies between layers. This pattern will solve the problem about the mix of low- and high-level issues, where high-level operations rely on the lower-level ones. Android is built on a stack of multi abstract level layer ( refer to http://elinux.org/Android_Architecture for more detail), so this design is deployed to solve its problem.

Android does a lot of stuffs on multi processes, so an IPC (inter-process communication) mechanism needs to be well-designed. In Android, Binder and using AIDL to make the communication seamlessly though services in these processes may be written in Java, C or C++. Binder is implemented by Proxy (In Gang of Four book), Broker (in POSA 1 book) and Facade Wrapper pattern (refer to this link http://www.cs.wustl.edu/~schmidt/PDF/wrapper-facade.pdf) to implement. Proxy pattern will hide communication detail from client, so a process can communicate with object in local context or in network context uniformly. Broker is used to isolate communication-related concerns. Facade Wrapper pattern is used to to encapsulate low-level functions and data structures in C library Android within higher class interface.

Multi threading mechanism also uses a lot of pattern. A pattern we can see is Command Processor pattern used to execute long-running call.

Observer pattern is used to keep track of system-related status.

….

Those are all I can remember now. If you are interested in Android design pattern. You can take a look at this course: https://class.coursera.org/posa-001/class/index on Coursera for more detail.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值