نام کتاب
Programming DSLs in Kotlin

Design Expressive and Robust Special Purpose Code

Venkat Subramaniam

Paperback74 Pages
PublisherPragmatic Bookshelf
Edition1
LanguageEnglish
Year2021
ISBN9781680507935
880
A2807
انتخاب نوع چاپ:
جلد سخت
264,000ت
0
جلد نرم
204,000ت
0
طلق پاپکو و فنر
214,000ت
0
مجموع:
0تومان
کیفیت متن:اورجینال انتشارات
قطع:B5
رنگ صفحات:دارای متن و کادر رنگی
پشتیبانی در روزهای تعطیل!
ارسال به سراسر کشور

#Kotlin

#DSLs

توضیحات

Creating your own domain-specific languages (DSLs) is both challenging and exhilarating. DSLs give users a way to interact with your applications more effectively, and Kotlin is a fantastic language to serve as a host for internal DSLs, because it greatly reduces the pain and effort of design and development. But implementing DSLs on top of Kotlin requires understanding the key strengths of the language and knowing how to apply them appropriately. Learn to avoid the pitfalls and leverage the language while creating your own elegant, fluent, concise, and robust DSLs using Kotlin.


Internal DSLs remove the burdens of implementing a full blown language compiler. The host language quickly becomes your ally to creating DSLs, but the syntax you can choose for your DSLs is limited to what the host language allows. You can work around the limitations by tactfully bending the rules and exploiting the language capabilities. Learn the power of Kotlin and ways to design with it, in the context of crafting internal DSLs


Start by learning ways to exploit the flexibilities of Kotlin to make your DSLs fluent, expressive, and concise. Then pick up techniques to extend the language with domain specific properties and functions. Quickly move ahead to tie your DSL snippets into the runtime environment and context of execution of your applications. Design to prevent any non-sensical syntax in your DSL that may otherwise be valid in the host language. Finally, learn techniques to gracefully handle errors. Practice using the multiple examples that are included in each chapter.


Fire up your editor and follow along each example to become proficient in designing and implementing your own internal DSLs using Kotlin.


Table of Contents

1. Introduction

2. Exploit Fluency

3. Get Domain Specific

4. Provide Contexts

5. Manage Scope and Handle Errors

6. Practice with Examples


What You Need:

Kotlin version 1.3 or later and your favorite Kotlin IDE or code editor.


About This Book

Fluent, concise, expressive code, and low ceremony are some the traits of good domain-specific languages (DSLs). Creating a DSL is twice the joy—we can write elegant code, which in turn can help our domain experts work with ease and convenience.


In this book you’ll learn how to design and implement your own DSLs using Kotlin. I’ve kept it really short so we can cut to the chase and get to implementing DSLs. Multiple examples will guide you through the essentials. Make sure to key in and execute each one of them to gain practice. Thank you for joining me on this journey.


Who Is This Book For?

This book assumes you are familiar with Kotlin and have some reasonable understanding of DSLs. It’s intended to quickly guide you through the steps necessary to build DSLs using Kotlin for JVM or Android applications.


If you’re a programmer interested in using Kotlin to build DSLs, you picked the right book. You’ll also find this book useful if you’re a lead developer, architect, or a technical manager who is involved in the development of applications that make use of DSLs.


You may also use this book to train your developers to become proficient with using Kotlin for programming DSLs.


What’s in This Book?

We’ve intentionally kept this book short to help you to quickly pick up key tips and tricks to create DSLs using Kotlin.

This book will not serve as an introduction to Kotlin nor to DSLs, as it assumes some knowledge of both. For an introduction to Kotlin refer to Programming Kotlin, and for an introduction to DSLs refer to Domain-Specific Languages.


After a quick introduction of the steps to create DSLs with Kotlin, we’ll dive straight into each of the steps. We’ll first focus on making the syntax fluent by exploiting the flexibilities of Kotlin. Then we’ll look at ways to bring domain-specific vocabulary into your DSLs. Following that we’ll devise ways to bring multiple contexts into the environments. We’ll then walk through the steps to make DSLs robust and resilient. Finally, we’ll wrap with a few more examples of designing DSLs.


Each step of the way, we’ll look at a number of code examples for you to practice along with. Take the time to key in each example, compile it, and execute it. Pause to make changes, break it, put it back together, try some variations, and then walk along to the next tip or trick to design your DSLs.

دیدگاه خود را بنویسید
نظرات کاربران (0 دیدگاه)
نظری وجود ندارد.
کتاب های مشابه
Android
1,082
Kotlin Multiplatform by Tutorials
618,000 تومان
Kotlin
943
Kotlin Programming
530,000 تومان
Kotlin
2,907
Simplifying Application Development with Kotlin Multiplatform Mobile
333,000 تومان
Kotlin
1,067
Kotlin in Action
492,000 تومان
Kotlin
1,017
Head First Kotlin
709,000 تومان
Kotlin
2,968
Kickstart Modern Android Development with Jetpack and Kotlin
650,000 تومان
Kotlin
227
Kotlin from Scratc
565,000 تومان
Kotlin
864
Beginning Kotlin
371,000 تومان
Kotlin
1,017
Real-World Android by Tutorials
831,000 تومان
Kotlin
1,623
Mastering Kotlin for Android 14
500,000 تومان
قیمت
منصفانه
ارسال به
سراسر کشور
تضمین
کیفیت
پشتیبانی در
روزهای تعطیل
خرید امن
و آسان
آرشیو بزرگ
کتاب‌های تخصصی
هـر روز با بهتــرین و جــدیــدتـرین
کتاب های روز دنیا با ما همراه باشید
آدرس
پشتیبانی
مدیریت
ساعات پاسخگویی
درباره اسکای بوک
دسترسی های سریع
  • راهنمای خرید
  • راهنمای ارسال
  • سوالات متداول
  • قوانین و مقررات
  • وبلاگ
  • درباره ما
چاپ دیجیتال اسکای بوک. 2024-2022 ©