دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: 1
نویسندگان: Venkat Subramaniam
سری:
ISBN (شابک) : 9781680507935
ناشر: Pragmatic Bookshelf
سال نشر: 2021
تعداد صفحات: 0
زبان: English
فرمت فایل : EPUB (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 1 مگابایت
در صورت تبدیل فایل کتاب Programming DSLs in Kotlin به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب برنامه نویسی DSL در Kotlin نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
ایجاد زبانهای خاص دامنه (DSL) شما هم چالش برانگیز و هم هیجانانگیز است. DSL ها راهی را به کاربران می دهند تا با برنامه های شما تعامل موثرتری داشته باشند، و Kotlin یک زبان فوق العاده برای خدمت به عنوان میزبان برای DSL های داخلی است، زیرا درد و تلاش طراحی و توسعه را تا حد زیادی کاهش می دهد. اما پیاده سازی DSL در بالای Kotlin مستلزم درک نقاط قوت کلیدی زبان و دانستن نحوه اعمال مناسب آنها است. یاد بگیرید که از مشکلات اجتناب کنید و از زبان استفاده کنید و در عین حال DSLهای زیبا، روان، مختصر و قوی خود را با استفاده از Kotlin ایجاد کنید.
DSLهای داخلی بار پیاده سازی یک کامپایلر زبان کامل را از بین می برند. زبان میزبان به سرعت به متحد شما برای ایجاد DSL تبدیل می شود، اما نحوی که می توانید برای DSL های خود انتخاب کنید به چیزی که زبان میزبان اجازه می دهد محدود می شود. شما میتوانید محدودیتها را با خم کردن با درایت قوانین و بهرهبرداری از قابلیتهای زبان برطرف کنید. قدرت Kotlin و روش های طراحی با آن را در زمینه ساخت DSL های داخلی بیاموزید
با یادگیری روشهایی برای استفاده از انعطافپذیریهای Kotlin برای روان، رسا و مختصر کردن DSLهای خود شروع کنید. سپس تکنیک هایی را برای گسترش زبان با ویژگی ها و توابع خاص دامنه انتخاب کنید. به سرعت پیش بروید تا قطعات DSL خود را به محیط زمان اجرا و زمینه اجرای برنامه های خود متصل کنید. طراحی کنید تا از هرگونه نحو غیرمعنی در DSL شما که ممکن است در زبان میزبان معتبر باشد، جلوگیری کند. در نهایت، تکنیک هایی را بیاموزید تا به خوبی خطاها را مدیریت کنید. با استفاده از مثال های متعددی که در هر فصل آمده است تمرین کنید.
ویرایشگر خود را فعال کنید و هر نمونه را دنبال کنید تا در طراحی و اجرای DSLهای داخلی خود با استفاده از Kotlin مهارت داشته باشید.
آنچه شما نیاز دارید:
Kotlin نسخه 1.3 یا بالاتر و Kotlin IDE یا ویرایشگر کد مورد علاقه شما.
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.
What You Need:
Kotlin version 1.3 or later and your favorite Kotlin IDE or code editor.
Cover Table of Contents Acknowledgments Preface Who Is This Book For? What’s in This Book? Online Resources 1. Introduction Focus on the Key Characteristics Kotlin as a Host Language Steps to Program DSLs 2. Exploit Fluency Remove Noisy Syntax Design for Fluency Make Syntax Obvious Use Conventions to Improve Fluency 3. Get Domain Specific Use Domain-Specific Extension Functions Create Extension Operators Use Domain-Specific Operators Use invoke to Remove Redundant Syntax 4. Provide Contexts Provide Context for Variables Design for Separate Implicit Contexts Use the Default Lambda Parameter Name for Context Use Multiple Contexts to Remove Ambiguity Use Inner Classes to Share State Between Contexts 5. Manage Scope and Handle Errors Leverage the Compiler Leverage Type Checking Restrict Scope of Functions Control Scope with DslMarker Proactively Handle Errors 6. Practice with Examples Let’s Design a Builder Devise Ways to Run DSLs from External Sources Bibliography