Understanding Metaprogramming

Metaprogramming means a better application, faster. This course covers the fundamentals that you can use in any language and on any platform.
Course info
Rating
(112)
Level
Intermediate
Updated
Jul 12, 2014
Duration
1h 56m
Table of contents
What is Metaprogramming?
Metaprogramming Output is in Your Control
Metadata is Distinct, Flexible, and Isolated
Metaprogramming is the Easiest Way to Do the Job
Human Crafted Code is Sacred
The Metaprogramming Result is Highest Quality
Domain Specific Languages (DSL)
The .NET Compiler Platform - Roslyn
Description
Course info
Rating
(112)
Level
Intermediate
Updated
Jul 12, 2014
Duration
1h 56m
Description

Are you ready to embrace metaprogramming to make a better application in less time? Learn about templates, metadata, process, handcrafting, and producing high quality output. Then apply these principles to any language on any platform. If you're interested in .NET, you're also interested in how the .NET Compiler Platform (Roslyn), makes metaprogramming easier by exposing syntactic and semantic trees.

About the author
About the author

Kathleen Dollard is a .NET Team Coach, has been a Microsoft MVP since 1998, and is an ASP.NET Insider.

More from the author
Play by Play: Visual Studio 2017 and C# 7
Intermediate
2h 34m
Aug 25, 2017
Visual Studio 2015 Playbook
Intermediate
2h 43m
Oct 17, 2016
More courses by Kathleen Dollard
Section Introduction Transcripts
Section Introduction Transcripts

What is Metaprogramming?
I'm Kathleen Dollard and this is my Pluralsight course, Understanding Metaprogramming. I have been doing metaprogramming or code generation for a really long time and this is a great time for metaprogramming. There is a lot of experience to learn from and the next version of Visual Studio includes the. NET Compiler Platform, which was code name Roslyn. This offers great new opportunities for metaprogramming. This course will give you a broad perspective on metaprogramming that applies to any language on any platform and specific information on. NET programming, which is where I spend most of my time. You'll see a set of principles that can help you avoid classic metaprogramming mistakes and guide you to success.

Metaprogramming Output is in Your Control
I'm Kathleen Dollard and this module is part of my Pluralsight course, Understanding Metaprogramming. Here I'll talk about maintaining control over metaprogramming output, which generally means having control over patterns or templates. You or your team needs to be in control and can alter the result of the metaprogramming process. If something goes wrong, it's your desk someone will be pounding on, your job on the line. This means you must have access to whatever template or pattern definition is used. File access itself is nonsufficient. Templates and pattern expression must be created in a way that makes it practical for you to maintain. It has to not be too complicated. This module covers several styles of templates available today and what good candidates for expansion looks like. You'll also see a little dynamic programming.

Metadata is Distinct, Flexible, and Isolated
I'm Kathleen Dollard and this module is part of my Pluralsight course, Understanding Metaprogramming. Here I'll talk about capturing metadata that defines the unique aspects of your application. Most metaprogramming techniques apply a pattern to a unique situation and that unique situation is described in metadata. In creating a rule about metadata, I'd really like to just say you need good metadata. There is the simple implication that you need metadata to isolate what's unique about your application from the pattern of your application, but what is metadata and what is good metadata?

Metaprogramming is the Easiest Way to Do the Job
I'm Kathleen Dollard and you're watching my Pluralsight course, Understanding Metaprogramming. This module talks about making metaprogramming the easiest way to do the job. That's important because you want to leverage programmers' laziness and inspire them to do other great things by making stupid, redundant stuff go away. That's not just an abstract; in the long run it needs to be easier. The goal is that metaprogramming is the easiest way to accomplish the underlying task every day in every scenario, at least almost every day and almost every scenario. That does require some up front work and infrastructure maintenance.

Human Crafted Code is Sacred
I'm Kathleen Dollard and this module is part of my Pluralsight course, Understanding Metaprogramming. This module covers handcrafted or human crafted code, why it's critical to protect it, how to protect it, and how to customize it within a metaprogramming environment. There is an underlying assumption to this module. You're not just generating code once, but rather running metaprogramming as an ongoing regenerative process. I use a very strong word in the principle on handcrafted or human crafted code. I use the word sacred. One of the key factors that sets humans apart is their ability to be creative. That same creative characteristic means that we probably won't solve a problem in the same way after lunch, much less in six months, much less a different person addressing the same problem. You don't have handcrafted changes to be overwritten because they were put in the midst of generated code. The key is where you put handcrafted code.

The Metaprogramming Result is Highest Quality
I'm Kathleen Dollard and you're watching my course, Understanding Metaprogramming. This module is about providing the highest quality output for metaprogramming. Each of the five principles builds on the previous ones. Quality relies on the success of all four of the preceding principles. Metaprogramming can improve the quality of your application if you avoid the easily pitfalls. This module looks at pitfalls and benefits, governance, and architectural customization, and separating development concerns.

Domain Specific Languages (DSL)
I'm Kathleen Dollard and this module is part of my course, Understanding Metaprogramming. This module is about domain specific languages or DSL.

The .NET Compiler Platform - Roslyn
I'm Kathleen Dollard and this is the last module of my Pluralsight course, Understanding Metaprogramming. This module talks about the. NET compiler platform that was code named Roslyn. This is the new compiler that will be in the next version of Visual Studio. You'll learn was Roslyn is, see several tools provided with Roslyn, learn a handful of really important Roslyn concepts, and see one vision of a metaprogramming future with Roslyn. Since I'm talking about the future and where we are in the timeline here, you might want to know when I'm recording. This is May 2014.