Tomas Hanley and Chris Barbour will be presenting at the third Kotlin Belfast User Group on Domain Specific Languages and Coroutines in Anger.
Part one - Kotlin Coroutines
Case Study and Lessons Learned (Tomas Hanley) Asynchronous code can get really messy, really quickly. There are some good ways to avoid this in your design, but sometimes you have to live with some ugly old async API. Maybe because it's provided by a third party, or maybe it's just too difficult to rip out and rewrite. What you can do in this case is to write a Kotlin extension/wrapper on top of the API.
Kotlin Coroutines are a fantastic way to clean up ugly async APIs. They can make your async code as easy to read and understand as sequential code, but give you all the benefits of non blocking async code. In this session Tomas will be sharing with us how he took an ugly asynchronous API and wrote a Kotlin extension on top of it using coroutines and channels to make it super clean and easy to use. He'll also be sharing some of the lessons and best practices he learned along the way.
Part two - DSLs and CloudFormation with a 'K' (Chris Barbour / Garth Gilmour)
Domain Specific Languages give us a way to output for a particular domain like SQL, HTML or CloudFormation while reaping the rewards of another language, Kotlin for example.
With Kotlin's flexibility and Static Typing we can easily build DSLs that are type checked at compile time and give us code completion in the IDE allowing for validation to be shifted away from deployment.
In this talk, Garth and Chris will show you how to build your own DSLs in Kotlin, presenting the basic building blocks as supported by the language. You will then see how Chris's company, HexLabs, created a DSL to underpin their KloudFormation open source project - a type safe language for defining AWS CloudFormation Templates, making the automation of AWS infrastructure a much better experience.