Blog Series: Model Driven Development with T4 templates – Part 3
Date: Tuesday, February 19, 2013 8:33 AM
Posted by: Nico Ploner
Category: T4
Part three of this blog series creates data objects based on the domain specific model we build in the previous part. Instead of writing all class code by hand we’re going to implement a reusable T4 template that transforms the model diagram into C# data classes for EntityFramework CodeFirst.
Following to this blog post we’re going to create data persistence layer based on this data classes and a basic user interface using another T4 template.
Blog Series: Model Driven Development with T4 templates – Part 2
Date: Monday, February 18, 2013 10:22 AM
Posted by: Nico Ploner
Category: T4
The second part of this blog series introduces the tangible Modeling Tools, a Visual Studio integrated designer for several UML-style diagram types, that can be used to create domain specific models. Later in this series we’re going to use a Persistence Model diagram (.tasl) to generate data classes and a basic UI from it using T4 templates.
Blog Series: Model Driven Development with T4 templates
Date: Sunday, February 17, 2013 7:55 AM
Posted by: Nico Ploner
Category: T4
This blog series deals with the idea of Model Driven Development. In five parts we’re going to cover what Model Driven Development is and what tangible engineering offers to support this kind of software development process. We also walk through a scenario showing how to use our products.
In order to reconstruct all steps presented in this blog series, you need the following:
- Visual Studio 2010/2012 Standard Edition or higher
- tangible T4 Editor with Modeling Tools
- SQL Server Express Edition
This first part of the blog series talks about the principles behind the Model Driven Development and tangibles contribution to implement this development process. Finally we give an overview how this blog series continues.
Walkthrough: Creating a State Machine using T4 and a State Diagram
Date: Wednesday, January 30, 2013 4:36 PM
Posted by: Nico Ploner
Category: T4
Introduction
In this sample we will walk through a scenario that includes the usage of state diagrams and T4 templates. We will create a sample application that implements an alarm clock based on a state machine. The code for this machine will be generated by a T4 template based on the previously designed state diagram.
This article consists of the following chapters:
You can download the full sample code inside a Visual Studio Solution here: T4-StateMachineSample.zip (60K)
Transforming T4 Templates On Build
Date: Monday, January 28, 2013 11:12 AM
Posted by: Nico Ploner
Category: T4
T4 templates provide essential parts of your source code. So how can you be sure that the generated code is always up to date? Can you guarantee that all templates have been transformed before debugging or even deploying your application?
Use the OnBuild Feature of tangible T4 Editor
In the Pro Version our T4 Editor provides the functionality of transforming selected templates when building a Visual Studio Solution. This means: every time you hit F5, debug or deploy your project all selected templates are transformed and the output data is always up to date!
To mark a template in your Solution for transformation on build, set the “Transform on Build” Property in the Property Grid to “True”.