SlideShare una empresa de Scribd logo
1 de 52
Making Android with Groovy
Presenta:
José Juan Reyes Zuñiga & Co.
ALTERNATIVE LANGS:
MAKING ANDROID
W/GROOVY
HELLO
WE'RE MAKINGDEVS
We are programmers
We're NOT great so ware developers, but we do our best
Programming is our favorite job and hobbie
We're learning about many platforms
We really want to be so ware professionals
You can find us as 'makingdevs' almost on every social
network (GitHub, Twitter, Facebook)
.
DISCLAIMER
Everything can be done with Java, but really?
We're newbies with Android, so maybe you found novice's
errors
Prefer fully type static lang? Try Ceylon
We don't support the Mafia
We're available a er this talk
This talk just be not enough to all that we want to show
This presentation represents our brief experience
AGENDA
Our history in Android
So, what is Groovy?
Why Groovy? (If you don't know...)
Essentials in Groovy (The intro is here)
What can we do? (The code is here)
Facing problems
Conclusion
OUR HISTORY IN
ANDROID
A team programming for Web and Backend Services, now
has to make iOS and Android apps
The team
WHY GROOVY?
3 million of downloads in 1 year
On Github since 2011(The same date as GoA born)
It's a dependency of 25000+ OSS Projects
Runs a JVM, Java code is valid code, but Groovy goes
beyond
Stop the suffer!!!
Java on Android is very verbose
Is OO, dynamic, functional, statically type checked and/or
compiled
Alex(Sascha) Klei is using it?
Boring vs. Fun!!!!
MAYBE YOU'RE USING GROOVY
https://github.com/Arasthel/SwissKnife
REALLY?
GROOVY ESSENTIALS
ESSENTIALS
Sintatic sugar
equality, maps, lists, threads, GStrings, resource
handling, ranges, dates, builders(with)
Groovy Beans
Listeners
Closure coercion
Map Coercion
DEMO
MODELS AND GROOVY BEANS
@CompileStatic
class Checkin implements Serializable {
Date created_at // Retrofit, you know!
String method
Date updated_at
@Bindable
S3Asset s3_asset
Barista baristum = new Barista()
// ... more properties
// No more getters and setters
}
GSTRINGS
@CompileStatic
class BaristaOpenHelper extends SQLiteOpenHelper{
// ...
@Override
void onCreate(SQLiteDatabase db) {
db.execSQL("""
create table ${UserTable.NAME}( _id integer primary key autoincreme
${UserTable.Column.USERNAME},
${UserTable.Column.TOKEN} )
""")
}
// ...
}
REGEX
@CompileStatic
class LoginCommand {
String username
String password
Boolean validateCommand(){
this.username ==~ /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[A-Za-z]{2,4}/
}
}
.
CLOSURE COERCION
JAVA
Button buttonX = (Button)findViewById(R.id.buttonXName);
buttonX.setOnClickListener(new OnClickListener() {
public void onClick(View v){
Toast.makeText(this, "Java on Android", Toast.LENGTH_SHORT).show()
}
});
GROOVY
Button buttonX = (Button)findViewById(R.id.buttonXName);
buttonX.onClickListener = {
Toast.makeText(this, "Groovy on Android", Toast.LENGTH_SHORT).show()
}
CLOSURE COERCION
WITH MAPS
def callback = [
onResponse : { call, response -> },
onFailure : { call, t -> }
]
callback as retrofit2.Callback
Check it out!
WHAT CAN WE DO?
WRITE LESS, DO MORE...
AST Transformations
Code generation: @ToString,
@EqualsAndHashCode, @TupleConstructor,
@Lazy, @Builder
Class design: @Singleton, @Inmutable,
@Memoized, @Delegate, @Bindable
Compiler directives: @TypeChecked,
@CompileStatic, @TailRecursive
Traits
@SINGLETON
@Singleton
@CompileStatic
class CommentManagerImpl implements CommentManager {
// Your code...
}
@CompileStatic
public class CommentsFragment extends Fragment {
CommentManager mCommentManager = CommentManagerImpl.instance
// A lot of funny code...
}
RETROFIT TEMPLATE
THAT'S NO LONGER USEFUL BECAUSE...
https://gist.github.com/melix/355185ffbc1332952cc8
https://gist.github.com/Gazer/2bce6d18ad43215b7b76
@BINDABLE (1)
@CompileStatic
class GPSLocation {
@Bindable
Double latitude
@Bindable
Double longitude
}
@BINDABLE (2)
class SearchVenueFoursquareFragment extends Fragment {
GPSLocation mGPSLocation
@Override
void onCreate(@Nullable Bundle savedInstanceState) {
mGPSLocation = new GPSLocation()
mGPSLocation.addPropertyChangeListener { property ->
GPSLocation gpsLocation = property["source"] as GPSLocation
if (gpsLocation.latitude && gpsLocation.longitude) {
mFoursquareManager.getVenuesNear(new VenueCommand(latitude: gpsLocati
currentLatitude = gpsLocation.latitude
currentLongitude = gpsLocation.longitude
}
}
mLocationUtil.init(getActivity(), mGPSLocation)
}
}
@BINDABLE (3)
@CompileStatic
@Singleton
class LocationUtil implements GoogleApiClient.ConnectionCallbacks, GoogleApiC
GPSLocation mGPSLocation
void init(Context context, GPSLocation mGPSLocation){
this.mGPSLocation = mGPSLocation
// More init code
}
// A lot of methods
@Override
void onLocationChanged(Location location) {
mGPSLocation.setLatitude(location.getLatitude())
mGPSLocation.setLongitude(location.getLongitude())
}
}
TRAITS(1)
public class ShowCheckinFragment extends Fragment{
ImageView showImage
ImageUtil mImageUtil1 = new ImageUtil()
String pathPhoto
void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 1) {
if (resultCode == Activity.RESULT_OK) {
pathPhoto = data.getStringExtra("PATH_PHOTO")
mImageUtil1.setPhotoImageView(getContext(), pathPhoto, showImage)
}
}
}
}
Be careful we're using the getContext() of Fragment
TRAITS(2)
class FormCheckinFragment extends Fragment {
// The same...
}
class ProfileFragment extends Fragment {
// The same...
}
class BaristaFragment extends Fragment {
// The same...
}
DRY
TRAITS(3)
@CompileStatic
trait OnActivityResultGallery {
ImageView showImage
ImageUtil mImageUtil1 = new ImageUtil()
String pathPhoto
void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 1) {
if (resultCode == Activity.RESULT_OK) {
pathPhoto = data.getStringExtra("PATH_PHOTO")
mImageUtil1.setPhotoImageView(getContext(), pathPhoto, showImage)
}
}
}
abstract Context getContext()
}
Be careful anyway...
TRAITS(4)
class FormCheckinFragment
extends Fragment implements OnActivityResultGallery {
}
class ProfileFragment
extends Fragment implements OnActivityResultGallery {
}
class BaristaFragment
extends Fragment implements OnActivityResultGallery {
}
CLOSURES AS PROPERTIES
USING CAMERA
floatingActionButtonCamera.onClickListener = {
Fragment cameraFragment = new CameraFragment()
cameraFragment.setSuccessActionOnPhoto { File photo ->
getActivity().onBackPressed()
uploadPicture(photo)
}
cameraFragment.setErrorActionOnPhoto {
Toast.makeText(context, "Error al caputar la foto", Toast.LENGTH_SHORT)
getActivity().onBackPressed()
}
getFragmentManager()
.beginTransaction()
.replace(((ViewGroup) getView().getParent()).getId(), cameraFragmen
.addToBackStack(null).commit()
}
USING CAMERA(2)
class CameraFragment extends Fragment {
Closure successActionOnPhoto // Look ma!
Closure errorActionOnPhoto
@Override
void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_TAKE_PHOTO
&& resultCode == Activity.RESULT_OK) {
mImageUtil.addPictureToGallery(getContext(),photoFile.getPath())
Bitmap bitmapResize = mCamaraUtil.getScaledBitmap(photoFile.absolut
File photo = mCamaraUtil.saveBitmapToFile(bitmapResize,photoFile.ge
bitmapResize.recycle() // Stackoverflow!!!
successActionOnPhoto(photo)
} else {
errorActionOnPhoto()
}
}
// Handling the fragment and the camera
}
WHAT ELSE WE CAN DO?
RxJava
Test with Spock
Groovy extensions
Fastlane & CI & CD(Crashlytics)
WE FOUND SOME PATTERNS
BUILDING APPS
Model based design
KVO, KVC
Closure based design
Always use closures
FACING PROBLEMS (P1)
Groovy is dynamic
Bytecode is different
Classes at runtime?
64k method limit(solved with ProGuards)
Android Studio does not support Groovy 100%
FACING PROBLEMS (P2)
ABOUT THE DEXED FILES
Dalvik VM = new bytecode format
Groovy generates JVM bytecode
Translation don't through the dex
No native support for generating classes at runtime
CONCLUSIONS
Android is really hard! But with Groovy can
be fun...!
"A developer..."
Android is fun with Groovy, with Java
maybe would be a kick in the ass!
"The same developer..."
Is difficult make Android apps in the right
way, but Groovy do the work!
"The developer sitting next..."
Groovy is OSOM
NOT EVERYTHING IS LOST
http://clojure-android.info/
ENJOY YOUR COFFEE
http://www.barist.coffee
THANK YOU!!!
FACING PROBLEMS?, NOT REALLY!
ABOUT THE PERFORMANCE
Groovy JAR 4.5MB
Application size: 2MB
A er Proguard only 1MB
~8.5MB RAM with @CompileStatic
[NOMBRE DEL CONFERENCISTA]
Neodevelop
@neodevelop
Neodevelop
juan@makingdevs.com
vivecodigo.org
Neodevelop

Más contenido relacionado

La actualidad más candente

ES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorDavid Rodenas
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentspsstoev
 
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageabilityDaniel Fisher
 
Daejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service PracticeDaejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service Practiceplusperson
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQueryAngel Ruiz
 
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...Ivan Čukić
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperJon Kruger
 
Maintainable JavaScript 2011
Maintainable JavaScript 2011Maintainable JavaScript 2011
Maintainable JavaScript 2011Nicholas Zakas
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptJon Kruger
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneRafael Felix da Silva
 
Liferay Training Struts Portlet
Liferay Training Struts PortletLiferay Training Struts Portlet
Liferay Training Struts PortletSaikrishna Basetti
 
Ditching JQuery
Ditching JQueryDitching JQuery
Ditching JQueryhowlowck
 
Make XCUITest Great Again
Make XCUITest Great AgainMake XCUITest Great Again
Make XCUITest Great AgainKenneth Poon
 

La actualidad más candente (18)

ES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD CalculatorES3-2020-P3 TDD Calculator
ES3-2020-P3 TDD Calculator
 
Polymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web componentsPolymer - pleasant client-side programming with web components
Polymer - pleasant client-side programming with web components
 
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
2008 - TechDays PT: WCF, JSON and AJAX for performance and manageability
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
Daejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service PracticeDaejeon IT Developer Conference Web Service Practice
Daejeon IT Developer Conference Web Service Practice
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
@Anywhere
@Anywhere@Anywhere
@Anywhere
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...
Natural Task Scheduling Using Futures and Continuations, Ivan Čukić, Qt Devel...
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
 
Backbone - TDC 2011 Floripa
Backbone - TDC 2011 FloripaBackbone - TDC 2011 Floripa
Backbone - TDC 2011 Floripa
 
Maintainable JavaScript 2011
Maintainable JavaScript 2011Maintainable JavaScript 2011
Maintainable JavaScript 2011
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com Backbone
 
Liferay Training Struts Portlet
Liferay Training Struts PortletLiferay Training Struts Portlet
Liferay Training Struts Portlet
 
jQuery
jQueryjQuery
jQuery
 
Ditching JQuery
Ditching JQueryDitching JQuery
Ditching JQuery
 
Make XCUITest Great Again
Make XCUITest Great AgainMake XCUITest Great Again
Make XCUITest Great Again
 

Destacado

Superando las limitaciones de Java, con Ceylon
Superando las limitaciones de Java, con CeylonSuperando las limitaciones de Java, con Ceylon
Superando las limitaciones de Java, con CeylonSoftware Guru
 
Serverless en tu idioma
Serverless en tu idiomaServerless en tu idioma
Serverless en tu idiomaSoftware Guru
 
Integración de Lean UX en Scrum
Integración de Lean UX en ScrumIntegración de Lean UX en Scrum
Integración de Lean UX en ScrumSoftware Guru
 
Big Data & Data Analytics con Microsoft Azure
Big Data & Data Analytics con Microsoft AzureBig Data & Data Analytics con Microsoft Azure
Big Data & Data Analytics con Microsoft AzureSoftware Guru
 
Desarrollando Aplicaciones para hacer negocio
Desarrollando Aplicaciones para hacer negocioDesarrollando Aplicaciones para hacer negocio
Desarrollando Aplicaciones para hacer negocioSoftware Guru
 
¿Qué tiene de apasionante la ingeniería de software?
¿Qué tiene de apasionante la ingeniería de software?¿Qué tiene de apasionante la ingeniería de software?
¿Qué tiene de apasionante la ingeniería de software?Software Guru
 
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?Software Guru
 
Creando tu primera aplicación con Angular 2, el nuevo súper framework de Google
Creando tu primera aplicación con Angular 2, el nuevo súper framework de GoogleCreando tu primera aplicación con Angular 2, el nuevo súper framework de Google
Creando tu primera aplicación con Angular 2, el nuevo súper framework de GoogleSoftware Guru
 
DIY el Internet de las Cosas
DIY el Internet de las CosasDIY el Internet de las Cosas
DIY el Internet de las CosasSoftware Guru
 
113. ¿Cualquiera puede ser un tester?
113. ¿Cualquiera puede ser un tester?113. ¿Cualquiera puede ser un tester?
113. ¿Cualquiera puede ser un tester?GeneXus
 
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?IoT ¿Una visión práctica y cotidiana del Internet de las cosas?
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?Software Guru
 
La Organización Ágil
La Organización ÁgilLa Organización Ágil
La Organización ÁgilSoftware Guru
 
La Importancia de las Certificaciones en TI
La Importancia de las Certificaciones en TILa Importancia de las Certificaciones en TI
La Importancia de las Certificaciones en TISoftware Guru
 
Desarrollo y testing de apps móviles con Intel XDK y Testdroid
Desarrollo y testing de apps móviles con Intel XDK y TestdroidDesarrollo y testing de apps móviles con Intel XDK y Testdroid
Desarrollo y testing de apps móviles con Intel XDK y TestdroidSoftware Guru
 
Data wrangling en R para programadores SQL
Data wrangling en R para programadores SQLData wrangling en R para programadores SQL
Data wrangling en R para programadores SQLSoftware Guru
 
Innova o te recordaré cariñosamente
Innova o te recordaré cariñosamenteInnova o te recordaré cariñosamente
Innova o te recordaré cariñosamenteSoftware Guru
 
El arte de trasferir 169 billones de pesos en menos de 5 segundos
El arte de trasferir 169 billones de pesos en menos de 5 segundosEl arte de trasferir 169 billones de pesos en menos de 5 segundos
El arte de trasferir 169 billones de pesos en menos de 5 segundosSoftware Guru
 
Trabajo Remoto Ágil
Trabajo Remoto ÁgilTrabajo Remoto Ágil
Trabajo Remoto ÁgilSoftware Guru
 
La importancia de las prácticas profesionales y crear un portafolio
La importancia de las prácticas profesionales y crear un portafolioLa importancia de las prácticas profesionales y crear un portafolio
La importancia de las prácticas profesionales y crear un portafolioSoftware Guru
 

Destacado (20)

Superando las limitaciones de Java, con Ceylon
Superando las limitaciones de Java, con CeylonSuperando las limitaciones de Java, con Ceylon
Superando las limitaciones de Java, con Ceylon
 
Serverless en tu idioma
Serverless en tu idiomaServerless en tu idioma
Serverless en tu idioma
 
Integración de Lean UX en Scrum
Integración de Lean UX en ScrumIntegración de Lean UX en Scrum
Integración de Lean UX en Scrum
 
Big Data & Data Analytics con Microsoft Azure
Big Data & Data Analytics con Microsoft AzureBig Data & Data Analytics con Microsoft Azure
Big Data & Data Analytics con Microsoft Azure
 
Desarrollando Aplicaciones para hacer negocio
Desarrollando Aplicaciones para hacer negocioDesarrollando Aplicaciones para hacer negocio
Desarrollando Aplicaciones para hacer negocio
 
¿Qué tiene de apasionante la ingeniería de software?
¿Qué tiene de apasionante la ingeniería de software?¿Qué tiene de apasionante la ingeniería de software?
¿Qué tiene de apasionante la ingeniería de software?
 
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?
¿Gestión de Riesgos: cómo manejar las incertidumbres del proyecto?
 
Creando tu primera aplicación con Angular 2, el nuevo súper framework de Google
Creando tu primera aplicación con Angular 2, el nuevo súper framework de GoogleCreando tu primera aplicación con Angular 2, el nuevo súper framework de Google
Creando tu primera aplicación con Angular 2, el nuevo súper framework de Google
 
DIY el Internet de las Cosas
DIY el Internet de las CosasDIY el Internet de las Cosas
DIY el Internet de las Cosas
 
113. ¿Cualquiera puede ser un tester?
113. ¿Cualquiera puede ser un tester?113. ¿Cualquiera puede ser un tester?
113. ¿Cualquiera puede ser un tester?
 
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?IoT ¿Una visión práctica y cotidiana del Internet de las cosas?
IoT ¿Una visión práctica y cotidiana del Internet de las cosas?
 
La Organización Ágil
La Organización ÁgilLa Organización Ágil
La Organización Ágil
 
La Importancia de las Certificaciones en TI
La Importancia de las Certificaciones en TILa Importancia de las Certificaciones en TI
La Importancia de las Certificaciones en TI
 
Capacitacitación Tester - QA 4
Capacitacitación Tester - QA 4Capacitacitación Tester - QA 4
Capacitacitación Tester - QA 4
 
Desarrollo y testing de apps móviles con Intel XDK y Testdroid
Desarrollo y testing de apps móviles con Intel XDK y TestdroidDesarrollo y testing de apps móviles con Intel XDK y Testdroid
Desarrollo y testing de apps móviles con Intel XDK y Testdroid
 
Data wrangling en R para programadores SQL
Data wrangling en R para programadores SQLData wrangling en R para programadores SQL
Data wrangling en R para programadores SQL
 
Innova o te recordaré cariñosamente
Innova o te recordaré cariñosamenteInnova o te recordaré cariñosamente
Innova o te recordaré cariñosamente
 
El arte de trasferir 169 billones de pesos en menos de 5 segundos
El arte de trasferir 169 billones de pesos en menos de 5 segundosEl arte de trasferir 169 billones de pesos en menos de 5 segundos
El arte de trasferir 169 billones de pesos en menos de 5 segundos
 
Trabajo Remoto Ágil
Trabajo Remoto ÁgilTrabajo Remoto Ágil
Trabajo Remoto Ágil
 
La importancia de las prácticas profesionales y crear un portafolio
La importancia de las prácticas profesionales y crear un portafolioLa importancia de las prácticas profesionales y crear un portafolio
La importancia de las prácticas profesionales y crear un portafolio
 

Similar a Desarrollo para Android con Groovy

Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
1 aleksandr gritsevski - attd example using
1   aleksandr gritsevski - attd example using1   aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example usingIevgenii Katsan
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsKonrad Malawski
 
Struts 2 + Spring
Struts 2 + SpringStruts 2 + Spring
Struts 2 + SpringBryan Hsueh
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersTeng Shiu Huang
 
Saindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender androidSaindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender androidDaniel Baccin
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]Nilhcem
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!DataArt
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile wayAshwin Raghav
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Robert DeLuca
 

Similar a Desarrollo para Android con Groovy (20)

Griffon @ Svwjug
Griffon @ SvwjugGriffon @ Svwjug
Griffon @ Svwjug
 
Android best practices
Android best practicesAndroid best practices
Android best practices
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
1 aleksandr gritsevski - attd example using
1   aleksandr gritsevski - attd example using1   aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example using
 
Java 8: the good parts!
Java 8: the good parts!Java 8: the good parts!
Java 8: the good parts!
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good Parts
 
Struts 2 + Spring
Struts 2 + SpringStruts 2 + Spring
Struts 2 + Spring
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
mobl
moblmobl
mobl
 
Saindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender androidSaindo da zona de conforto… resolvi aprender android
Saindo da zona de conforto… resolvi aprender android
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]
 
Тарас Олексин - Sculpt! Your! Tests!
Тарас Олексин  - Sculpt! Your! Tests!Тарас Олексин  - Sculpt! Your! Tests!
Тарас Олексин - Sculpt! Your! Tests!
 
Android the Agile way
Android the Agile wayAndroid the Agile way
Android the Agile way
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React
 

Más de Software Guru

Hola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasHola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasSoftware Guru
 
Estructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesEstructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesSoftware Guru
 
Building bias-aware environments
Building bias-aware environmentsBuilding bias-aware environments
Building bias-aware environmentsSoftware Guru
 
El secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorEl secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorSoftware Guru
 
Cómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealCómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealSoftware Guru
 
Automatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowAutomatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowSoftware Guru
 
How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:Software Guru
 
Introducción al machine learning
Introducción al machine learningIntroducción al machine learning
Introducción al machine learningSoftware Guru
 
Democratizando el uso de CoDi
Democratizando el uso de CoDiDemocratizando el uso de CoDi
Democratizando el uso de CoDiSoftware Guru
 
Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Software Guru
 
Taller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSTaller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSSoftware Guru
 
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...Software Guru
 
¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?Software Guru
 
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Software Guru
 
Pruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsPruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsSoftware Guru
 
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosElixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosSoftware Guru
 
Así publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressAsí publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressSoftware Guru
 
Achieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsAchieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsSoftware Guru
 
Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Software Guru
 
De lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoDe lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoSoftware Guru
 

Más de Software Guru (20)

Hola Mundo del Internet de las Cosas
Hola Mundo del Internet de las CosasHola Mundo del Internet de las Cosas
Hola Mundo del Internet de las Cosas
 
Estructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso realesEstructuras de datos avanzadas: Casos de uso reales
Estructuras de datos avanzadas: Casos de uso reales
 
Building bias-aware environments
Building bias-aware environmentsBuilding bias-aware environments
Building bias-aware environments
 
El secreto para ser un desarrollador Senior
El secreto para ser un desarrollador SeniorEl secreto para ser un desarrollador Senior
El secreto para ser un desarrollador Senior
 
Cómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto idealCómo encontrar el trabajo remoto ideal
Cómo encontrar el trabajo remoto ideal
 
Automatizando ideas con Apache Airflow
Automatizando ideas con Apache AirflowAutomatizando ideas con Apache Airflow
Automatizando ideas con Apache Airflow
 
How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:How thick data can improve big data analysis for business:
How thick data can improve big data analysis for business:
 
Introducción al machine learning
Introducción al machine learningIntroducción al machine learning
Introducción al machine learning
 
Democratizando el uso de CoDi
Democratizando el uso de CoDiDemocratizando el uso de CoDi
Democratizando el uso de CoDi
 
Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0Gestionando la felicidad de los equipos con Management 3.0
Gestionando la felicidad de los equipos con Management 3.0
 
Taller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJSTaller: Creación de Componentes Web re-usables con StencilJS
Taller: Creación de Componentes Web re-usables con StencilJS
 
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...El camino del full stack developer (o como hacemos en SERTI para que no solo ...
El camino del full stack developer (o como hacemos en SERTI para que no solo ...
 
¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?¿Qué significa ser un programador en Bitso?
¿Qué significa ser un programador en Bitso?
 
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.Colaboración efectiva entre desarrolladores del cliente y tu equipo.
Colaboración efectiva entre desarrolladores del cliente y tu equipo.
 
Pruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOpsPruebas de integración con Docker en Azure DevOps
Pruebas de integración con Docker en Azure DevOps
 
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivosElixir + Elm: Usando lenguajes funcionales en servicios productivos
Elixir + Elm: Usando lenguajes funcionales en servicios productivos
 
Así publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stressAsí publicamos las apps de Spotify sin stress
Así publicamos las apps de Spotify sin stress
 
Achieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goalsAchieving Your Goals: 5 Tips to successfully achieve your goals
Achieving Your Goals: 5 Tips to successfully achieve your goals
 
Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19Acciones de comunidades tech en tiempos del Covid19
Acciones de comunidades tech en tiempos del Covid19
 
De lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseñoDe lo operativo a lo estratégico: un modelo de management de diseño
De lo operativo a lo estratégico: un modelo de management de diseño
 

Último

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 

Último (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 

Desarrollo para Android con Groovy

  • 1. Making Android with Groovy Presenta: José Juan Reyes Zuñiga & Co.
  • 3. HELLO WE'RE MAKINGDEVS We are programmers We're NOT great so ware developers, but we do our best Programming is our favorite job and hobbie We're learning about many platforms We really want to be so ware professionals You can find us as 'makingdevs' almost on every social network (GitHub, Twitter, Facebook)
  • 4. .
  • 5. DISCLAIMER Everything can be done with Java, but really? We're newbies with Android, so maybe you found novice's errors Prefer fully type static lang? Try Ceylon We don't support the Mafia We're available a er this talk This talk just be not enough to all that we want to show This presentation represents our brief experience
  • 6. AGENDA Our history in Android So, what is Groovy? Why Groovy? (If you don't know...) Essentials in Groovy (The intro is here) What can we do? (The code is here) Facing problems Conclusion
  • 7. OUR HISTORY IN ANDROID A team programming for Web and Backend Services, now has to make iOS and Android apps
  • 9.
  • 10. WHY GROOVY? 3 million of downloads in 1 year On Github since 2011(The same date as GoA born) It's a dependency of 25000+ OSS Projects Runs a JVM, Java code is valid code, but Groovy goes beyond Stop the suffer!!! Java on Android is very verbose Is OO, dynamic, functional, statically type checked and/or compiled Alex(Sascha) Klei is using it? Boring vs. Fun!!!!
  • 11. MAYBE YOU'RE USING GROOVY https://github.com/Arasthel/SwissKnife
  • 14.
  • 15. ESSENTIALS Sintatic sugar equality, maps, lists, threads, GStrings, resource handling, ranges, dates, builders(with) Groovy Beans Listeners Closure coercion Map Coercion
  • 16. DEMO
  • 17. MODELS AND GROOVY BEANS @CompileStatic class Checkin implements Serializable { Date created_at // Retrofit, you know! String method Date updated_at @Bindable S3Asset s3_asset Barista baristum = new Barista() // ... more properties // No more getters and setters }
  • 18. GSTRINGS @CompileStatic class BaristaOpenHelper extends SQLiteOpenHelper{ // ... @Override void onCreate(SQLiteDatabase db) { db.execSQL(""" create table ${UserTable.NAME}( _id integer primary key autoincreme ${UserTable.Column.USERNAME}, ${UserTable.Column.TOKEN} ) """) } // ... }
  • 19. REGEX @CompileStatic class LoginCommand { String username String password Boolean validateCommand(){ this.username ==~ /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[A-Za-z]{2,4}/ } }
  • 20. .
  • 21. CLOSURE COERCION JAVA Button buttonX = (Button)findViewById(R.id.buttonXName); buttonX.setOnClickListener(new OnClickListener() { public void onClick(View v){ Toast.makeText(this, "Java on Android", Toast.LENGTH_SHORT).show() } }); GROOVY Button buttonX = (Button)findViewById(R.id.buttonXName); buttonX.onClickListener = { Toast.makeText(this, "Groovy on Android", Toast.LENGTH_SHORT).show() }
  • 22. CLOSURE COERCION WITH MAPS def callback = [ onResponse : { call, response -> }, onFailure : { call, t -> } ] callback as retrofit2.Callback Check it out!
  • 23. WHAT CAN WE DO?
  • 24. WRITE LESS, DO MORE... AST Transformations Code generation: @ToString, @EqualsAndHashCode, @TupleConstructor, @Lazy, @Builder Class design: @Singleton, @Inmutable, @Memoized, @Delegate, @Bindable Compiler directives: @TypeChecked, @CompileStatic, @TailRecursive Traits
  • 25. @SINGLETON @Singleton @CompileStatic class CommentManagerImpl implements CommentManager { // Your code... } @CompileStatic public class CommentsFragment extends Fragment { CommentManager mCommentManager = CommentManagerImpl.instance // A lot of funny code... }
  • 27. THAT'S NO LONGER USEFUL BECAUSE... https://gist.github.com/melix/355185ffbc1332952cc8 https://gist.github.com/Gazer/2bce6d18ad43215b7b76
  • 28. @BINDABLE (1) @CompileStatic class GPSLocation { @Bindable Double latitude @Bindable Double longitude }
  • 29. @BINDABLE (2) class SearchVenueFoursquareFragment extends Fragment { GPSLocation mGPSLocation @Override void onCreate(@Nullable Bundle savedInstanceState) { mGPSLocation = new GPSLocation() mGPSLocation.addPropertyChangeListener { property -> GPSLocation gpsLocation = property["source"] as GPSLocation if (gpsLocation.latitude && gpsLocation.longitude) { mFoursquareManager.getVenuesNear(new VenueCommand(latitude: gpsLocati currentLatitude = gpsLocation.latitude currentLongitude = gpsLocation.longitude } } mLocationUtil.init(getActivity(), mGPSLocation) } }
  • 30. @BINDABLE (3) @CompileStatic @Singleton class LocationUtil implements GoogleApiClient.ConnectionCallbacks, GoogleApiC GPSLocation mGPSLocation void init(Context context, GPSLocation mGPSLocation){ this.mGPSLocation = mGPSLocation // More init code } // A lot of methods @Override void onLocationChanged(Location location) { mGPSLocation.setLatitude(location.getLatitude()) mGPSLocation.setLongitude(location.getLongitude()) } }
  • 31. TRAITS(1) public class ShowCheckinFragment extends Fragment{ ImageView showImage ImageUtil mImageUtil1 = new ImageUtil() String pathPhoto void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1) { if (resultCode == Activity.RESULT_OK) { pathPhoto = data.getStringExtra("PATH_PHOTO") mImageUtil1.setPhotoImageView(getContext(), pathPhoto, showImage) } } } } Be careful we're using the getContext() of Fragment
  • 32. TRAITS(2) class FormCheckinFragment extends Fragment { // The same... } class ProfileFragment extends Fragment { // The same... } class BaristaFragment extends Fragment { // The same... }
  • 33. DRY
  • 34. TRAITS(3) @CompileStatic trait OnActivityResultGallery { ImageView showImage ImageUtil mImageUtil1 = new ImageUtil() String pathPhoto void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1) { if (resultCode == Activity.RESULT_OK) { pathPhoto = data.getStringExtra("PATH_PHOTO") mImageUtil1.setPhotoImageView(getContext(), pathPhoto, showImage) } } } abstract Context getContext() } Be careful anyway...
  • 35. TRAITS(4) class FormCheckinFragment extends Fragment implements OnActivityResultGallery { } class ProfileFragment extends Fragment implements OnActivityResultGallery { } class BaristaFragment extends Fragment implements OnActivityResultGallery { }
  • 37. USING CAMERA floatingActionButtonCamera.onClickListener = { Fragment cameraFragment = new CameraFragment() cameraFragment.setSuccessActionOnPhoto { File photo -> getActivity().onBackPressed() uploadPicture(photo) } cameraFragment.setErrorActionOnPhoto { Toast.makeText(context, "Error al caputar la foto", Toast.LENGTH_SHORT) getActivity().onBackPressed() } getFragmentManager() .beginTransaction() .replace(((ViewGroup) getView().getParent()).getId(), cameraFragmen .addToBackStack(null).commit() }
  • 38. USING CAMERA(2) class CameraFragment extends Fragment { Closure successActionOnPhoto // Look ma! Closure errorActionOnPhoto @Override void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_TAKE_PHOTO && resultCode == Activity.RESULT_OK) { mImageUtil.addPictureToGallery(getContext(),photoFile.getPath()) Bitmap bitmapResize = mCamaraUtil.getScaledBitmap(photoFile.absolut File photo = mCamaraUtil.saveBitmapToFile(bitmapResize,photoFile.ge bitmapResize.recycle() // Stackoverflow!!! successActionOnPhoto(photo) } else { errorActionOnPhoto() } } // Handling the fragment and the camera }
  • 39. WHAT ELSE WE CAN DO? RxJava Test with Spock Groovy extensions Fastlane & CI & CD(Crashlytics)
  • 40. WE FOUND SOME PATTERNS BUILDING APPS Model based design KVO, KVC Closure based design Always use closures
  • 41. FACING PROBLEMS (P1) Groovy is dynamic Bytecode is different Classes at runtime? 64k method limit(solved with ProGuards) Android Studio does not support Groovy 100%
  • 42. FACING PROBLEMS (P2) ABOUT THE DEXED FILES Dalvik VM = new bytecode format Groovy generates JVM bytecode Translation don't through the dex No native support for generating classes at runtime
  • 44. Android is really hard! But with Groovy can be fun...! "A developer..."
  • 45. Android is fun with Groovy, with Java maybe would be a kick in the ass! "The same developer..."
  • 46. Is difficult make Android apps in the right way, but Groovy do the work! "The developer sitting next..."
  • 48. NOT EVERYTHING IS LOST http://clojure-android.info/
  • 51. FACING PROBLEMS?, NOT REALLY! ABOUT THE PERFORMANCE Groovy JAR 4.5MB Application size: 2MB A er Proguard only 1MB ~8.5MB RAM with @CompileStatic