SlideShare a Scribd company logo
AndroidAnnotations
RoboGuice
Android programing frameworks
By: Joel Sticha
AndroidAnnotations
AndroidAnnotations was created by Pierre-Yves Ricau
and is sponsored by eBusinessInformations.
Why use android annotations?
 Goals
 We want to facilitate the writing and maintenance of android applications
 Android Annotations strives to achieve these goals by making code simple to
understand with clear intents
 Robert C. Martin (Uncle Bob)
 "The ratio of time spent reading [code] versus writing is well over 10 to 1
[therefore] making it easy to read makes it easier to write."
 Using Java annotations, developers can show their intent and let
AndroidAnnotations generate the plumbing code at compile time.
Features of AndroidAnnotations
 Dependency injection: inject views, extras, system services, resources, ...
 Simplified threading model: annotate your methods so that they execute on
the UI thread or on a background thread.
 Event binding: annotate methods to handle events on views, no more ugly
anonymous listener classes!
 REST client: create a client interface, AndroidAnnotations generates the
implementation.
 AndroidAnnotations provide those good things and even more for less than
50kb, without any runtime performance impact!
Is your Android code easy to write, read, and
Maintain?
Applications already using
AndroidAnnotations:
https://github.com/excilys/androidannotations/wiki/Apps-using-
AndroidAnnotations
Android Annotations bottom line
 It takes out the most repetitive code in your application
 It helps you create cleaner code that is easier to read
 It can be included with small changes to your project and editing environment
 Add two jar files to the Java Build Path for your project.
 Add AndroidAnnotations as a annotation processor in the Java Compiler Settings
 Rename the activities to xxxx_
RoboGuice
Dependency Injection for Android
Current Version is 2.0
What RoboGuice Does
 RoboGuice is a dependency injection framework for Android
 It uses the Google Guice framework as the backbone
Classic android
Class with RoboGuice
Example Program

More Related Content

ODP
Advanced Android Development
PPTX
What and Why Flutter? What is a Widget in Flutter?
PPTX
Flutter vs not flutter
PDF
Top Cross-Platform App Development Frameworks for 2020
PPTX
Android Study Jams - Info Session
PPTX
Flutter
PDF
Flutter Development Services
PDF
Getting Started with Android Development
Advanced Android Development
What and Why Flutter? What is a Widget in Flutter?
Flutter vs not flutter
Top Cross-Platform App Development Frameworks for 2020
Android Study Jams - Info Session
Flutter
Flutter Development Services
Getting Started with Android Development

What's hot (19)

PPTX
Flutter for web
PPSX
My android
PDF
Intro to Flutter
PDF
#Code2Create:: Introduction to App Development in Flutter with Dart
PDF
Developing Cross platform apps in flutter (Android, iOS, Web)
PPTX
Flutter 1
PDF
Flutter Tutorial For Beginners | Edureka
PDF
Pune Flutter Presents - Flutter 101
PPTX
Flutter
PPTX
Flutter dhaval solanki
PPTX
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
PDF
Android study jams
PPTX
Introduction to flutter(1)
PPTX
Flutter UI Framework
PPTX
Introduction to Flutter
PDF
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
PPTX
Mobile Application Development
PDF
What is React Native?
PPTX
Create iOS and Android apps in Java with Multi-OS Engine
Flutter for web
My android
Intro to Flutter
#Code2Create:: Introduction to App Development in Flutter with Dart
Developing Cross platform apps in flutter (Android, iOS, Web)
Flutter 1
Flutter Tutorial For Beginners | Edureka
Pune Flutter Presents - Flutter 101
Flutter
Flutter dhaval solanki
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Android study jams
Introduction to flutter(1)
Flutter UI Framework
Introduction to Flutter
Getting Started with Cross-Platform Mobile Development with Flutter and Dart
Mobile Application Development
What is React Native?
Create iOS and Android apps in Java with Multi-OS Engine
Ad

Similar to Android Annotations and RoboGuice (20)

PDF
Top 7 Node JS IDEs for App Development in 2022.pdf
PPTX
Android Web app
PDF
International Journal of Engineering Research and Development
PDF
7 Awesome Android App Development Tools You Can't Afford to Ignore in 2025.pdf
PPTX
Telerik Kendo UI vs. AngularJS
PDF
Android app development SEO Expert Bangladesh LTD.pdf
PDF
Android app development SEO Expert Bangladesh LTD.pdf
PDF
6 Best JavaScript Framework for Mobile Apps Trending in 2023.pdf
PDF
Mobile Application Development-Lecture 03 & 04.pdf
PDF
Top 10 Android Frameworks for Modern.pdf
PDF
13 Best Mobile IDEs for Android.pdf
PDF
Phonebook Directory or Address Book In Android
PPTX
15 android libraries for app development
PDF
Android workshop series
PDF
A Deep Dive into Android App Development 2.0.pdf
PDF
Porting business apps to Windows Phone
PDF
How to Develop Cross Platform Application in Visual Studio Code?
PPTX
Material design Android L
PDF
React.js vs React Native: Understanding the key differences
PPTX
2018 top ide's for andriod development
Top 7 Node JS IDEs for App Development in 2022.pdf
Android Web app
International Journal of Engineering Research and Development
7 Awesome Android App Development Tools You Can't Afford to Ignore in 2025.pdf
Telerik Kendo UI vs. AngularJS
Android app development SEO Expert Bangladesh LTD.pdf
Android app development SEO Expert Bangladesh LTD.pdf
6 Best JavaScript Framework for Mobile Apps Trending in 2023.pdf
Mobile Application Development-Lecture 03 & 04.pdf
Top 10 Android Frameworks for Modern.pdf
13 Best Mobile IDEs for Android.pdf
Phonebook Directory or Address Book In Android
15 android libraries for app development
Android workshop series
A Deep Dive into Android App Development 2.0.pdf
Porting business apps to Windows Phone
How to Develop Cross Platform Application in Visual Studio Code?
Material design Android L
React.js vs React Native: Understanding the key differences
2018 top ide's for andriod development
Ad

Recently uploaded (20)

PPTX
Pharma ospi slides which help in ospi learning
PDF
Business Ethics Teaching Materials for college
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Institutional Correction lecture only . . .
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
RMMM.pdf make it easy to upload and study
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharma ospi slides which help in ospi learning
Business Ethics Teaching Materials for college
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPH.pptx obstetrics and gynecology in nursing
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Cell Structure & Organelles in detailed.
Microbial diseases, their pathogenesis and prophylaxis
Institutional Correction lecture only . . .
Pharmacology of Heart Failure /Pharmacotherapy of CHF
RMMM.pdf make it easy to upload and study
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Basic Mud Logging Guide for educational purpose
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

Android Annotations and RoboGuice

Editor's Notes

  • #4: While we all enjoy developing Android applications, we often wonder: Why do we always need to write the same code over and over? Why are our apps harder and harder to maintain? Context and Activitygod objects, complexity of juggling with threads, hard to discover API, loads of anonymous listener classes, tons of unneeded casts... can't we improve that?Robert C. Martin (Uncle Bob)"The ratio of time spent reading [code] versus writing is well over 10 to 1 [therefore] making it easy to read makes it easier to write."
  • #5: AndroidAnnotations has a little compilation overhead (how it works), but the generated classes are good old classic Android code. No reflection. No startup time, and no runtime impact.
  • #6: Annotations do not need the id unless it differs from the java object name.Easy threading
  • #9: My Examples will be using v1.1.1