
By Ayende Rahien
A general-purpose language like C# is designed to deal with all programming initiatives. against this, the constitution and syntax of a Domain-Specific Language are designed to check a selected purposes region. A DSL is designed for clarity and simple programming of repeating difficulties. utilizing the cutting edge Boo language, it's a breeze to create a DSL in your program area that works on .NET and doesn't sacrifice performance.
DSLs in Boo indicates you ways to layout, expand, and evolve DSLs for .NET by means of targeting ways and styles. You learn how to outline an app in phrases that fit the area, and to exploit Boo to construct DSLs that generate effective executables. and also you won't care for the awkward XML-laden syntax many DSLs require. The ebook concentrates on writing inner (textual) DSLs that permit effortless extensibility of the appliance and framework. And should you don't recognize Boo, don't worry-you'll examine here the entire recommendations you need.
Read Online or Download DSLs in Boo: Domain Specific Languages in .NET PDF
Best .net books
Microsoft Visual Studio 2010: A Beginner's Guide (A Beginners Guide)
<p align="left">Essential visible Studio 2010 Skills--Made Easy!
<p align="left">Endorsed by way of Microsoft and written by means of a Microsoft MVP and visible Studio specialist, this hands-on advisor teaches programmers and builders new to visible Studio 2010 the right way to maximize the newest free up of Microsoft's flagship improvement surroundings. Microsoft visible Studio 2010: A Beginner's advisor indicates you the way to construct functions from the floor up. You'll additionally how to customise the built-in improvement setting (IDE) itself, including your individual instruments that combine with visible Studio 2010.
.NET 4.0 Generics Beginner's Guide
Improve the sort safeguard of your code and simply create purposes utilizing . internet Generics four. zero
* the right way to use Generics' tools and ordinary collections to unravel complex problems.
* improve real-world functions utilizing Generics
* recognize the significance of every known assortment and widespread type and use them as in keeping with your specifications
* Benchmark the functionality of all commonly used collections
In aspect
Generics have been extra as a part of . web Framework 2. zero in November 2005. even though just like generics in Java, . web generics don't follow sort erasure yet each item has specified illustration at run-time. there is not any functionality hit from runtime casts and boxing conversions, that are in general dear. .NET bargains type-safe models of each classical info constitution and a few hybrid ones.
This booklet will express you every thing you want to begin writing type-safe purposes utilizing established info buildings on hand in Generics API. additionally, you will see how one can use a number of collections for every job you practice. This e-book is filled with functional examples, attention-grabbing purposes, and comparisons among Generics and extra conventional techniques. ultimately, every one box is bench marked at the foundation of functionality for a given activity, so that you recognize which one to take advantage of and when.
This publication first covers the basic recommendations akin to style safeguard, general tools, and established packing containers. because the booklet progresses, you'll the way to sign up for a number of accepted boxes to accomplish your ambitions and question them successfully utilizing Linq. There are brief workouts in each bankruptcy to spice up your knowledge.
The e-book additionally teaches you a few top practices, and a number of other styles which are usually on hand in wide-spread code.
Some vital favourite set of rules definitions are found in strength assortment (an API created by means of Wintellect Inc. ) which are lacking from . internet framework. This booklet indicates you ways to exploit such algorithms seamlessly with different widespread containers.
The ebook additionally discusses C5 collections. Java Programmers will locate themselves at domestic with this API. this is often the nearest to JCF. a few very attention-grabbing difficulties are solved utilizing widespread packing containers from . internet framework, C5, and PowerCollection Algorithms - a a twin of Google Set and Gender Genie for example!
What you are going to research from this publication
* How other forms of normal listsare comparable
* the right way to enforce your personal familiar record
* question all types of familiar box alike with Linq common question Operators
* increase . web collections with common function algorithms to be had in C5 and PowerCollection
* construct concurrent apps in respiring effortless steps.
* locate these algorithms you've been lacking in . web framework in PowerCollection and C5 API.
* learn the way diversified prevalent collections/containers practice below benchmarking, and while to exploit one over one other
* Port your STL code blocks to . web Generics that are very convenient while you are a veteran C++ developer and searching out another in . web world.
Approach
This is a concise, sensible advisor that can assist you study Generics in . web, with plenty of actual global and fun-to-build examples and transparent reasons. it truly is full of screenshots to help your realizing of the process.
Who this booklet is written for
This publication is aimed toward novices in Generics. It assumes a few operating wisdom of C# , however it isn't mandatory.
The following may get the main use out of the book:
* beginner C# builders being affected by Generics.
* skilled C++ and Java Programmers who're migrating to C# and searching out an alternative choice to different ordinary frameworks like STL and JCF could locate this publication handy.
* Managers who need to know what Generics is and the way to place it to sturdy use.
* Architects will locate the benchmarking super precious, simply because it's the 1st of its variety throughout a framework of numerous collections.
NHibernate 2.x Beginner's Guide
Swiftly retrieve information out of your database into . internet gadgets contain strong, effective information entry into your . internet initiatives achieve database independence, no longer tied to any specific expertise stay away from spending numerous hours constructing facts entry layers get rid of writing kept strategies transparent, targeted step by step instructions to wake up and operating speedy intimately NHibernate is an open resource object-relational mapper, or just positioned, the way to retrieve information out of your database into usual .
Professional ASP.NET Design Patterns
This targeted publication takes stable ASP. web software development one step extra via emphasizing loosely coupled and hugely cohesive ASP. web net software architectural layout. each one bankruptcy addresses a layer in an firm ASP. web software and indicates how confirmed styles, rules, and top practices might be leveraged to resolve difficulties and increase the layout of your code.
Extra resources for DSLs in Boo: Domain Specific Languages in .NET
Example text
Here’s how you would define a singleton in Boo. [singleton] class MySingleton: pass The [singleton] attribute isn’t a built-in capability of Boo; it’s a standard extension, and the capabilities to extend the language are also exposed to our code. This makes writing DSLs much easier. By using a similar approach and the same language-extension capabilities, you can use [disposable], [observable], and other advanced techniques, such as aspectoriented programming. NOTE There’s lots to learn about Boo, but this book will focus on the things we need for building DSLs.
NET, what we’re doing should be familiar. The language may be a bit different, but the objects and methods we call are all from the Base Class Library (BCL). This familiarity is welcome. We don’t need to learn everything from scratch. Let’s look at one last example before we get back to talking about DSLs. 6 shows a simple implementation of GREP. 6, GetFiles returns a type of string*, which is another Boo syntax shortcut. string* is the equivalent of IEnumerable of string. And more generally, T* is equivalent to IEunumerable of T, where T is any type.
I can use my existing knowledge to troubleshoot most problems. Staying within the CLR also means that I’ll have little problem when calling a DSL from my code, or vice versa—both the DSL and my code are CLR assemblies and interoperate cleanly. 3 shows an application that makes use of several DSLs. Those DSLs can access the application logic easily and natively, and the application can shell out to the DSL for decisions that require significant flexibility. As much as I like the CLR, though, the common languages for it aren’t well suited to language-oriented programming—they’re too rigid.