<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Application Generation - Dependency Injection</title>
			<link>http://www.pbell.com/index.cfm</link>
			<description>A series of occasional musings on architecting, securing, optimizing and generating web based applications. By Peter Bell.</description>
			<language>en-us</language>
			<pubDate>Sun, 19 May 2013 22:14:41 -0400</pubDate>
			<lastBuildDate>Mon, 13 Aug 2007 18:10:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>test@test.com</managingEditor>
			<webMaster>test@test.com</webMaster>
			
			
			
			
			
			<item>
				<title>Coldbox and Lightwire</title>
				<link>http://www.pbell.com/index.cfm/2007/8/13/Coldbox-and-Lightwire</link>
				<description>
				
				One of the many stories I didn&apos;t get a chance to mention recently was the great efforts by Aaron Roberson and &lt;a href=&quot;http://www.luismajano.com/&quot;&gt;Luis Majano&lt;/a&gt;. &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; is now a supported DI engine in &lt;a href=&quot;http://www.luismajano.com/blog/index.cfm/2007/8/3/ColdBox-203--Dashboard-221-now-available&quot;&gt;Coldbox&lt;/a&gt;.

Great work guys - many thanks!
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>Frameworks</category>
				
				<category>LightWire</category>
				
				<pubDate>Mon, 13 Aug 2007 18:10:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/8/13/Coldbox-and-Lightwire</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire: Paul Marcotte on the new &quot;mixin&quot; tag</title>
				<link>http://www.pbell.com/index.cfm/2007/6/27/LightWire-Paul-Marcotte-on-the-new-mixin-tag</link>
				<description>
				
				One of the differentiators of LightWire is the concept of &quot;mixin injection&quot;. It could more properly be called generic setter injection and the idea is to provide the benefits of setter injection (the ability to handle circular dependencies) without having to clutter up your classes with a bunch of setters that you&apos;re never actually supposed to call.

Paul has added a tag to allow you to describe your mixin injections using an XML config file. Check out &lt;a href=&quot;http://www.fancybread.com/blog/index.cfm/2007/6/27/LightWire-XML-Configuration-Update-Now-Supporting-Initmethod-and-Mixin&quot;&gt;his posting&lt;/a&gt; for more information.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 27 Jun 2007 17:45:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/6/27/LightWire-Paul-Marcotte-on-the-new-mixin-tag</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire Preso Recording Available Online</title>
				<link>http://www.pbell.com/index.cfm/2007/5/16/LightWire-Preso-Recording-Available-Online</link>
				<description>
				
				As &lt;a href=&quot;http://www.cfframeworks.com/&quot;&gt;Nick&lt;/a&gt; just mentioned, the LightWire recording is now &lt;a href=&quot;https://admin.adobe.acrobat.com/_a200985228/p93508928/&quot;&gt;available online&lt;/a&gt;.

The presentation provided a brief intro to Dependency Injection, a short overview of ColdSpring and then ran through how to use &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; and why you might consider it for some use cases.

If you&apos;re interested in why you might want to use a programmatic config file, &quot;mixin injection&quot; or &quot;ghetto annotations&quot;, check it out. Good Q&amp;A at the end, and as always, &lt;a href=&quot;http://www.firemoss.com/&quot;&gt;Joe&lt;/a&gt; had the last word (&lt;a href=&quot;http://www.coldspringframework.org&quot;&gt;ColdSpring Forever&lt;/a&gt; *grin*).
				
				</description>
				
				<category>Presentations</category>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 16 May 2007 16:05:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/16/LightWire-Preso-Recording-Available-Online</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Programmatic Config Files and Automagic Configuration</title>
				<link>http://www.pbell.com/index.cfm/2007/5/16/Programmatic-Config-Files-and-Automagic-Configuration</link>
				<description>
				
				Something I was getting really tired of in my framework was that every time I added a new feature (controller) or custom data type, not only did I need to write the CFC, but I also had to add the bean definition to my config file. With the programmatic config file in &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt;, I was able to write a script to automagically instantiate and inject all of the custom data types and features by looking at all of the CFC&apos;s in the appropriate directories . . .
				 [More]
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 16 May 2007 10:38:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/16/Programmatic-Config-Files-and-Automagic-Configuration</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>ONLINE LightWire Preso at 2pm EST Today</title>
				<link>http://www.pbell.com/index.cfm/2007/5/16/ONLINE-LightWire-Preso-at-2pm-EST-Today</link>
				<description>
				
				Just realized I hadn&apos;t made it at all obvious. The preso today at 2pm is online. Just click &lt;a href=&quot;https://admin.adobe.acrobat.com/_a200985228/pbonlightwire/&quot;&gt;here&lt;/a&gt; just before 2pm EST if you&apos;d like to attend!

This is a redo of last weeks which was marred by some technical glitches. Thanks to the &lt;a href=&quot;http://www.cfframeworks.com/&quot;&gt;CF Frameworks&lt;/a&gt; crew for putting this together.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 16 May 2007 10:23:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/16/ONLINE-LightWire-Preso-at-2pm-EST-Today</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Programmatic Configuration and Virtual Beans</title>
				<link>http://www.pbell.com/index.cfm/2007/5/16/Programmatic-Configuration-and-Virtual-Beans</link>
				<description>
				
				Something else I&apos;m going to be &lt;a href=&quot;https://admin.adobe.acrobat.com/_a200985228/pbonlightwire/&quot;&gt;presenting&lt;/a&gt; today at 2pm EST in terms of the kinds of benefits you can get by using a Dependency Injection engine with a &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;programmatic config file&lt;/a&gt; . . .
				 [More]
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 16 May 2007 10:18:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/16/Programmatic-Configuration-and-Virtual-Beans</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>An Example of the Benefits of a Programmatic Config File for Dependency Injection</title>
				<link>http://www.pbell.com/index.cfm/2007/5/16/An-Example-of-the-Benefits-of-a-Programmatic-Config-File-for-Dependency-Injection</link>
				<description>
				
				I&apos;m giving a &lt;a href=&quot;https://admin.adobe.acrobat.com/_a200985228/pbonlightwire/&quot;&gt;presentation&lt;/a&gt; at 2pm EST today on LightWire. As part of that I decided to finally take a few minutes to mock up what a small part of my config file would actually look like if I did it in XML rather than programmatically . . .
				 [More]
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 16 May 2007 09:43:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/16/An-Example-of-the-Benefits-of-a-Programmatic-Config-File-for-Dependency-Injection</guid>
				
				<enclosure url="http://www.pbell.com/enclosures/Archive.zip" length="2969" type="application/x-zip-compressed"/>
				
			</item>
			
		 	
			
			
			<item>
				<title>When NOT to Use Dependency Injection (introductory)</title>
				<link>http://www.pbell.com/index.cfm/2007/5/15/When-NOT-to-Use-Dependency-Injection-introductory</link>
				<description>
				
				While I can&apos;t imagine any non-trivial OO project that I wouldn&apos;t use dependency injection for, there are specific tasks within a project that don&apos;t necessarily need DI. Someone asked me a question earlier today which raised a good point when getting comfortable with DI - the difference between a dependency and a runtime bean request . . .
				 [More]
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Tue, 15 May 2007 14:33:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/15/When-NOT-to-Use-Dependency-Injection-introductory</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>InitMethod Added to LightWire</title>
				<link>http://www.pbell.com/index.cfm/2007/5/12/InitMethod-Added-to-LightWire</link>
				<description>
				
				I just had a use case where I needed the ability to call a custom init() method after fully initializing a bean but before returning it from LightWire (I needed a config method for my #BusinessObjectName#Metadata config beans to automagically add any config properties I hadn&apos;t explicitly set for an object). In the past I&apos;d just called super.config() at the end of the init() method, but that didn&apos;t allow for metadata inheritance (if you called MyUserMetadata that extended UserMetadata config would get called twice and it&apos;d get nasty). So, I have officially added support for an InitMethod property to the addSingleton(), addTransient() and addBean() config methods. This has not been added to the ColdSpring XML reader, but I&apos;ll have a word with Paul and wouldn&apos;t be surprised if this got done soon. For now I&apos;ve just updated the &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; svn repo for anyone in a rush to use the feature :-&gt;
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Sat, 12 May 2007 13:03:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/12/InitMethod-Added-to-LightWire</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire Preso - Apologies</title>
				<link>http://www.pbell.com/index.cfm/2007/5/9/LightWire-Preso--Apologies</link>
				<description>
				
				To the few, the trusty who sat through almost 40 minutes of technical issues, many thanks for hanging in there :-&gt;

After resolving sound, screen sharing and connectivity issues, we finally gave up the ghost when my Internet went down hard for almost 10 minutes.

The preso will be rescheduled, and the preso will be fully debugged so it should be nice and smooth next time. I&apos;ll post the new time when I get confirmation from Nick.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 09 May 2007 16:03:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/9/LightWire-Preso--Apologies</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire Preso - Link</title>
				<link>http://www.pbell.com/index.cfm/2007/5/9/LightWire-Preso--Link</link>
				<description>
				
				Here is a link to the connect room for the LightWire Preso at 2pm EST today: &lt;a href=&quot;https://admin.adobe.acrobat.com/_a200985228/pbonlightwire/&quot;&gt;https://admin.adobe.acrobat.com/_a200985228/pbonlightwire/&lt;/a&gt;.

If you want to review the benefits of Dependency Injection or see how programmatic configuration, mixin injection and perhaps even &quot;ghetto annotations&quot; can hep you to develop quicker, more agile OO apps, come along and check it out.

Thanks &lt;a href=&quot;http://www.cfframeworks.com&quot;&gt;Nick&lt;/a&gt;!

&lt;a href=&quot;http://upcoming.yahoo.com/event/186522/&quot;&gt;More information . . .&lt;/a&gt;
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Wed, 09 May 2007 09:46:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/9/LightWire-Preso--Link</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire Preso 2pm EST Tomorrow</title>
				<link>http://www.pbell.com/index.cfm/2007/5/8/LightWire-Preso-2pm-EST-Tomorrow</link>
				<description>
				
				If you&apos;re interested in finding out more about how &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; works, check out the &lt;a href=&quot;http://www.cfframeworks.com/blog/index.cfm/2007/4/27/cfFrameworkscom-workshop-Peter-Bell-on-Lightwire&quot;&gt;Preso&lt;/a&gt;    tomorrow at 2pm EST put together by the &lt;a href=&quot;http://www.cfframeworks.com/&quot;&gt;CF Frameworks&lt;/a&gt; crew.

I&apos;ll provide a brief overview of DI/IoC, but this will really be focused on how LightWire works (including ColdSpring XML support) and the use cases I&apos;ve found for programmatic config files, Mixin injection and &quot;Ghetto annotations&quot;. If you&apos;d like to learn more about alternative approaches to Dependency Injection in the ColdFusion world and how they can support more rapid development for certain use cases, it should be an hour well spent.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Tue, 08 May 2007 08:52:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/8/LightWire-Preso-2pm-EST-Tomorrow</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>LightWire Bug Fix - Please Upgrade to 0.66</title>
				<link>http://www.pbell.com/index.cfm/2007/5/7/LightWire-Bug-Fix--Please-Upgrade-to-066</link>
				<description>
				
				&lt;a href=&quot;http://www.fancybread.com/blog/&quot;&gt;Paul Marcotte&lt;/a&gt; found a subtle bug in &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; (thanks Paul!) which would cause problems if you were lazy loading transients as constructor arguments for other beans. Please upgrade to 0.66. No API or functionality changes from previous version - just the bug fix.

ZIP file and svn repo both updated.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Mon, 07 May 2007 07:19:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/7/LightWire-Bug-Fix--Please-Upgrade-to-066</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Ghetto Annotations Rock!</title>
				<link>http://www.pbell.com/index.cfm/2007/5/6/Ghetto-Annotations-Rock</link>
				<description>
				
				I was looking at &lt;a href=&quot;http://code.google.com/p/google-guice/&quot;&gt;Google Guice&lt;/a&gt; a little while back but for my use case I preferred having a central config file so I could see all of the key object relationships in one place and use the programmatic config features in &lt;a href=&quot;http://lightwire.riaforge.org&quot;&gt;LightWire&lt;/a&gt; so if I needed to include a DAO in every business object I could easily do that without having to change my config file when I added a few new business object.

However, I started to come across a few cases where the central config file felt like a hack. I have a set of &quot;feature&quot; controllers and each needs to speak to some (but not all) of the object controllers. The Catalog controller needs to speak to ProductController and CategoryController. The Administrator controller needs to speak to all of the controllers. The PageDisplay feature doesn&apos;t need to speak to ANY object controllers and so on. 

The problem is that for different projects I&apos;ll have a different set of &quot;feature&quot; controllers so I need to gen a snippet of my bean config file with all of the custom dependencies that are feature dependent. I started down that road, but it really felt a little hacky. While I want a central bean config to associate every business object and business object service method with its DAO programmatically, I really didn&apos;t need the &quot;unique&quot; stuff like the fact that this feature depends on those object controllers to be in that config file.

So, a while ago I added a simple &lt;a href=&quot;http://www.pbell.com/index.cfm/2007/4/10/LightWire-062--Ghetto-Annotations&quot;&gt;hack&lt;/a&gt; to implement the core intent of Guice annotations (that beans be self describing in terms of their dependencies). The implementation was much less powerful and sophisticated than Guices approach, but the basic concept of a bean being able to say &quot;don&apos;t forget I depend on X and Y&quot; without using auto-wiring (which I don&apos;t love for a number of reasons) worked really well. Now my feature controllers tend to say what object controllers they require and I find the combination of in-bean definitions and a central programmatic config really gives a lot of power for RAD.
				
				</description>
				
				<category>Dependency Injection</category>
				
				<category>LightWire</category>
				
				<pubDate>Sun, 06 May 2007 15:50:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/5/6/Ghetto-Annotations-Rock</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Would You like a Dynamic &quot;extends&quot;?</title>
				<link>http://www.pbell.com/index.cfm/2007/4/11/Would-You-like-a-Dynamic-extends</link>
				<description>
				
				Even when you favor composition over inheritance, there are still great reasons for using base classes in terms of keeping a tight, DRY code base. However, the one thing that is frustrating about inheritance in ColdFusion is that the extends attribute cannot be variablized (oh to be able to pass an &quot;extends&quot; property as part of the createObject method). Would you have any interest if I added support for dynamic &quot;extends&quot;?
				 [More]
				</description>
				
				<category>Design Patterns</category>
				
				<category>Dependency Injection</category>
				
				<pubDate>Wed, 11 Apr 2007 23:09:00 -0400</pubDate>
				<guid>http://www.pbell.com/index.cfm/2007/4/11/Would-You-like-a-Dynamic-extends</guid>
				
			</item>
			
		 	
			</channel></rss>
	

