Events

Share

When and Where

  • Belfast, Northern Ireland - Get Directions
  • Jun 25, 2019 5:30 PM - 7:30 PM

Domain Specific Languages and Coroutines in Anger

Following on from last month's Demystifying Coroutines event, we will be taking another look at coroutines and also at one of Kotlin's real sweet spots, DSLs.

PART 1 - 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 2 - 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.

About Tomas Hanley
Tomas is co-organiser of the Dublin Kotlin User Group and a dedicated Software Engineer with strong Java/Kotlin experience. He currently works in Toast and is a strong believer in the need for constant improvement through personal learning and development

About Chris Barbour
Chris is a Software Engineer based in the Belfast area with a passion for creating innovative solutions. Founder and Director of HexLabs, disrupting how companies visualise their cost, security, and infrastructure in the cloud.

About Garth Gilmour
Garth is the Head of Learning at Instil. He has an uncanny knack for making complex topics sound understandable, accessible, easy even. (My words, not his. He is far too modest to ever say such a thing. It is true though!)

Schedule
6.00pm Food and drinks
6.45pm Presentation on Kotlin Coroutines
7.15pm Presentation on DSLs
7.45pm Q&As and conclusion

Click here to sign up