دانلود کتاب Groovy for Domain-Specific Languages
49,000 تومان
Groovy برای زبان های دامنه خاص
| نوع کالا | کتاب الکترونیکی |
|---|---|
| ناشر | Packt Publishing |
| تعداد صفحه | 312 |
| حجم فایل | 11 مگابایت |
| کد کتاب | 184719690X,9781847196903 |
| نوبت چاپ | اولین نسخه جدید |
| نویسنده | Fergal Dearle |
|---|---|
| زبان | انگلیسی |
| فرمت | |
| سال انتشار | 2010 |
جدول کد تخفیف
| تعداد کتاب | درصد تخفیف | قیمت کتاب |
| 1 | بدون تخفیف | 25,000 تومان |
| 2 | 20 درصد | 20,000 تومان |
| 3 الی 5 | 25 درصد | 18,750 تومان |
| 6 الی 10 | 30 درصد | 17,500 تومان |
| 11 الی 20 | 35 درصد | 16,250 تومان |
| 21 الی 30 | 40 درصد | 15,000 تومان |
| 31 الی 40 | 45 درصد | 13,750 تومان |
| 41 الی 50 | 50 درصد | 12,500 تومان |
| 51 الی 70 | 55 درصد | 11,250 تومان |
| 71 الی 100 | 60 درصد | 10,000 تومان |
| 101 الی 150 | 65 درصد | 8,750 تومان |
| 151 الی 200 | 70 درصد | 7,500 تومان |
| 201 الی 300 | 75 درصد | 6,250 تومان |
| 301 الی 500 | 80 درصد | 5,000 تومان |
| 501 الی 1000 | 85 درصد | 3,750 تومان |
| 1001 الی 10000 | 90 درصد | 2,500 تومان |
ترجمه فارسی توضیحات (ترجمه ماشینی)
Groovy برای زبان های دامنه خاص
پیشگفتار
کتاب Groovy for Domain-Specific Languages [Packt Publishing: 3, Amazon.com: 5] نوشته Fergal Dearle [4] توسط Packt Publishing در ماه می 2010 منتشر شده است. همانطور که عنوان اشاره می کند همه چیز در مورد نحوه پیاده سازی دامنه است. زبان های خاص که DSL ها بر اساس زبان برنامه نویسی Groovy هستند.
نویسنده با این کتاب به صراحت برنامه نویسان جاوا را هدف قرار می دهد. همانطور که در توضیحات فصل جداگانه زیر مشاهده می شود، کتاب مبانی Groovy، ویژگی های پیشرفته زبان مرتبط با DSL و مسائل یکپارچه سازی اسکریپت را پوشش می دهد.
اگرچه به صراحت ذکر نشده است، اما این کتاب Groovy را تا نسخه 1.6 پوشش می دهد، زیرا می توان از برخی از نمونه کدها و اسکرین شات ها کسر کرد.
خلاصه ی فصل
فصل 1 – مقدمه ای بر DSL و Groovy
فصل اول با یک مقدمه کلی بر زبان های برنامه نویسی با هدف عمومی شروع می شود که منجر به معرفی مختصری از زبان های خاص می شود که به عنوان زبان های دامنه خاص (DSL) نیز شناخته می شوند. علاوه بر این، نویسنده به معرفی مختصری از Groovy و چگونگی ارتباط آن با پلت فرم جاوا می پردازد. اولین نمونه از سازنده نشانه گذاری XML Groovy یک مثال عملی در مورد اینکه چگونه برخی از ویژگی های برنامه نویسی پویا از ساخت DSL های سفارشی پشتیبانی می کنند، ارائه می دهد.
فصل 2 – شروع سریع Groovy
فصل دوم Groovy را از ابتدا به دو بخش اصلی پوشش می دهد: بخش اول بخش اداری است – توضیح می دهد که از کجا باید Groovy را دریافت کرد و چگونه آن را روی سیستم عامل های مختلف نصب کرد و یک نمای کلی در مورد دستورات اساسی موجود در فهرست باینری Groovy ارائه می دهد: groovy، groovysh، groovyConsole و groovyc. قسمت دوم این فصل Groovy را در حدود 23 صفحه معرفی می کند و به وضوح برنامه نویسانی با پس زمینه جاوا را هدف قرار می دهد، نه اینکه مقدمه ای برای تازه کارهای Groovy بدون پس زمینه جاوا باشد.
فصل 3 – بسته شدن شیار
فصل سوم به جزئیات بسته شدن Groovy می پردازد. با نمونههای کد بستههای ساده شروع میشود، پارامترهای بسته شدن و نحوه ارتباط متدهای جداگانه در کلاس Groovy’s Closure با آنها را توضیح میدهد و به Currying میرود. در پایان این فصل این، نماینده و مالک را به عنوان متغیرهای ضمنی مهم در زمینه بسته شدن Groovy معرفی می کند.
فصل 4 – مثال DSL: GeeTwitter
فصل چهارم یک DSL سفارشی در اطراف Twitter4J [1] معرفی می کند – کتابخانه ای حاوی کلاس های جاوا برای دسترسی به REST API توییتر [0]. اولین نسخه GeeTwitter پرانتز اختیاری Groovy را در مورد فراخوانی متدها معرفی میکند و روشهای ممکن برای استفاده از آن DSL در اسکریپتهای Groovy را نشان میدهد.
در پایان این فصل، خواننده یک کلاس پایه انتزاعی با منبع کامل برای ایجاد اسکریپتهای GeeTwitter DSL ساخته است.
فصل 5 – ویژگی های Power Groovy DSL
حالا واقعاً به بحران می رسد. این فصل را می توان به عنوان مهم ترین فصل در نظر گرفت، زیرا زمینه های زیادی را در مورد ویژگی های زبان Groovy مورد استفاده در چارچوب های دنیای واقعی مانند Grails پوشش می دهد: پروتکل متا شی Groovy و متابرنامه نویسی، ExpandoMetaClass، الگوی سازنده و کلاس های سازنده پایه Groovy. . این فصل درک خوبی از آنچه میتوان با استفاده از این ویژگیهای قدرتمند به دست آورد و درک بیشتری از نحوه استفاده از DSLهای سفارشی کاملاً کاربردی ارائه میدهد.
فصل 6 – DSL های Groovy موجود
این فصل عمدتاً DSLهای مخصوص Grails و نحوه پیادهسازی آنها را در پرتو استفاده از ویژگیهای قدرتمند DSL Groovy میپردازد. علاوه بر این، نویسنده مروری بر برخی از چارچوبهای انتخابی TDD خارج از فضای Groovy ارائه میکند: GSpec، EasyB و Spock. بررسی اجمالی بر روی آنچه میتوان با این چارچوبها انجام داد تمرکز میکند و نه به نحوه انجام این کار توسط چارچوبها.
فصل 7 – ساختن یک سازنده
نکته: این فصل به عنوان فصل نمونه [2] موجود است.
فصلها با بحث مفصلی درباره استراتژیهای حل متغیر در زمینه بسته شدن Groovy شروع میشوند و بیشترین ویژگیهای فرابرنامهنویسی وارداتی برای توسعه Groovy DSL را خلاصه میکنند. پس از آن، Groovy’s BuilderSupport و FactoryBuilderSupport را معرفی می کند.
فصل 8 – پیاده سازی قوانین DSL
فصل هشتم نحوه پیادهسازی قوانین تجاری DSL را بر اساس مفهوم اسکریپتها و اتصالات Groovy نشان میدهد. مثال ارائه شده در مورد یک برنامه ارائه دهنده خدمات پهن باند خیالی است که به قوانین تجاری برای پاداش دادن به حساب های مشتری با یک سیستم امتیازدهی نیاز دارد که منجر به Reward DSL می شود. فصل با یک پاراگراف در مورد آزمایش DSL با Groovy’s GroovyTestCase بسته می شود.
فصل 9 – ادغام همه چیز
این فصل به مسائل یکپارچه سازی معمولی می پردازد: استفاده از کلاس های جاوا از کد Groovy و بالعکس، نحوه استفاده از کلاس های Groovy در چارچوب Spring از طریق تزریق وابستگی و نحوه ادغام اسکریپت ها در برنامه های جاوا موجود.
خلاصه
این کتاب عمدتاً برای برنامه نویسان جاوا یا مبتدیان Groovy با پس زمینه جاوا است که می خواهند یک Groovy DSL سفارشی را در یک برنامه موجود ادغام کنند. با معرفی مختصری از Groovy و DSL ها به طور کلی شروع می شود، نگاهی دقیق تر به بسته شدن Groovy می اندازد و به مثال های عملی در مورد نحوه اعمال ویژگی های مختلف زبان برنامه نویسی Groovy برای طراحی زبان های اختصاصی دامنه اختصاصی می پردازد. خواننده باید درک اساسی در مورد نحوه ساخت و ادغام DSL های سفارشی و نحوه انجام این کار توسط چارچوب هایی مانند Grails داشته باشد.
نظر شخصی
Groovy یک زبان عالی برای طراحی زبان های خاص دامنه است. اگر چه زمانی که با مهمترین مفاهیم آشنا شدید آسان است، اما بهم ریختن Groovy DSL مانند «فقط به نحوی کار کنید» برای مبتدیان Groovy یا Grails. این کتاب خوانندگان خود را با درک اولیه در مورد زبان برنامه نویسی Groovy مجهز می کند
Preface
The book Groovy for Domain-Specific Languages [Packt Publishing: 3, Amazon.com: 5] written by Fergal Dearle [4] has been published by Packt Publishing in May 2010. As the title mentions it is all about how to implement domain-specific languages aka DSLs based on the Groovy programming language.
With this book the author explicitly targets Java programmers. As can be seen in the separate chapter descriptions below, the book covers Groovy basics, advanced DSL-related language features and script integration issues.
Although not explicitly mentioned, this book covers Groovy up to version 1.6, as this can be deducted from some code samples and screenshots.
Chapter Summary
Chapter 1 – Introduction to DSL and Groovy
The first chapter starts with a general introduction to general purpose programming languages which leads to a brief introduction to specific languages also known as domain-specific languages (DSLs). In addition, the author gives a brief introduction into Groovy and how it relates to the Java platform. A first example of Groovy’s XML markup builder gives a practical example on how certain dynamic programming features support building custom DSLs.
Chapter 2 – Groovy Quick Start
The second chapter covers Groovy from ground up split into two main parts: the first part is the administrative one – it explains where to get Groovy and how to install it on various operating systems and gives an overview about basic commands found in Groovy’s binary directory: groovy, groovysh, groovyConsole and groovyc. The second part of this chapter introduces Groovy in about 23 pages and clearly targets programmers with a Java background, not supposed to be an introduction for Groovy newbies without a Java background.
Chapter 3 – Groovy Closures
The third chapter handles Groovy closures in en detail. It starts with code examples of simple closures, explains closure parameters and how separate methods in Groovy’s Closure class relate to them and goes over to currying. At the end of this chapter it introduces this, delegate and owner as being important implicit variables in the context of Groovy closures.
Chapter 4 – Example DSL: GeeTwitter
The fourth chapter introduces a custom DSL around Twitter4J [1] – a library containing Java classes for accessing Twitter’s REST API [0]. The first version of GeeTwitter introduces Groovy’s optional parenthesis on method calls and shows possible approaches for using that DSL in Groovy scripts.
At the end of this chapter, the reader has built a source-complete abstract base class for creating GeeTwitter DSL scripts.
Chapter 5 – Power Groovy DSL Features
Now it really comes down to the crunch. This chapter can be seen as most important chapter, as it covers a lot of ground about Groovy language features used in real-world frameworks like Grails: Groovy’s meta object protocol and meta-programming, the ExpandoMetaClass, the Builder pattern and Groovy’s base builder classes. The chapter gives a good appreciation of what can be achieved by using these powerful features and gives a greater understanding how to use fully-functioning custom DSLs.
Chapter 6 – Existing Groovy DSLs
This chapter mainly handles Grails-specific DSLs and how they are implemented in the light of using Groovy’s power DSL features. In addition, the author gives an overview of some selected TDD frameworks out of Groovy space: GSpec, EasyB and Spock. The overview concentrates on what can be done with these frameworks and not so much of how this is done by the frameworks.
Chapter 7 – Building a Builder
Hint: This chapter is available as sample chapter [2].
The chapters starts with a detailed discussion of variable resolving strategies in the context of Groovy closures and summarizes the most import meta-programming features for Groovy DSL development. Afterwards, it introduces Groovy’s BuilderSupport and FactoryBuilderSupport.
Chapter 8 – Implementing a Rules DSL
The eight chapter shows how to implement a business rules DSL based on the concept of Groovy scripts and bindings. The given example is about an imaginary broadband service provider program that needs business rules for rewarding customer accounts with a scoring system, leading to the Reward DSL. The chapter closes with a paragraph on testing DSLs with Groovy’s GroovyTestCase.
Chapter 9 – Integrating It All
This chapter handles typical integration issues: using Java classes from Groovy code and vice-vera, how to use Groovy classes within the Spring framework via dependency injection and how to integrate scripts in existing Java applications.
Summary
The book is mainly for Java programmers or Groovy newbies with a Java background that want to integrate a custom Groovy DSL into an existing application. It starts with a brief introduction to Groovy and DSLs in general, takes a closer look at Groovy closures and moves on to practical examples on how to apply various features of the Groovy programming language to design custom domain-specific languages. The reader should get a fundamental understanding on how to built and integrate custom DSLs and how this was done by frameworks like Grails.
Personal Opinion
Groovy is a great language for designing domain-specific languages. Although it is easy once you are familiar with the most important concepts, messing with a Groovy DSL is like `just get it working somehow’ for Groovy or Grails beginners. This book equips its readers with a basic understanding about Groovy programming language features that can be used to create custom DSLs. This leads to a better understanding about how those concepts are used in Grails and other frameworks and surely raises the knowledge on Groovy programming features.
محصولات مرتبط
دانلود کتاب Bitcoin For Blockheads: The "Know More Than Your Friends" Guide To Bitcoin And The Blockchain
دانلود کتاب Blockchain and Cryptocurrency: International Legal and Regulatory Challenges
دانلود کتاب Blockchain Democracy: Technology, Law and the Rule of the Crowd
دانلود کتاب Blockchain in Data Analytics
دانلود کتاب Data Privacy Management, Cryptocurrencies and Blockchain Technology: ESORICS 2018 International Workshops, DPM 2018 and CBT 2018, Barcelona, Spain, September 6-7, 2018, Proceedings
| نوع کالا | کتاب الکترونیکی |
|---|---|
| ناشر | Springer International Publishing |
| تعداد صفحه | 445 |
| حجم فایل | 15.80 مگابایت |
| کد کتاب | 3540784780 , 9783540784784 |
| نوبت چاپ | اولین ویرایش |

نقد و بررسیها
هنوز بررسیای ثبت نشده است.