Simple play icon Course
Skills Expanded

Droidcon Boston '19: A Dozen Techniques for Everyday DSLs

by Droidcon Boston

This talk exposes you to a dozen or more DSL techniques. By the end of this talk, you will have a brain full of ideas you can use to make full use of Kotlin's capabilities.

What you'll learn

You've heard all about how Kotlin supports Domain Specific Languages (DSLs) and now it is time to put Kotlin's DSL features into action in your everyday code. You may not be building the next Gradle DSL or Anko, but you are writing Kotlin code and that code can be improved using DSL techniques. Yes, this talk will cover the Kotlin features you need to write DSLs: lambdas, infix notation, @DslMarker, etc... but you need to know more than that. You need to know what your design goals should be, know how to use Kotlin's features properly to make DSLs, what design patterns help you do it, and how to evolve your code slowly into from a single improvement to eventually becoming a full DSL. This talk exposes you to a dozen or more DSL techniques. You will learn how to turn ordinary builders into languages by using design patterns such as nested builders, pass context to lambdas to make your code more language-like, swap parameter order to make your code more readable, and clean up unnecessary syntax. By the end of this talk, you will have a brain full of ideas you can use to make full use of Kotlin's capabilities.

Table of contents

A Dozen Techniques for Everyday DSLs
29mins

About the author

Droidcon Boston brings the best of Android to Boston since 2017. This conference is part of the vision of Double Espresso (www.2xe.io) that aims to keep training affordable to everyone and to give equal opportunities to speak to speakers from all over the world. Droidcon Boston is where Android experts from around the world come together to look into the future of Android, mobile development and ethics to prepare for the challenges and opportunities ahead. Droidcon Boston is where the Android co... more

Ready to upskill? Get started