SlideShare a Scribd company logo
1 of 20
Krishna Bakka
 A domain specific language, DSL, is a special
purpose programming language specifically
designed to solve the problems in a particular
domain.
 Examples:
◦ LATEX : for document layout
◦ SQL : Databases
◦ HTML: Document markup
◦ Mathematica: Computation
◦ AutoCAD: Computer aided design
 The level of abstraction is very close to the
domain i.e., they are more expressive.
 Users don’t need to be experts in regular
programming languages.
 It helps to shift business IT from pure
software developers to domain experts.
 Achieving higher performance is difficult.
 A separate DSL for every domain creates the
need to learn many languages.
 Since it is used by a small number of people,
it is not every time profitable to construct a
new language from scratch.
 Internal DSLs:
◦ They are built upon another language, more often a
general purpose language.
◦ Inherits the tools from the base language.
◦ Restricted by the syntax of the base language.
 External DSLs:
◦ They are built from the scratch.
◦ Will have their own parsers and compilers.
◦ Hard to build.
 Preprocessing:
◦ DSL constructs are translated into constructs in the
base language.
 Embedding:
◦ Existing mechanisms are used to build a library of
domain-specific operations.
 Compiler/Interpreter:
◦ The language is built from the scratch.
◦ Compiler generator tools can be used to automate
some of the processes.
 Extensible compilers/interpreters:
◦ A general purpose language compiler or interpreter
is extended.
◦ Very hard since most of the notation is already
used.
◦ The DSL notations must not interfere with the
existing one.
Understanding
Service oriented software
Design.
 Service oriented architecture is one of the
modern architecture techniques which are
composed of loosely coupled and flexible
software components called services.
 Supports.
◦ Usability.
◦ Scalability.
◦ Flexibility.
 Every organization has set of services like
cleaning, customer, R&D service etc. All must
communicate effectively to run the
organization.
 Services are more like libraries that performs
various independent tasks but communicate
with a mechanism like web rather than using
in-memory function calls.
 Writing a DSL that generates service
components.
 User will be able to generate the service
components by simply writing and compiling
DSL script.
 Let us assume a simple SOA application
 Service-A
◦ Reads data from the data base.
 Service-B1
◦ Does some mathematical calculations on data
retrieved by service-A.
 Service-B2
◦ Does another kind of mathematical calculations on
data provided by service-A.
 Service-C
◦ Displays this processed data to the user.
 The DSL will generate the skeleton structure
of the above system.
◦ It generates the service components like data
variables and service methods.
◦ It generates the required documentation.
 A standard procedure can be established
while building SOA, which makes
communication between services
harmonious.
 Generating documentation automatically
decreases the time and labor for software
development.
 By simply, going through the DSL script,
software can be understood.
 DSL will become enough powerful to
◦ Generate the ESB.
◦ Generate communicating protocols.
 SOA is an architectural approach for creating
systems built from autonomous services.
 DSL will make implementation of SOA easier.

More Related Content

Similar to Building an Domain Specific Language for a Service

Tech presentation (part 1)
Tech presentation (part 1)Tech presentation (part 1)
Tech presentation (part 1)Abhijit Roy
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service ArchitectureLinjith Kunnon
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to knowsophiaaaddison
 
德國 combit List & label 21 報表設計工具軟體新功能介紹
德國 combit List & label 21 報表設計工具軟體新功能介紹德國 combit List & label 21 報表設計工具軟體新功能介紹
德國 combit List & label 21 報表設計工具軟體新功能介紹Cheer Chain Enterprise Co., Ltd.
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checkerYesu Raj
 
Dbms & prog lang
Dbms & prog langDbms & prog lang
Dbms & prog langTech_MX
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 
Anatomy Of A Driver Presentation 09 15 2008
Anatomy Of A Driver Presentation   09 15 2008Anatomy Of A Driver Presentation   09 15 2008
Anatomy Of A Driver Presentation 09 15 2008ctindale
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management systemYesu Raj
 
Full Stack Web Development
Full Stack Web DevelopmentFull Stack Web Development
Full Stack Web DevelopmentSWAGATHCHOWDARY1
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsMark Windholtz
 
INTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREINTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREabiramiabi21
 
Microservices architecture enterprise architecture
Microservices architecture enterprise architectureMicroservices architecture enterprise architecture
Microservices architecture enterprise architectureAdhiguna Mahendra
 

Similar to Building an Domain Specific Language for a Service (20)

Tech presentation (part 1)
Tech presentation (part 1)Tech presentation (part 1)
Tech presentation (part 1)
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
 
Database
DatabaseDatabase
Database
 
Difference between .net and asp.net all you need to know
Difference between .net and asp.net  all you need to knowDifference between .net and asp.net  all you need to know
Difference between .net and asp.net all you need to know
 
Db_05.ppt
Db_05.pptDb_05.ppt
Db_05.ppt
 
CNS Presentation
CNS PresentationCNS Presentation
CNS Presentation
 
德國 combit List & label 21 報表設計工具軟體新功能介紹
德國 combit List & label 21 報表設計工具軟體新功能介紹德國 combit List & label 21 報表設計工具軟體新功能介紹
德國 combit List & label 21 報表設計工具軟體新功能介紹
 
Visual Basic User Interface-III
Visual Basic User Interface-IIIVisual Basic User Interface-III
Visual Basic User Interface-III
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checker
 
Dbms & prog lang
Dbms & prog langDbms & prog lang
Dbms & prog lang
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
Anatomy Of A Driver Presentation 09 15 2008
Anatomy Of A Driver Presentation   09 15 2008Anatomy Of A Driver Presentation   09 15 2008
Anatomy Of A Driver Presentation 09 15 2008
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
 
Hotel management
Hotel managementHotel management
Hotel management
 
Full Stack Web Development
Full Stack Web DevelopmentFull Stack Web Development
Full Stack Web Development
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic Patterns
 
INTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREINTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWARE
 
Microservices architecture enterprise architecture
Microservices architecture enterprise architectureMicroservices architecture enterprise architecture
Microservices architecture enterprise architecture
 
DDD
DDDDDD
DDD
 

Building an Domain Specific Language for a Service

  • 2.  A domain specific language, DSL, is a special purpose programming language specifically designed to solve the problems in a particular domain.  Examples: ◦ LATEX : for document layout ◦ SQL : Databases ◦ HTML: Document markup ◦ Mathematica: Computation ◦ AutoCAD: Computer aided design
  • 3.  The level of abstraction is very close to the domain i.e., they are more expressive.  Users don’t need to be experts in regular programming languages.  It helps to shift business IT from pure software developers to domain experts.
  • 4.  Achieving higher performance is difficult.  A separate DSL for every domain creates the need to learn many languages.  Since it is used by a small number of people, it is not every time profitable to construct a new language from scratch.
  • 5.  Internal DSLs: ◦ They are built upon another language, more often a general purpose language. ◦ Inherits the tools from the base language. ◦ Restricted by the syntax of the base language.
  • 6.  External DSLs: ◦ They are built from the scratch. ◦ Will have their own parsers and compilers. ◦ Hard to build.
  • 7.  Preprocessing: ◦ DSL constructs are translated into constructs in the base language.  Embedding: ◦ Existing mechanisms are used to build a library of domain-specific operations.
  • 8.  Compiler/Interpreter: ◦ The language is built from the scratch. ◦ Compiler generator tools can be used to automate some of the processes.  Extensible compilers/interpreters: ◦ A general purpose language compiler or interpreter is extended. ◦ Very hard since most of the notation is already used. ◦ The DSL notations must not interfere with the existing one.
  • 10.  Service oriented architecture is one of the modern architecture techniques which are composed of loosely coupled and flexible software components called services.  Supports. ◦ Usability. ◦ Scalability. ◦ Flexibility.
  • 11.
  • 12.  Every organization has set of services like cleaning, customer, R&D service etc. All must communicate effectively to run the organization.  Services are more like libraries that performs various independent tasks but communicate with a mechanism like web rather than using in-memory function calls.
  • 13.
  • 14.  Writing a DSL that generates service components.  User will be able to generate the service components by simply writing and compiling DSL script.
  • 15.  Let us assume a simple SOA application  Service-A ◦ Reads data from the data base.  Service-B1 ◦ Does some mathematical calculations on data retrieved by service-A.  Service-B2 ◦ Does another kind of mathematical calculations on data provided by service-A.  Service-C ◦ Displays this processed data to the user.
  • 16.
  • 17.  The DSL will generate the skeleton structure of the above system. ◦ It generates the service components like data variables and service methods. ◦ It generates the required documentation.
  • 18.  A standard procedure can be established while building SOA, which makes communication between services harmonious.  Generating documentation automatically decreases the time and labor for software development.  By simply, going through the DSL script, software can be understood.
  • 19.  DSL will become enough powerful to ◦ Generate the ESB. ◦ Generate communicating protocols.
  • 20.  SOA is an architectural approach for creating systems built from autonomous services.  DSL will make implementation of SOA easier.

Editor's Notes

  1. Many defintions for service