<?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>CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx</link><description>There are many scenarios where the need to generate source code arises. The MVC helpers I introduced in my last post is one such example. Note that I am focusing on generating source code here, and not on scenarios where you may want to generate IL directly</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9692956</link><pubDate>Wed, 03 Jun 2009 23:55:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9692956</guid><dc:creator>sjnaughton</dc:creator><description>&lt;p&gt;Great post David, I've much about T4 but had no rela idea what it was but your post has given me that essential boost and I think I shat give T4 a go.&lt;/p&gt;
&lt;p&gt;Steve :D&lt;/p&gt;
</description></item><item><title>David Ebbo's blog : CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9693107</link><pubDate>Thu, 04 Jun 2009 00:13:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9693107</guid><dc:creator>DotNetShoutout</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout&lt;/p&gt;
</description></item><item><title>CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9695865</link><pubDate>Thu, 04 Jun 2009 03:30:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9695865</guid><dc:creator>What's New</dc:creator><description>&lt;p&gt;There are many scenarios where the need to generate source code arises.&amp;amp;#160; The MVC helpers I introduced&lt;/p&gt;
</description></item><item><title>The Technology Post for June 3rd</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9697831</link><pubDate>Thu, 04 Jun 2009 05:09:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9697831</guid><dc:creator>Jason N. Gaylord's Blog</dc:creator><description>&lt;p&gt;If you are looking to follow this series, be sure to subscribe to my RSS feed at &lt;a rel="nofollow" target="_new" href="http://feeds.jasongaylord"&gt;http://feeds.jasongaylord&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>The Technology Post for June 3rd</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9698039</link><pubDate>Thu, 04 Jun 2009 06:20:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9698039</guid><dc:creator>ASPInsiders</dc:creator><description>&lt;p&gt;If you are looking to follow this series, be sure to subscribe to my RSS feed at &lt;a rel="nofollow" target="_new" href="http://feeds.jasongaylord.com/JasonNGaylord"&gt;http://feeds.jasongaylord.com/JasonNGaylord&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9698492</link><pubDate>Thu, 04 Jun 2009 09:20:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9698492</guid><dc:creator>Gabriel</dc:creator><description>&lt;p&gt;I have used codeDom and it is very verbose and not easy .&lt;/p&gt;
&lt;p&gt;T4 looks easy however as soon as you want to do something a bit more complicated , you have todo lot of work.&lt;/p&gt;
&lt;p&gt;How do you pass multiple parameters at runtime?&lt;/p&gt;
&lt;p&gt;Suppose you have a form with a user choosing fields to generate a class how do you pass it to T4.&lt;/p&gt;
&lt;p&gt;I have not seen any example where somebody used a windows form ,passed some parameters to T4 and generated code.&lt;/p&gt;
&lt;p&gt;It still looks sort of incomplete.&lt;/p&gt;
&lt;p&gt;Am I missing something may be?&lt;/p&gt;
&lt;p&gt;thanks a lot for your post&lt;/p&gt;
</description></item><item><title>David Ebbo's blog : CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9700143</link><pubDate>Thu, 04 Jun 2009 22:51:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700143</guid><dc:creator>DotNetBurner - Architecture</dc:creator><description>&lt;p&gt;DotNetBurner - burning hot .net content&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9700255</link><pubDate>Thu, 04 Jun 2009 23:49:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700255</guid><dc:creator>MIchael Washington</dc:creator><description>&lt;p&gt;Vary good article. You explain a difficult subject in a way that is easy to follow. I think CodeDom beats T4 because it is actually &amp;quot;Clean&amp;quot;. Once someone explains the rules you simply follow them. In the end it's just code. Code always follows a finite set of rules or it wont compile.&lt;/p&gt;
</description></item><item><title>A T4 based approach to creating ASP.NET MVC strongly typed helpers</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9700907</link><pubDate>Fri, 05 Jun 2009 09:52:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700907</guid><dc:creator>David Ebbo's blog</dc:creator><description>&lt;p&gt;Earlier this week, I wrote a post on using a BuildProvider to create ActionLink helpers .&amp;amp;#160; That&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9706078</link><pubDate>Mon, 08 Jun 2009 04:55:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9706078</guid><dc:creator>Donald</dc:creator><description>&lt;p&gt;I like the simpleness of this article... now how do I get my values into the template?&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9708819</link><pubDate>Mon, 08 Jun 2009 21:25:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9708819</guid><dc:creator>davidebb</dc:creator><description>&lt;p&gt;Donald: you wrote &amp;quot;how do I get my values into the template?&amp;quot;. &amp;nbsp;Not exactly sure what you mean. &amp;nbsp;Could you elaborate on your question? &amp;nbsp;Thanks!&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9711316</link><pubDate>Tue, 09 Jun 2009 03:27:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9711316</guid><dc:creator>Donald</dc:creator><description>&lt;p&gt;T4 is new to me and I have no idea where to start. Looks like this article is showing us the middle.&lt;/p&gt;
&lt;p&gt;I can see where the value for &amp;nbsp;&amp;lt;#= i #&amp;gt;&amp;quot;); comes from... it is the for statement. This part I understand.&lt;/p&gt;
&lt;p&gt;Apart from doing it in the template... how do I extract data from some external source like a database or xml file so that the template can use it?&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9716628</link><pubDate>Tue, 09 Jun 2009 20:16:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9716628</guid><dc:creator>davidebb</dc:creator><description>&lt;p&gt;Donald, indeed my post is not a great first introduction to T4. &amp;nbsp;The answer to your question is multi-part. First, since your T4 code is standard managed code, you can do anything you want, including open arbitrary files. Then, there is the concept of a T4 host. When the T4 file is run directly by VS, there is a VS host from which you can get services. But you can also write a custom host that can feed arbitrary data to the template. You can look at my June 4 post for an example of that. Of course, there is much more to say about T4, and there are some good blogs around that discuss it (like &lt;a rel="nofollow" target="_new" href="http://www.olegsych.com/"&gt;http://www.olegsych.com/&lt;/a&gt;).&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9723351</link><pubDate>Wed, 10 Jun 2009 07:52:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9723351</guid><dc:creator>Donald</dc:creator><description>&lt;p&gt;I checked out the post. Seems quite involved.&lt;/p&gt;
&lt;p&gt;Would like something like: &lt;/p&gt;
&lt;p&gt;1. here include these .dlls in your program.&lt;/p&gt;
&lt;p&gt;2. call these methods to pass you data to the template.&lt;/p&gt;
&lt;p&gt;3. then compile your program.&lt;/p&gt;
&lt;p&gt;4. attach as vs.net addin.&lt;/p&gt;
&lt;p&gt;Just hoping.&lt;/p&gt;
</description></item><item><title>re: CodeDom vs T4: two approaches to Code Generation</title><link>http://blogs.msdn.com/davidebb/archive/2009/06/03/codedom-vs-t4-two-approaches-to-code-generation.aspx#9723718</link><pubDate>Wed, 10 Jun 2009 12:16:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9723718</guid><dc:creator>Donald</dc:creator><description>&lt;p&gt;Can using the T4 way be easier than creating a managed addin that?:&lt;/p&gt;
&lt;p&gt;1. pops up a form&lt;/p&gt;
&lt;p&gt;2. takes input from a user&lt;/p&gt;
&lt;p&gt;3. inserts the values into a vb9 xml literal type template.&lt;/p&gt;
&lt;p&gt;4. saves the document(s)&lt;/p&gt;
&lt;p&gt;Or should I just continue to do it this way?&lt;/p&gt;
</description></item></channel></rss>