A Case-Study on Structured Modeling with Internal Domain-Specific Languages
摘要
We present KTML, a Kotlin library for creating well-structured and type-safe HTML documents. KTML is entirely built within the Kotlin language set, highlighting Kotlin’s suitability through language design choices to support internal DSLs. Internal DSLs are fully embedded in an existing ecosystem and can take full advantage of the host language’s capabilities. Yet, they are designed for a single purpose, abstracting from otherwise cumbersome boilerplate code and other intricacies while simultaneously allowing the developer to use the tool stack they are familiar with. We exemplify KTML through the professional Tangle project, part of a conference management collection that generates different programme views during ongoing conferences.