Session Title Template Specialization

Session Type Tutorial

Duration 90 minutes

Session Description

When programmers elect to use your templates, they are generally buying into the big picture of the architecture, or they’d use someone else’s template. However, it is unnecessary and counterproductive for them to be locked into every small decision driving that architecture.

Modelling tools and template designers have the option of disallowing customization, allowing full template replacement or allowing template specialization. Template replacement is an expensive option for changes that could be as small as changing scope in a single scope declaration. The real cost is in that it blocks incorporation of future template improvements.

Monolithic templates also hinder architectural evolution and require branching template sets into independent groups. This may be a significant factor in the slow adoption of the architecture provider/template user process model.

This talk focuses on understanding options to monolithic templates. For the template user, you’ll understand what hooks and other techniques to look for and demand. For the template designer, you’ll learn how to minimize the pain of customization. The techniques presented will include:

  • Techniques that depend on a generation harness (such as hooks and post processing),
  • Techniques that depend on the template language (direct inheritance and nested templates)
  • Techniques that depend on final architecture (partial class templates)
  • Techniques that depend on aggregation techniques (fixed and dynamic)

This talk presents the speaker’s recent work and research. If you’re working on modellers or generation systems, you’ll leave this talk understanding how to provide more downstream flexibility. If you’re a template developer, you’ll leave knowing which of these strategies might already by supported by your template language. If you’re a template user, you’ll leave understanding how to take advantage of the hooks available to you.

Speaker(s) Kathleen Dollard (AppVenture)
Kathleen Dollard is the author of Code Generation in Microsoft .NET (Apress). She is a member of the INETA Speaker’s Bureau and has been a Microsoft MVP for eleven years. She’s founding president of the Northern Colorado .NET User Group, a founding member of the Northern Colorado Software Architects Group, a member of IASA (Denver), and a member of the Denver Visual Studio User Group. She speaks on code generation and other topics at local user group and industry conferences including ArchitectConnections, DevConnections, DevTeach, SDWest and SDC (The Netherlands). She is also track chair and speaker for the inaugural GreenIT Connections. Kathleen has written numerous articles and has a monthly columns Ask Kathleen in Visual Studio Magazine. She blogs intermittently at www.msmvps.com/blogs/Kathleen. Kathleen is the Chief Technologist for AppVenture (www.AppVenture.com).

Intended Audience Some prior experience of code generation is recommended.