Kathleen Dollard and Code Generation

Kathleen Dollard has an excellent "Guest Opinion" named "Ease Development With Code Generation" in the latest Visual Studio Magazine.  I especially like this paragraph:
Some developers avoid code generation because they have lots of custom code. The key isn't avoiding custom code, but knowing precisely where to put it. Isolating handcrafted custom code from the plumbing goop is code generation's single biggest benefit. Code generation splits your application into technology-driven templates, business-defining metadata, and custom business algorithms. These three elements evolve on different timescales; treating them independently lets you weather massive technology changes or use templates to reuse the same technology to solve totally different problems.
Kathleen is also one of the few people that tells you how to manage generated code so it doesn't overwrite your custom code, which has always been a problem for most.

2 Comments

  • Kathleen's article refers to "dual classes" when discussing partial classes. I know that partial classes are classes split over multiple files, but am not sure what dual classes are.



    Is she referring to base and inherited classes?



    Thanks,

    Jason

  • Yes, I hadn't heard the term much either, but it does refer to inheritance.

Comments have been disabled for this content.