Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2019-11-01:什么是AOP?在Android中它有哪些应用场景? #179

Open
Moosphan opened this issue Nov 1, 2019 · 6 comments
Open

Comments

@Moosphan
Copy link
Owner

Moosphan commented Nov 1, 2019

No description provided.

@Moosphan Moosphan changed the title 2019-11-01:什么是AOP?它有哪些应用场景? 2019-11-01:什么是AOP?在Android中它有哪些应用场景? Nov 1, 2019
@kwcn
Copy link

kwcn commented Nov 1, 2019

AOP,面向切面编程,Android里面大多是使用动态代理技术来实现
在日志统计,登录信息check,网络是否连接等场景有应用,主要是用来避免每次做check时都写重复的逻辑代码。

@gabyallen
Copy link

AOP,针对切面编程,Android里面大部分是使用动态代理技术来实现
在日志统计,登录信息检查,网络是否连接等场景有应用,主要是避免每次检查时都写重复的逻辑代码。

@chenqi5256969
Copy link

避免重复代码

@xiongliang120
Copy link

xiongliang120 commented Nov 5, 2019

Android 可以使用 AspectJ 实现 AOP 编程, 实现原理是编译时在注解处嵌入代码,侵入性小

@icytz
Copy link

icytz commented Nov 28, 2019

aop的实现有静态代理和动态代理,静态代理有静态代理模式,基于Ajc编译器的AspectJ,
动态代理有JDK动态代理,在android的实现是InvicationHandler,需要实现接口,该有CGlib 实习方式是创建子类来继承源类。
应用场景有各种状态监测比如登录、网络、权限等。日志埋点,性能分析。

@mlinqirong
Copy link

面向切面编辑 只要场景有埋点 日志分析

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants