SlideShare a Scribd company logo
Introduction to AspectJ 
Erol KOCAMAN 
GDG Istanbul 
25/10/2014
Peak Games
Peak Games
Agenda 
● Why we use AOP ? 
● Cross Cutting Concerns 
● Aspect Implementations in Java 
● AOP with OOP 
● AspectJ Compiler 
● Demo Project
Why do we use AOP ? 
GAME 1 
Module 1 
Module 2 
Module 3 
GAME 2 
Module 4 
Android 
IOS 
Desktop
Cross Cutting Concerns 
In App Billing Networking Game 
Logging Analytics Profiling
After Aspect 
In App Billing Networking Game 
Logging 
Aspect 
Analytics 
Aspect 
Profiling 
Aspect
AOP / OOP 
● OOP is encapsulation of module for better 
understanding 
● You can even do the same thing with OOP by 
coding more 
● AOP is valid for all programming paradigms
Aspect Implementations 
● AspectJ 
● Spring AOP 
● JBossAOP 
● JAC 
● Colt 
● PROSE
AspectJ Compiler 
Java & Aspect 
Source Files 
Java & Aspect 
Archive Files 
Java & Aspect 
Archive Files 
Java (.jar) 
& Aspect 
Archive Files 
(.jar) 
(.jar) 
AspectJ 
Compiler 
(ajc) 
Woven system 
(.class files) 
Java & Aspect 
Source Files 
Java & Aspect 
Source Files 
(.java)
Program Execution 
Terminology 
Advice 
// aspect code 
if (...) { 
... 
} else { 
... 
} 
Pointcut 
Join Points
JoinPoint Types 
● Method 
● call 
● execution 
execution(* android.mobile.peakgames.net.aspectjandroid.AspectActivity.fetchImage(..)) 
● Constructor 
execution(* android.mobile.peakgames.net.aspectjandroid.AspectActivity.new(..)) 
● Field Access 
● Exception Handler Execution 
● Class Initialization
Call / Execution Aspect Difference 
ATM Account 
debit(...) 
Aspect 
Call Execution 
Aspect
AspectJ Annotations 
@Aspect 
@Pointcut 
@Before 
@After 
@AfterReturning 
@AfterThrowing 
@Around
Code with sample 
https://github.com/firstthumb/AspectJ-Android-Example
Thank You! 
We are Hiring! 
www.peakgames.net

More Related Content

PPTX
AOP on Android
PPTX
AQA TALKS 4 - AUTOMATION TEST REPORTER
PDF
Robot Framework with actual robot
PPTX
Automation is Easy! (python version)
PDF
Barcamp Bangkhen :: Robot Framework
PDF
Automation using RobotFramework for embedded device
ODP
Weaving aspects in PHP with the help of Go! AOP library
PDF
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...
AOP on Android
AQA TALKS 4 - AUTOMATION TEST REPORTER
Robot Framework with actual robot
Automation is Easy! (python version)
Barcamp Bangkhen :: Robot Framework
Automation using RobotFramework for embedded device
Weaving aspects in PHP with the help of Go! AOP library
TestWorks Conf Robot framework - the unsung hero of test automation - Michael...

What's hot (20)

PDF
Introduction to Robot Framework
PPTX
Robot Framework : Lord of the Rings By Asheesh M
PDF
Functional Tests Automation with Robot Framework
PPTX
Not your fathers language c++
PPTX
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
PDF
Robot framework - Lord of the Rings
PDF
Robot Framework Introduction & Sauce Labs Integration
PPT
Specs2 3.0
PDF
Efficient mobile automation
PPTX
Robot framework Gowthami Goli
PPTX
Javascript unit tests with angular 1.x
PDF
Eclipse Testing Day 2010. Xored Q7
PDF
Acceptance Test Drive Development with Robot Framework
PDF
Solving cross cutting concerns in PHP - PHPSerbia-2017
PPTX
Никита Манько “Code review”
PDF
Test automation design patterns
PPTX
Aop With Post Sharp
PDF
利用 Appium + Robot Framework 實現跨平台 App 互動測試
PDF
Introduction to Robot Framework – Exove
PDF
Continuous Integration for iOS Developer
Introduction to Robot Framework
Robot Framework : Lord of the Rings By Asheesh M
Functional Tests Automation with Robot Framework
Not your fathers language c++
Олексій Павленко. CONTRACT PROTECTION ON THE FRONTEND SIDE: HOW TO ORGANIZE R...
Robot framework - Lord of the Rings
Robot Framework Introduction & Sauce Labs Integration
Specs2 3.0
Efficient mobile automation
Robot framework Gowthami Goli
Javascript unit tests with angular 1.x
Eclipse Testing Day 2010. Xored Q7
Acceptance Test Drive Development with Robot Framework
Solving cross cutting concerns in PHP - PHPSerbia-2017
Никита Манько “Code review”
Test automation design patterns
Aop With Post Sharp
利用 Appium + Robot Framework 實現跨平台 App 互動測試
Introduction to Robot Framework – Exove
Continuous Integration for iOS Developer
Ad

Viewers also liked (16)

ODP
Aspect Oriented Programming (AOP) - A case study in Android
PDF
Aspect Oriented Programming and Design
PPTX
Introduction to Aspect Oriented Programming
KEY
Spring AOP
PDF
Infinum Android Talks #02 - How to write an annotation processor in Android
PDF
マルチテナントメッセージング基盤を刷新して一年運用した話
PDF
Aspect Oriented Software Development
PPT
Introduction to Aspect Oriented Software Development
PPTX
Aspect Oriented Programing - Introduction
PDF
PPT
Aspect Oriented Software Development
PPT
Aspect Oriented Programming
PDF
Aspect oriented software development
PPTX
Component based software engineering
PPTX
Introduction to Aspect Oriented Programming
PDF
Spring Framework - AOP
Aspect Oriented Programming (AOP) - A case study in Android
Aspect Oriented Programming and Design
Introduction to Aspect Oriented Programming
Spring AOP
Infinum Android Talks #02 - How to write an annotation processor in Android
マルチテナントメッセージング基盤を刷新して一年運用した話
Aspect Oriented Software Development
Introduction to Aspect Oriented Software Development
Aspect Oriented Programing - Introduction
Aspect Oriented Software Development
Aspect Oriented Programming
Aspect oriented software development
Component based software engineering
Introduction to Aspect Oriented Programming
Spring Framework - AOP
Ad

Similar to AspectJ Android with Example (20)

PPTX
Aspect Oriented Programming: Hidden Toolkit That You Already Have
PPTX
Comparison between Eclipse and Android Studio for Android Development
PPTX
Seminar presentation on OpenGL
PDF
Lesson 1 - OpenGL
PPTX
Creating a reasonable project boilerplate
PPTX
AGDK tutorial step by step
PPTX
OpenGL ES Presentation
PDF
LCU14 310- Cisco ODP v2
PDF
Java 9 and Project Jigsaw
PPT
Advanced Graphics Workshop - GFX2011
PDF
Opengl basics
PDF
Getting Started with Spring for GraphQL
PDF
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
DOCX
Computer graphics workbook
PDF
Java Programming 100 Programming Challenges
PDF
Brief introduction to Angular 2.0 & 4.0
PDF
BKK16-106 ODP Project Update
PDF
Spring Update | July 2023
PDF
Spock pres
Aspect Oriented Programming: Hidden Toolkit That You Already Have
Comparison between Eclipse and Android Studio for Android Development
Seminar presentation on OpenGL
Lesson 1 - OpenGL
Creating a reasonable project boilerplate
AGDK tutorial step by step
OpenGL ES Presentation
LCU14 310- Cisco ODP v2
Java 9 and Project Jigsaw
Advanced Graphics Workshop - GFX2011
Opengl basics
Getting Started with Spring for GraphQL
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
Computer graphics workbook
Java Programming 100 Programming Challenges
Brief introduction to Angular 2.0 & 4.0
BKK16-106 ODP Project Update
Spring Update | July 2023
Spock pres

Recently uploaded (20)

PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
additive manufacturing of ss316l using mig welding
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Foundation to blockchain - A guide to Blockchain Tech
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Sustainable Sites - Green Building Construction
CYBER-CRIMES AND SECURITY A guide to understanding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
OOP with Java - Java Introduction (Basics)
Operating System & Kernel Study Guide-1 - converted.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
573137875-Attendance-Management-System-original
bas. eng. economics group 4 presentation 1.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Mechanical Engineering MATERIALS Selection
additive manufacturing of ss316l using mig welding
UNIT-1 - COAL BASED THERMAL POWER PLANTS

AspectJ Android with Example

  • 1. Introduction to AspectJ Erol KOCAMAN GDG Istanbul 25/10/2014
  • 4. Agenda ● Why we use AOP ? ● Cross Cutting Concerns ● Aspect Implementations in Java ● AOP with OOP ● AspectJ Compiler ● Demo Project
  • 5. Why do we use AOP ? GAME 1 Module 1 Module 2 Module 3 GAME 2 Module 4 Android IOS Desktop
  • 6. Cross Cutting Concerns In App Billing Networking Game Logging Analytics Profiling
  • 7. After Aspect In App Billing Networking Game Logging Aspect Analytics Aspect Profiling Aspect
  • 8. AOP / OOP ● OOP is encapsulation of module for better understanding ● You can even do the same thing with OOP by coding more ● AOP is valid for all programming paradigms
  • 9. Aspect Implementations ● AspectJ ● Spring AOP ● JBossAOP ● JAC ● Colt ● PROSE
  • 10. AspectJ Compiler Java & Aspect Source Files Java & Aspect Archive Files Java & Aspect Archive Files Java (.jar) & Aspect Archive Files (.jar) (.jar) AspectJ Compiler (ajc) Woven system (.class files) Java & Aspect Source Files Java & Aspect Source Files (.java)
  • 11. Program Execution Terminology Advice // aspect code if (...) { ... } else { ... } Pointcut Join Points
  • 12. JoinPoint Types ● Method ● call ● execution execution(* android.mobile.peakgames.net.aspectjandroid.AspectActivity.fetchImage(..)) ● Constructor execution(* android.mobile.peakgames.net.aspectjandroid.AspectActivity.new(..)) ● Field Access ● Exception Handler Execution ● Class Initialization
  • 13. Call / Execution Aspect Difference ATM Account debit(...) Aspect Call Execution Aspect
  • 14. AspectJ Annotations @Aspect @Pointcut @Before @After @AfterReturning @AfterThrowing @Around
  • 15. Code with sample https://github.com/firstthumb/AspectJ-Android-Example
  • 16. Thank You! We are Hiring! www.peakgames.net