using powershell as dsl in .net applications
DESCRIPTION
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 applicationsTRANSCRIPT
Using PowerShell as DSL in .Net applications
Joy George K
Jr.Architect, Orion India Systems
www.joymononline.in , [email protected]
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
PowerShell as DSL in .Net – What can be DSL
• Excel macros• SQL• CSS• RegEx• .Bat files
PowerShell as DSL in .Net – Why its needed?
• Make the users as programmers.• Tackle ever changing requirements• Easy maintainability• Extensibility ?• …
PowerShell as DSL in .Net– Internal & 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
PowerShell as DSL in .Net – Arch
DSL EngineCore app
Files
Objects and DSL script
Return objectsAlter objects, prepare result
DSL
PowerShell as DSL in .Net – Selecting my DSL
• Internal v/s external• If External
• Creating custom parser, compilers• Leverage existing scripting languages
PowerShell as DSL in .Net - Demo
• External DSL• PowerShell as DSL scripting language
• Inbuilt in Windows vista onwards• Pipeling support which helps to write less
PowerShell as DSL in .Net – Pros and Cons
• Pros• Easy customization / extensibility.• Relief from frequent requirement changes.
• Cons• Performance• Maintenance overhead, if its external own DSL• No auto completion
PowerShell as DSL in .Net – Referenceshttp://martinfowler.com/books/dsl.htmlhttp:// 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
Are you ready to try DSL in your project ?
PowerShell as DSL in .Net – Q & A
Thank YouJoy George K
Jr.Architect, Orion India Systems