Aspect Oriented Programming (AOP) - A case study in Android
-
Upload
carlos-anjos -
Category
Technology
-
view
7.111 -
download
0
Transcript of Aspect Oriented Programming (AOP) - A case study in Android
![Page 2: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/2.jpg)
Why ?
![Page 3: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/3.jpg)
Developing for Android
● The 5 stages of grief● Denial
– “This can't be that bad, I must be missing something ...”● Anger
– “WTF did they have to reinvent the wheel … for the worse ?!”● Bargaining
– “Maybe I can find a port of my favorite framework for android … Err.... Maybe I can patch it to make it work ...”
● Depression– “Nothing works … nothing will ever work … :'-( Maybe I should stick to
doing HTML and Javascript ...“● Acceptance
– “Oh well … let's start coding !” - «Resistance is futile»
![Page 4: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/4.jpg)
Real men don't eat honey, they chew bees !
![Page 5: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/5.jpg)
What is AOP ?
![Page 6: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/6.jpg)
AspectJ
![Page 7: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/7.jpg)
AspectJ – Java AOP
● Cross-cutting concerns
![Page 8: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/8.jpg)
AOP - Weaving
Source: AspectJ in Action
![Page 9: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/9.jpg)
AOP – Like Themes
![Page 10: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/10.jpg)
Concepts
•Jointpoint
•Pointcut
•Advice
•Aspect
![Page 11: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/11.jpg)
How AspectJ implements AOP
Source code weavingBinary weaving
Load Time weaving
![Page 12: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/12.jpg)
How it works
![Page 13: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/13.jpg)
How it works
![Page 14: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/14.jpg)
How it works (with Android)
![Page 15: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/15.jpg)
The case study
![Page 16: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/16.jpg)
AspectJ FTW!
}
![Page 17: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/17.jpg)
AspectJ - Level 2
![Page 18: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/18.jpg)
AspectJ – Level 3
![Page 19: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/19.jpg)
AspectJ - Level 4
![Page 20: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/20.jpg)
AspectJ – Level 5
![Page 21: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/21.jpg)
AspectJ – Level 6
![Page 22: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/22.jpg)
AspectJ – Level 7
![Page 23: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/23.jpg)
AspectJ – Level 8
![Page 24: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/24.jpg)
AspectJ – Level 100
![Page 25: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/25.jpg)
AspectJ – Over 9000 !
Paradigm Shift !
Careful …
don't try to solve everything with aspects !
OOP is still good ! :-)
![Page 26: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/26.jpg)
“Perfection is achieved, not when there is nothing more to add,
but when there is nothing left to take away.”
Antoine de Saint-Exupéry
![Page 27: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/27.jpg)
Resources
● AspectJ in Action, Ramnivas Laddad● http://www.eclipse.org/aspectj/● http://www.eclipse.org/ajdt/● http://android.imeshine.com/
● stackoverflow.com
● commonsware.com● apps.sapo.pt● developer.android.com
![Page 28: Aspect Oriented Programming (AOP) - A case study in Android](https://reader033.fdocuments.in/reader033/viewer/2022050613/54845931b4af9fe23f8b4749/html5/thumbnails/28.jpg)
Questions ?