1. Domain Specific Languages
Design Patterns and Methodologies
Lakshan Perera (lakshan@web2media.net)
Faculty of Information Technology
University of Moratuwa
2.
3. “Our understanding of the nature of
language and the mental processes
and structures that underlies its use
and acquisition”
Noam Chomsky
Cartesian Linguistics
5. “(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.”
Martin Fowler
21. SELECT books .title, count(*) AS
Authors
FROM books
JOIN book_authors ON books .is
bn = book_authors .is bn
GROUP BY books .title;
22. class Category < ActiveRecord::Base
has_many :articles
validates_presence_of :name
validates_uniqueness_of :name
def url_param
self.name.downcase.gsub(/s/,'_')
end
end
23. employee John Doe
compensate 500 dollars for each deal
closed in the past 30 days
compensate 100 dollars for each active deal
that closed more than 365 days ago
compensate 5 percent of gros s profits if
gross profits are greater than 1,000,000
dollars
compensate 3 percent of gros s profits if
gross profits are greater than 2,000,000
dollars