<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://java.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
 <title>Javalobby - Comments for &quot;Dependency Injection and Type Safety&quot;</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-</link>
 <description>Comments for &quot;Dependency Injection and Type Safety&quot;</description>
 <language>en</language>
<item>
 <title>Or Springy (A Ruby based</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1607</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;Or Springy (A Ruby based Spring DSL). &lt;/p&gt;&lt;p&gt;http://code.trampolinesystems.com/springy &lt;/p&gt;</description>
 <pubDate>Tue, 04 Mar 2008 06:01:10 -0500</pubDate>
 <dc:creator>alarmnummer</dc:creator>
 <guid isPermaLink="false">comment 1607 at http://java.dzone.com</guid>
</item>
<item>
 <title>Or just use the Groovy</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1577</link>
 <description>&lt;!--paging_filter--&gt;Or just use the &lt;a href=&quot;http://grails.org/Spring+Bean+Builder&quot;&gt;Groovy Spring Builder&lt;/a&gt;.  :)</description>
 <pubDate>Mon, 03 Mar 2008 09:19:48 -0500</pubDate>
 <dc:creator>puredanger</dc:creator>
 <guid isPermaLink="false">comment 1577 at http://java.dzone.com</guid>
</item>
<item>
 <title>I think/hope that dynamic</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1576</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;I think/hope that dynamic languages are going to play a more important role in a lot of configuration stuff. Spring is nice, but the fact that you need to resort to all kinds of FactoryBeans for the most simplest things, is the consequence of Spring-XML being an external domain language. A Ruby DSL for Spring could transform the DSL in an internal one and thereby reducing the need to FactoryBeans (and large amounts of XML). &lt;/p&gt;&lt;p&gt;And Dynamic Languages normally are not very strong in the compiletime type-checking departement. &lt;/p&gt;</description>
 <pubDate>Mon, 03 Mar 2008 09:13:19 -0500</pubDate>
 <dc:creator>alarmnummer</dc:creator>
 <guid isPermaLink="false">comment 1576 at http://java.dzone.com</guid>
</item>
<item>
 <title>&gt;I also forgot to mention</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1483</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;&amp;gt;I also forgot to mention generics type checking (which are difficult to check at runtime), and code coverage reporting. &lt;/p&gt;&lt;p&gt;It is actually possible to check the type of a generic collection at runtime in certain situations: &lt;/p&gt;&lt;p&gt;Field and Method objects (reflection objects) have two methods:&lt;br /&gt;&lt;br /&gt;Field.getGenericType()  &lt;br /&gt;Method.getGenericReturnType()&lt;br /&gt;Method.getGenericParameterTypes()&lt;/p&gt;&lt;p&gt;Using these two methods you can actually obtain the generic type of a return type of a Method, the parameters of a Method, or a Field. In other words, it is possible to determine the type put inside the &amp;lt;&amp;gt; in &lt;/p&gt;&lt;p&gt;List&amp;lt;String&amp;gt;&lt;/p&gt;&lt;p&gt;I know some people will claim that this is impossible due to &amp;quot;type erasure&amp;quot;. Nevertheless it is possible. Both Spring and Butterfly Container uses that to further verify the config files at parse time. It seems to me that type erasure only truly happens for local variables (do they?), and for methods and fields in the sense that it is possible to assign a List&amp;lt;Integer&amp;gt; to a List&amp;lt;String&amp;gt; at runtime. However, you can actually do some checking using reflection.&lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 16:09:09 -0500</pubDate>
 <dc:creator>jj83777</dc:creator>
 <guid isPermaLink="false">comment 1483 at http://java.dzone.com</guid>
</item>
<item>
 <title>&quot;I try to load them all</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1479</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;&amp;quot;I try to load them all compiletime by adding a junit test.&amp;quot;&lt;/p&gt;&lt;p&gt;This does sound easier that making the compiler to the checking. :)&lt;/p&gt;&lt;p&gt;I find strategies which work well for me, don&#039;t scale well to a team of developers who have diverse opinions on how to develop. More so when there are multiple teams who feel under pressure to cut corners and/or lots of legacy code, say millions of lines.&lt;/p&gt;&lt;p&gt; However, if you work with people who have a different view on unit tests, (e.g. &amp;quot;unit tests are for time wasters&amp;quot; is but one) you might find they start breaking your code, if for example they only test their code and don&#039;t write unit tests every time they make a significant change to the configuration. &lt;/p&gt;&lt;p&gt;Usually, (and only say usually) you can be sure they have compiled some code before checking in a change. (Unless you use eclipse in which case not all the code needs to compile to run :) Some developers love this &amp;quot;feature&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 15:50:44 -0500</pubDate>
 <dc:creator>peter_lawrey</dc:creator>
 <guid isPermaLink="false">comment 1479 at http://java.dzone.com</guid>
</item>
<item>
 <title>I also forgot to mention</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1477</link>
 <description>&lt;!--paging_filter--&gt;I also forgot to mention generics type checking (which are difficult to check at runtime), and code coverage reporting.</description>
 <pubDate>Thu, 28 Feb 2008 15:39:24 -0500</pubDate>
 <dc:creator>peter_lawrey</dc:creator>
 <guid isPermaLink="false">comment 1477 at http://java.dzone.com</guid>
</item>
<item>
 <title>I think Spring XML is good</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1476</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;I think Spring XML is good for introducing a standard because it is widely used, therefor it must be good.&lt;/p&gt;&lt;p&gt;However, having used and written various frameworks I am convinced that you can achieve similar if not better results with Java code and some disipline.  i.e. You can do DI with Java code!&lt;/p&gt;&lt;p&gt;The problems I see with Spring XML (compared with plain old java code) are; code completion, pre compiling (to ensure it isn&#039;t changed), static type checking, code analysis support, refactoring tools, debugging support, constructs which are like programming in XML (using XML in a way it was not designed for). Profiling is not easy either... :)&lt;/p&gt;&lt;p&gt;While it is not perfect, the tools for Spring are improving and an increasing number of people are familar with it &lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 15:32:44 -0500</pubDate>
 <dc:creator>peter_lawrey</dc:creator>
 <guid isPermaLink="false">comment 1476 at http://java.dzone.com</guid>
</item>
<item>
 <title>Compiletime typesafety is</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1472</link>
 <description>&lt;!--paging_filter--&gt;Compiletime typesafety is useful because you can check a lot of problems compiletime (instead of runtime). To make sure that my Spring applicationcontext files are correct, I try to load them all compiletime by adding a junit test. This way I know that my spring context is valid. So although I&#039;m someone with a love for cool typing systems (even null pointers can be prevented compiletime by a good type system) I don&#039;t see the extra value here because there already is a working solution.</description>
 <pubDate>Thu, 28 Feb 2008 09:34:39 -0500</pubDate>
 <dc:creator>alarmnummer</dc:creator>
 <guid isPermaLink="false">comment 1472 at http://java.dzone.com</guid>
</item>
<item>
 <title>The static typing they are</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1465</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;The static typing they are talking about is static typing enforced by the compiler.&lt;/p&gt;&lt;p&gt; Of course, it&#039;s perfectly possible to write a small checker to examine the spring config (or whatever config) and act as a type checker.  I do this in my work for my own DI framework, but I have also added type inference (types are propagated along connectors).&lt;/p&gt;&lt;p&gt; Cheers,&lt;br /&gt;Andrew&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 04:25:13 -0500</pubDate>
 <dc:creator>andrewm</dc:creator>
 <guid isPermaLink="false">comment 1465 at http://java.dzone.com</guid>
</item>
<item>
 <title>It would be nice to hear</title>
 <link>http://java.dzone.com/news/dependency-injection-and-type-#comment-1463</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;It would be nice to hear concrete examples of exactly *what* errors people have experienced as a result of Springs XML, Butterfly Container Script or similar DI configuration mechanisms of your favourite DI framework. Type safety issues *can* arise, but do they? And exactly what kind of errors do you get? &lt;/p&gt;&lt;p&gt;Knowing more about what errors occur in reality, perhaps Spring XML, Butterfly Container Script and similar mechanisms could be improved to check for such errors in the future.&lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 03:46:51 -0500</pubDate>
 <dc:creator>jj83777</dc:creator>
 <guid isPermaLink="false">comment 1463 at http://java.dzone.com</guid>
</item>
</channel>
</rss>
