Muutke küpsiste eelistusi

E-raamat: DSLs in Boo: Domain Specific Languages in .NET

  • Formaat: 352 pages
  • Ilmumisaeg: 31-Dec-2009
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638354215
  • Formaat - EPUB+DRM
  • Hind: 45,77 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 352 pages
  • Ilmumisaeg: 31-Dec-2009
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638354215

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

HIGHLIGHT

A Domain Specific Language lets you express the intent of a piece of code in

more human-readable terms. Boo is an ideal language to create DSLs for .NET.

DESCRIPTION

Even good code can be tough to understand when you simply read iteven if

youre a developer and you know what it does! A Domain Specific Language

(DSL) helps a developer clearly express the intent of the code, and thus make it

easier to work on the core business problem.

Developers who migrate to Ruby from Java love Boos ability to define a DSL

for .NET in a just few lines of code. In Boo, the developer can define simple

DSLs for .NET applications without suffering through the awkward XML usually

required.

Building Domain Specific Languages in Boo shows how to write DSLs for

.NET. It starts by teaching what a DSL is. Then, it provides a fast-paced Boo

tutorial. Readers immediately start putting this handy language to productive

use as they learn how to implement DSLs in real code.

The author shows how to create several types of DSLs, all with the goal of

making the developer more productive. Along the way, readers learn the Boo

they need techniques to scare away the evil XML.

KEY POINTS

Author Ayende Rahien is world-famous as a speaker and blogger on

this topic

This book covers both the theory and the practice of building DSLs

This is the only book available that teaches Boo

MARKET INFORMATION

Anything that makes coding faster and better is of interest to developers. Writing

DSLs has the potential to improve both speed of development and quality of

code! This approach is unique, in that it brings a common technique for Ruby

and Java developers to the .NET platform.
preface xv
acknowledgments xvii
about this book xviii
about the author xx
about the cover illustration xxi
What are domain-specific languages?
1(21)
Striving for simplicity
2(3)
Creating simple code
3(1)
Creating clear code
3(1)
Creating intention-revealing code
4(1)
Understanding domain-specific languages
5(2)
Expressing intent
6(1)
Creating your own languages
6(1)
Distinguishing between DSL types
7(6)
External DSLs
7(2)
Graphical DSLs
9(1)
Fluent interfaces
10(2)
Internal or embedded DSLs
12(1)
Why write DSLs?
13(3)
Technical DSLs
14(1)
Business DSLs
14(2)
Automatic or extensible DSLs
16(1)
Boo's DSL capabilities
16(2)
Examining DSL examples
18(2)
Brail
18(1)
Rhino ETL
19(1)
Bake (Boo Build System)
19(1)
Specter
20(1)
Summary
20(2)
An overview of the Boo language
22(17)
Why use Boo?
23(1)
Exploring compiler extensibility
24(1)
Basic Boo syntax
25(4)
Boo's built-in language-oriented features
29(8)
String interpolation
29(1)
Is, and, not, and or
30(1)
Optional parentheses
30(1)
Anonymous blocks
31(1)
Statement modifiers
31(1)
Naming conventions
32(1)
Extension methods
33(1)
Extension properties
34(1)
The IQuackFu interface
34(3)
Summary
37(2)
The drive toward DSLs
39(24)
Choosing the DSL type to build
40(3)
The difference between fluent interfaces and DSLs
40(2)
Choosing between a fluent interface and a DSL
42(1)
Building different types of DSLs
43(4)
Building technical DSLs
43(2)
Building business DSLs
45(2)
Building Extensibility DSLs
47(1)
Fleshing out the syntax
47(1)
Choosing between imperative and declarative DSLs
48(3)
Taking a DSL apart---what makes it tick?
51(2)
Combining domain-driven design and DSLs
53(3)
Language-oriented programming in DDD
53(1)
Applying a DSL in a DDD application
54(2)
Implementing the Scheduling DSL
56(3)
Running the Scheduling DSL
59(2)
Summary
61(2)
Building DSLs
63(23)
Designing a system with DSLs
64(1)
Creating the Message-Routing DSL
65(7)
Designing the Message-Routing DSL
65(7)
Creating the Authorization DSL
72(6)
Exploring the Authorization DSL design
73(3)
Building the Authorization DSL
76(2)
The ``dark side'' of using a DSL
78(1)
The Quote-Generation DSL
78(6)
Building business-facing DSLs
80(3)
Selecting the appropriate medium
83(1)
Summary
84(2)
Integrating DSLs into your applications
86(22)
Exploring DSL integration
86(2)
Naming conventions
88(3)
Ordering the execution of scripts
91(3)
Handling ordering without order
91(1)
Ordering by name
92(1)
Prioritizing scripts
92(2)
Ordering using external configuration
94(1)
Managing reuse and dependencies
94(2)
Performance considerations when using a DSL
96(2)
Script compilation
97(1)
Script execution
97(1)
Script management
98(1)
Memory pressure
98(1)
Segregating the DSL from the application
98(4)
Building your own security infrastructure
99(1)
Segregating the DSL
99(2)
Considerations for securing a DSL in your application
101(1)
Handling DSL errors
102(3)
Handling runtime errors
102(2)
Handling compilation errors
104(1)
Error-handling strategies
104(1)
Administrating DSL integration
105(1)
Summary
106(2)
Advanced complier extensibility approaches
108(26)
The compiler pipeline
109(1)
Meta-methods
110(3)
Quasi-quotation
113(2)
AST macros
115(11)
The unroll macro
116(2)
Building macros with the MacroMacro
118(2)
Analyzing the using macro
120(3)
Building an SLA macro
123(1)
Using nested macros
124(2)
AST attributes
126(2)
Compiler steps
128(4)
Compiler structure
129(1)
Building the implicit base class compiler step
130(2)
Summary
132(2)
DSL infrastructure with Rhino DSL
134(16)
Understanding a DSL infrastructure
135(1)
The structure of Rhino DSL
136(7)
The DslFactory
136(1)
The DslEngine
137(2)
Creating a custom IDslEngineStorage
139(4)
Codifying DSL idioms
143(3)
ImplicitBaseClassCompilerStep
143(1)
AutoReferenceFilesCompilerStep
144(1)
AutoImportCompilerStep
144(1)
UseSymbolsStep
144(1)
UnderscoreNamingConventionsToPascalCaseCompilerStep
145(1)
GeneratePropertyMacro
146(1)
Batch compilation and compilation caches
146(2)
Supplying external dependencies to our DSL
148(1)
Summary
149(1)
Testing DSLs
150(23)
Building testable DSLs
150(1)
Creating tests for a DSL
151(9)
Testing the syntax
152(3)
Testing the DSL API
155(3)
Testing the DSL engine
158(2)
Testing the DSL scripts
160(6)
Testing DSL scripts using standard unit testing
160(2)
Creating the Testing DSL
162(4)
Integrating with a testing framework
166(5)
Taking testing further
171(1)
Building an application-testing DSL
171(1)
Mandatory testing
171(1)
Summary
172(1)
Versioning DSLs
173(21)
Starting from a stable origin
174(1)
Planning a DSL versioning story
175(3)
Implications of modifying the DSL engine
175(1)
Implications of modifying the DSL API and model
176(1)
Implications of modifying the DSL syntax
177(1)
Implications of modifying the DSL environment
177(1)
Building a regression test suite
178(1)
Choosing a versioning strategy
179(6)
Abandon-ship strategy
179(1)
Single-shot strategy
179(1)
Additive-change strategy
180(1)
Tower of Babel strategy
181(1)
Adapter strategy
182(2)
The great-migration strategy
184(1)
Applying versioning strategies
185(5)
Managing safe, additive changes
185(2)
Handling required breaking change
187(3)
DSL versioning in the real world
190(2)
Versioning Brail
190(1)
Versioning Binsor
190(1)
Versioning Rhino ETL
191(1)
When to version
192(1)
Summary
193(1)
Creating a professional UI for a DSL
194(27)
Creating an IDE for a DSL
195(3)
Using Visual Studio as your DSL IDE
196(2)
Using #develop as your DSL IDE
198(1)
Integrating an IDE with a DSL application
198(11)
Extending #develop highlighting for our DSLs
200(3)
Adding code completion to our DSL
203(3)
Adding contextual code completion support for our DSL
206(3)
Creating a graphical representation for a textual DSL
209(7)
Displaying DSL execution
209(2)
Creating a UI dialect
211(1)
Treating code as data
212(4)
DSL code generation
216(3)
The CodeDOM provider for Boo
216(1)
Specific DSL writers
217(2)
Handling errors and warnings
219(1)
Summary
220(1)
DSLs and documentation
221(18)
Types of documentation
222(1)
Writing the Getting Started Guide
223(2)
Begin with an introduction
224(1)
Provide examples
224(1)
Writing the User Guide
225(7)
Explain the domain and model
225(2)
Document the language syntax
227(3)
Create the language reference
230(1)
Explain debugging to business users
231(1)
Creating the Developer Guide
232(5)
Outline the prerequisites
232(1)
Explore the DSL's implementation
232(1)
Document the syntax implementation
233(3)
Documenting AST transformation
236(1)
Creating executable documentation
237(1)
Summary
238(1)
DSL implementation challenges
239(24)
Scaling DSL usage
240(4)
Technical---managing large numbers of scripts
240(1)
Performing precompilation
241(2)
Compiling in the background
243(1)
Managing assembly leaks
243(1)
Deployment---strategies for editing DSL scripts in production
244(2)
Ensuring system transparency
246(5)
Introducing transparency to the Order-Processing DSL
246(2)
Capturing the script filename
248(1)
Accessing the code at runtime
248(2)
Processing the AST at runtime
250(1)
Changing runtime behavior based on AST information
251(2)
Data mining your scripts
253(1)
Creating DSLs that span multiple files
254(2)
Creating DSLs that span multiple languages
256(1)
Creating user-extensible languages
256(6)
The basics of user-extensible languages
256(2)
Creating the Business-Condition DSL
258(4)
Summary
262(1)
A real-world DSL implementation
263(22)
Exploring the scenario
264(1)
Designing the order-processing system
265(2)
Thinking in tongues
267(2)
Moving from an acceptable to an excellent language
269(2)
Implementing the language
271(7)
Exploring the treatment of statement's implementation
273(1)
Implementing the upon and when keywords
274(2)
Tracking which file is the source of a policy
276(1)
Bringing it all together
276(2)
Using the language
278(2)
Looking beyond the code
280(2)
Testing our DSL
280(1)
Integrating with the user interface
281(1)
Limited DSL scope
282(1)
Going beyond the limits of the language
282(1)
Summary
283(2)
appendix A Boo basic reference 285(17)
appendix B Boo language syntax 302(11)
index 313
Ayende Rahien

is a software developer focused mainly on .NET development,

who is always searching for better ways to solve problems. This search has led to

his involvement in the open source world. He is an active member in several leading

open source projects, including NHibernate, Castle, and Rhino Mocks. He is

also an active blogger on architecture, data access, best practices, testing, and other

topics. As a developer he builds complex business systems using NHibernate and

Castles Frameworks.