<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx</link><description>T4 templates have been a pretty popular topic lately. If you have no idea what they are, don’t feel bad, I didn’t either only a couple weeks ago! In a nutshell, it’s a simple template processor that’s built into VS and allows for all kind of cool code</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9146080</link><pubDate>Thu, 27 Nov 2008 12:35:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9146080</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;I don't like t4 templates for the reasons you outline. &amp;nbsp;I prefer to use a code generator to generate the code for me and then i can simply drop it into my solution rather than having to be coupled with my files and the t4 template. &amp;nbsp;I built my own generator &lt;a rel="nofollow" target="_new" href="http://www.flixon.com/site-generator/"&gt;http://www.flixon.com/site-generator/&lt;/a&gt; which was quickly knocked together but saves me hours of programming. &amp;nbsp;It uses a template engine and is fully customizable. &amp;nbsp;I think it would be great if t4 templates could be changed to use this approach.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9146137</link><pubDate>Thu, 27 Nov 2008 13:34:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9146137</guid><dc:creator>giorgio</dc:creator><description>&lt;p&gt;idem as asp classic: spaghetti code by net framework!!&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9146876</link><pubDate>Thu, 27 Nov 2008 18:41:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9146876</guid><dc:creator>Roger Jennings</dc:creator><description>&lt;p&gt;David,&lt;/p&gt;
&lt;p&gt;There's plenty of interest on my part. For example, see my story that included Damien Guard's T4 template for LINQ to SQL (&lt;a rel="nofollow" target="_new" href="http://oakleafblog.blogspot.com/2008/11/linq-to-sql-featured-in-visual-studio.html"&gt;http://oakleafblog.blogspot.com/2008/11/linq-to-sql-featured-in-visual-studio.html&lt;/a&gt; as an example.)&lt;/p&gt;
&lt;p&gt;--rj&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9147109</link><pubDate>Thu, 27 Nov 2008 19:37:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9147109</guid><dc:creator>davidebb</dc:creator><description>&lt;p&gt;Lee, I think we need to separate two things:&lt;/p&gt;
&lt;p&gt;1. T4 as a templating language&lt;/p&gt;
&lt;p&gt;2. The coupling behavior of T4 files with generated files in the project.&lt;/p&gt;
&lt;p&gt;We both agree that in this scenario, the coupling is not desirable since we really don't want to keep the .tt file around.&lt;/p&gt;
&lt;p&gt;However, I think using the T4 templating language makes a lot of sense (simple, user customizable, ...). &amp;nbsp;It's a matter of invoking it in a different way that doesn't add it to the project, which as I understand can be done.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9147134</link><pubDate>Thu, 27 Nov 2008 19:41:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9147134</guid><dc:creator>davidebb</dc:creator><description>&lt;p&gt;Giorgio,&lt;/p&gt;
&lt;p&gt;'Spaghetti code' occurs when you mix Controller logic with View logic. &amp;nbsp;While it is possible to do that in T4 and end up with bad code, you can easily achieve a very clean View (in the MVC sense) by separating the logic that comes up with the data from the logic that renders it (as I did in this .tt file).&lt;/p&gt;
</description></item><item><title>See SubSonic</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9147946</link><pubDate>Thu, 27 Nov 2008 23:16:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9147946</guid><dc:creator>D. Lambert</dc:creator><description>&lt;p&gt;If you're interested in another example of T4 template use, check out Rob Conery's SubSonic. &amp;nbsp;It's a pretty cool scaffolding tool for .Net - sort of inspired by ROR's ActiveRecord. &amp;nbsp;I'm not positive that earlier versions used T4, but I've been playing with 3.0 Preview 2, and it's using T4 to generate the scaffolded code. &amp;nbsp;IMO, it works pretty well - only a couple issues I've seen per my recent blog entry.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9148249</link><pubDate>Fri, 28 Nov 2008 00:47:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9148249</guid><dc:creator>davidebb</dc:creator><description>&lt;p&gt;Thanks Lambert, I'll take a closer look at what Rob has been up to with T4. &amp;nbsp;I did hear from other that he did some nice things. &amp;nbsp;As I understand he manages to process the T4 without it ever getting added to the project.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9148611</link><pubDate>Fri, 28 Nov 2008 02:18:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9148611</guid><dc:creator>GB</dc:creator><description>&lt;p&gt;Has anybody got an example of using the T4 template ,I mean calling them from a windows form application passing parameters etc...&lt;/p&gt;
&lt;p&gt;that would be very useful&lt;/p&gt;
</description></item><item><title>Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9148664</link><pubDate>Fri, 28 Nov 2008 02:32:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9148664</guid><dc:creator>DotNetLinks.net</dc:creator><description>&lt;p&gt;Track back from DotNetLinks.net&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9151954</link><pubDate>Fri, 28 Nov 2008 18:11:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9151954</guid><dc:creator>D. Lambert</dc:creator><description>&lt;p&gt;No, you've still got templates added to your project w/ SubSonic, but there's less code to generate than there'd be without the SubSonic lib to support the code. &amp;nbsp;It's not perfect, but it feels less cumbersome than this example because the generated code can remain generated - it's ok to keep the tt files and re-gen when needed. &amp;nbsp;You can sort of forget how those classes are created and just use them.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9160175</link><pubDate>Mon, 01 Dec 2008 14:07:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9160175</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;I'm very keen for the .NET teams to produce T4 templates on Codeplex or MDSN Code Gallery for each of the ASP.NET and Data Access (LINQ) technologies that use some form of code generation.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9271509</link><pubDate>Sun, 04 Jan 2009 20:34:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9271509</guid><dc:creator>dka</dc:creator><description>&lt;p&gt;I was recently brought in to do some work on a (semi) popular web portal the serves the ##### community. &amp;nbsp;In the second week, after doing a quick ER model to support the new system, I set out to build CRUD SPs to allow front-end developers to consume and maintain data. &amp;nbsp;I choose to use T4 to generate these SPs which were modeled after similar SP already in play by this client. &amp;nbsp;Well, at the end of the week I was let go for low productivity reasons. &amp;nbsp;Upon discussion with the lead engineer he let me know that techniques like T4 are the definition of low productivity! &amp;nbsp;Same with Linq and the notion of building a wrapper class to make the use of the CRUD that much easier. &amp;nbsp;Anyone ever hear of this argument? &amp;nbsp;Changing my mind and feeling regarding this topic will be impossible but I'd at least like to hear if there are others that feel like my former boss does. &amp;nbsp;At the very least I can learn how to avoid this lose-lose situation.&lt;/p&gt;
</description></item><item><title>re: Fun with T4 templates and Dynamic Data</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9343638</link><pubDate>Tue, 20 Jan 2009 09:30:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9343638</guid><dc:creator>brett</dc:creator><description>&lt;p&gt;You might want to check out Appventure Foundations (&lt;a rel="nofollow" target="_new" href="http://www.appventure.com"&gt;http://www.appventure.com&lt;/a&gt;). &amp;nbsp;It's a visual modeler that uses the t4 engine as its backend to generate code.&lt;/p&gt;
</description></item><item><title>Dynamic Data FAQ</title><link>http://blogs.msdn.com/davidebb/archive/2008/11/26/fun-with-t4-templates-and-dynamic-data.aspx#9432087</link><pubDate>Wed, 18 Feb 2009 21:35:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9432087</guid><dc:creator>Ricka on Dynamic Data</dc:creator><description>&lt;p&gt;Please post corrections/new submissions to the Dynamic Data Forum . Put FAQ Submission/Correction in&lt;/p&gt;
</description></item></channel></rss>