Fragments 2017

Fragments 2017

A conference on the mobile ecosystem in India

Ragunath Jawahar

@ragunathjawahar

Code Generation for Zombies

Submitted Jun 15, 2017

There are times where cross-cutting concerns like analytics and logging can take a toll on large applications. Analytics is a crucial part for any application to deliver value to customers and understand user behavior. Oftentimes adding tracking code to application could be hard, boring and error-prone.

In this talk I reveal how we used Java code generation using JavaPoet to generate tracking code for analytics for our Android and iOS apps. Using this technique we achieved 100% accuracy, increased developer productivity and reduced integration time by leveraging the Java compiler and our preferred IDE - Android Studio.

The talk also contains insights on best practices for 1) Code generation and 2) Language limitations and structuring generated Java code for transpiling Java to Objective-C using J2ObjC for use in iOS. Code generation is a nice technique that can help developers solve complex problems, this talk will help developers shed their inhibition and encourage them to use this technique wherever applicable.

Outline

Why cross-cutting concerns like analytics should not take too engineering time.
Why code generation is not as scary as it sounds.
How JavaPoet offers a simple API for developers to generate Java source code.
Using J2ObjC to transpile Java to Objective-C for use in Swift.
Guidelines and best practices for generating source code.

Requirements

Experience building Android or iOS apps.

Speaker bio

Ragunath is currently working with Kite Cash, a fintech startup based out of New Delhi. He holds a 6+ years of experience in Android development and has worked as an independent consultant with various renowned brands across the globe such as Tiffany, Mizuno, Glenlivet, Tata Group, etc., He has an inherent hunger for new technologies and has strongly supported and contributed to many open source libraries. At work, he believes in justified use of third party libraries and object-oriented & reactive programming paradigms as a way to boost developer productivity. His “Android Development for Newbies” course, hosted on Udemy has 84,000+ students worldwide. Ragu’s form validation library for Android, named Saripaar has been used by organisations worldwide. Although Java is his primary language of choice, Ragu draws a lot of inspiration from other popular languages, patterns and framework, across different platforms. He has actively interacted with the developer community, both as a speaker and a participant. He has spoken at DroidCon London ‘16, and several other developer meetups across India.

Slides

https://speakerdeck.com/ragunathjawahar/code-generation-beyond-apt

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

How do you make a great mobile experience? Explore with Fragments. Follow Fragments on Twitter more