Using PowerShell as DSL in .Net applications

967 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
967
On SlideShare
0
From Embeds
0
Number of Embeds
92
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Using PowerShell as DSL in .Net applications

  1. 1. Using PowerShell as DSL in .Net applications Joy George K Jr.Architect, Orion India Systems www.joymononline.in , joymon@gmail.com
  2. 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
  3. 3. DSL • Excel macros • SQL • CSS • RegEx • .Bat files
  4. 4. needed? • Make the users as programmers. • Tackle ever changing requirements • Easy maintainability • Extensibility ? • …
  5. 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
  6. 6. Arch DSL EngineCore app Files Objects and DSL script Return objects Alter objects, prepare result DSL
  7. 7. my DSL • Internal v/s external • If External • Creating custom parser, compilers • Leverage existing scripting languages
  8. 8. Demo • External DSL • PowerShell as DSL scripting language • Inbuilt in Windows vista onwards • Pipeling support which helps to write less
  9. 9. Cons • Pros • Easy customization / extensibility. • Relief from frequent requirement changes. • Cons • Performance • Maintenance overhead, if its external own DSL • No auto completion
  10. 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
  11. 11. Are you ready to try DSL in your project ? & A
  12. 12. Thank You Joy George K Jr.Architect, Orion India Systems www.joymononline.in joymon@gmail.com

×