droidconIN 2016

The sixth edition of droidconIN

Protocol Oriented Programming using Kotlin

Submitted by Manas Chaudhari (@manas-chaudhari) on Monday, 19 September 2016

videocam_off

Technical level

Advanced

Section

Crisp talk (15 minutes)

Status

Submitted

Vote on this proposal

Login to vote

Total votes:  +2

Abstract

In OOP, inheritance is the mechanism used to share code. Because of lack of multiple inheritance, it is common to end up building God objects with all the functionality.

Protocol Oriented Programming (POP) is an upcoming paradigm which tackles this problem. Idea is to think of everything as an interface (vs class in OOP). POP relies heavily on writing extension functions. Everything is written as an interface and functionality is implemented through extension methods on these interfaces.

As Kotlin provides the extension functions feature, it is excellent for Protocol Oriented Programming. In fact, most of the code of the Kotlin IntelliJ plugin (written in Kotlin) is protocol oriented.

This session is intended for all programmers interested in learning a new way to code.

Outline

  • Protocol Oriented Programming
  • Extension Functions in Kotlin
  • Problem with inheritance
  • Solution using POP
  • Applications in Android Development

Speaker bio

Graduating from IIT Bombay in 2014, Manas Chaudhari joined TinyOwl and built the consumer Android and iOS apps. Currently, he drives the consumer product at TinyOwl/Runnr, leading a team of Android, iOS and backend (ROR) devs. His core focus is to make development faster and bug-free.

As a Microsoft Student Partner, he developed Windows Phone apps and conducted workshops in nearby colleges.

Comments

Login with Twitter or Google to leave a comment