Model Driven Development – The MetaModel

A good friend showed me a code generator that their company had whipped up over a couple of days, and I was intrigued by the approach. It is reasonably straightforward, and I thought there must be more to this and there was!

Kathleen Dollard’s Pluralsight course

Kathleen has a very good course on Understanding Metaprogramming. This podcast on Visual Studio retooling from TextTemplatingToolkit and Custom Code Generator to Roslyn Code Generation.

Hundreds of million of dollars have been sunk into code generation.

Tailored Code Generators


Tool: Essential Key take aways:

  • Generation of Sample Data
  • The templating should be clean and easy to grasp
  • Model checker
  • Composable – partial model definition, extensibility
  • Naming policy
  • Consistent UI Patterns – Master-Detail, Filter, Collection of objects, Navigation, Command, Selection, Task
  • Conceptual UI Patterns – Login, Instance, Population, Wizard, Filter
    • Filter
    • Order criteria
    • Display set
    • Actions
    • Navigation
    • Rendering – Grid
    • Table
    • List

The real advantage:

  • Technology Forward Escape

The guy who wrote this presentation also runs radarc which is an impressive suite.

Strongly-typed metadata

Kathleen Dollard has a post and some sample code like Strongly Typed Metadata Classes. There’s a finite amount of metadata. By drawing a line between metadata and software, it works around having bad architecture.