The slide explains about what is DSL? Types of DSL such as external and internal.How to select a DSL for our project ? Pros and Cons of DSL in software. How to use PowerShell as DSL in .Net applications
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Using PowerShell as DSL in .Net applications
1. Using PowerShell as DSL
in .Net applications
Joy George K
Jr.Architect, Orion India Systems
www.joymononline.in , joymon@gmail.com
2. PowerShell as DSL in .Net– What is
DSL?
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. Domain specific languages
have been talked about, and used for almost as
long as computing has been done.
Martin fowler
4. needed?
• Make the users as programmers.
• Tackle ever changing requirements
• Easy maintainability
• Extensibility ?
• …
5. External
• Internal
• Uses existing special language constructs to achieve
• Fluid API
• eg : Linq (entries.Where(e => e.Approved)
.OrderBy(e => e.Rating)
.FirstOrDefault())
• External
• Uses different language
• Special parsers
7. my DSL
• Internal v/s external
• If External
• Creating custom parser, compilers
• Leverage existing scripting languages
8. Demo
• External DSL
• PowerShell as DSL scripting language
• Inbuilt in Windows vista onwards
• Pipeling support which helps to write less
9. Cons
• Pros
• Easy customization / extensibility.
• Relief from frequent requirement changes.
• Cons
• Performance
• Maintenance overhead, if its external own DSL
• No auto completion
10. PowerShell as DSL in .Net – References
http://martinfowler.com/books/dsl.html
http://joymonscode.blogspot.in/2013/01/what-is-
domain-specific-language-dsl-in.html
http://joymonscode.blogspot.in/2013/01/dsl-demo-
first-c-application-which-uses.html
DSLs in Action by Debasish Ghosh