Description
Course info
Level
Intermediate
Updated
Jan 26, 2019
Duration
1h 10m
Description

How do you create great APIs? One way is to make code that uses your API streamlined and intuitive to use. To do so, sometimes you need to create mini-languages within your Kotlin code. These are called Domain Specific Languages (DSLs). Designing and implementing DSLs requires thinking differently about your code and utilizing a suite of Kotlin features which make DSLs practical. In this course, Kotlin Fundamentals: Domain Specific Languages, you will learn the Kotlin features and implementation techniques for DSLs. First, you will learn what design criteria you should use to make a DSL. Next, you will put those design goals into action as you discover some DSL techniques for use in DSL implementations such as nested builders and context variables. Finally, as you implement some DSLs during the course, you will explore how to create clean structured DSLs containing lambdas, infix notation, and other language-like syntax. When you’re finished with this course, you will have the skills and knowledge of DSL implementations needed to build new DSLs, understand how to use existing ones, and even improve your non-DSL code.

About the author
About the author

Greg Milette is a Senior Software Engineer at TripAdvisor where he works on Android projects. His interests include speech recognition, mobile sensors, IoT, building apps in Kotin.

Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Greg Milette, and welcome to my course, Kotlin Fundamentals: Domain Specific Languages. Currently, I am a software engineer at Trip Advisor, and I love writing Kotlin code. If you look closely, any code base has some DSL somewhere. Maybe they are in the build script, builder classes, or configuration code, but believe me, they are there. To use these DSLs well, you need to understand how they work. To enhance your code with new DSLs, you need to understand how to implement them. This course is going to give you all the skills and knowledge you need. Some of the major topics we will cover include how to design a DSL to be language-like, what DSL implementation techniques do you need beyond Kotlin features, it's not just about lambdas and extension functions, how to transform builder code into a DSL, how to use lambdas to create DSLs with structured syntax, and finally, how to use infix notation to create executable sentences. By the end of this course, you'll know the Kotlin features and implementation techniques used in creating DSLs. Now before beginning the course, I want to let you know that you should be familiar with Kotlin programming already because I will assume you know the basics. I hope you'll join me on this journey to learn Kotlin DSLs with a Kotlin Fundamentals: Domain Specific Languages course, at Pluralsight. It's going to be awesome, and we might even satisfy a few customers along the way.