Domain Specific Language Ruby
Defining dsl domain specific language using ruby.
Domain specific language ruby. Therefore the whole premise of the question doesn t make sense. Slides by jakub naliwajek ruby on rails developer at netguru for sparkcamp 5 meet up. A domain specific language or dsl is a programming language of limited expressiveness focused on a particular domain it makes tasks in its domain easier by removing extraneous code for a particular task and allowing you to focus on the specific task at hand. View rails presenter 21 02.
The basic idea of a domain specific language dsl is a computer language that s targeted to a particular kind of problem rather than a general purpose language that s aimed at any kind of software problem. 166 creating a ruby domain specific language dsl summary in this episode we look at creating a dsl for html tables. A dsl is just an extension of ruby s syntax with methods that selection from the ruby programming language book. Domain specific languages have been talked about and used for almost as long as computing has been done.
Using domain specific languages 27 defining domain specific languages 27 why use a dsl. Mark as watched watch later. There are a wide variety of dsls ranging from widely used languages for common domains such as html for web pages down to languages used by only one or a few pieces of software such as. Though a simple example it opens a lot of possibilities for consistency and expandable in what can be done with a dsl.
A domain specific language provides a comfortable way how to express and perform operations in a specific domain such as spreadsheet functions financial operations transformations ai. A language that covers a specific and limited domain. Event we made a profit do i. Domain specific languages the goal of metaprogramming in ruby is often the creation of domain specific languages or dsls.
Thinking about a nice architecture for creating a own domains specific language in ruby i struggeld a bit about the translation part. May 26 2015 tweet. Ruby is not a domain specific language it is a general purpose language. Say we have a event problem.
Ruby helps here a lot to create a dsl is really simple and easy. Defining dsl domain specific language using ruby netguru may 26 2015 technology 0 42. A domain specific language dsl is a computer language specialized to a particular application domain this is in contrast to a general purpose language gpl which is broadly applicable across domains. Ruby 170 using enums for statically typed symbols java 172 chapter 13.