1 / 20

Visual Studio Extensibility, DSL Tools and T4 Code Generation

Explore the past and present of Visual Studio, including its extensibility options such as DSL Tools and T4 code generation. Learn about automating tasks, onboarding new developers, and maintaining consistency. Discover various extensibility options like snippets, project templates, custom commands, and more. See a demo of Visual Studio extensions for DSL Tools and T4 code generation, including domain-specific languages, visual designers, custom XML files, and object models. Learn about T4 text templating and its use in generating text files and strings. Get insights into the Double Derived Pattern and find answers to your questions.

annk
Download Presentation

Visual Studio Extensibility, DSL Tools and T4 Code Generation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Studio Extensibility, DSL Tools and T4 Code Generation Peter Goodman

  2. Agenda • Visual Studio past and present • Extensibility Options • Extensibility Samples • DSL Tools • T4 Code Generation

  3. Visual Studio Past and Present • Native Application • 32-bit • Large and old code base • Visual Studio – 1995 • Visual Studio .Net – 2002 • Since 2005 supports VS Hives

  4. Why Extend? • Automate – it’s your job • Onboarding • Consistency

  5. Extensibility Options • Snippets • Project Templates • Item Templates • Custom Commands • Toolbars • Menus • Tool Windows • Custom Tools • Custom Designers • Editor Extensions • Custom Languages

  6. Extensibility Options • Macros • Add-ins • VS Packages • VS Shell

  7. Extensibility Options

  8. Demo Visual Studio Extensions

  9. DSL Tools • Domain Specific Languages • Visual Designer • Custom XML File • Object Model and API • T4 Text Templating

  10. Demo DSL Tools

  11. DSL Tools

  12. T4 Text Templating • Generates Text Files / Strings • ASP style syntax <# …. #> • Built into Visual Studio from VS 2010 • Used by Entity Framework, MVC scaffolding, WCF RIA and other MS technologies • Now supports pre-processed templates

  13. Demo T4 Text Templating

  14. Double Derived Pattern publicclassMyGeneratedClass : IMyGeneratedClasses { publicstringDoFoo() { return""; } }

  15. Double Derived Pattern publicclassMyGeneratedClass : MyGeneratedClassBase {} publicclassMyGeneratedClassBase : IMyGeneratedClasses { public virtualstringDoFoo() { return""; } }

  16. Double Derived Pattern publicpartialclassMyGeneratedClass : MyGeneratedClassBase {} publicclassMyGeneratedClassBase : IMyGeneratedClasses { public virtualstringDoFoo() { return""; } }

  17. Questions?

  18. Thanks • pete@petegoo.com • http://blog.petegoo.com

More Related