Join us on:

T5. Automatic Dependency Injection In The Land Of Dynamic Languages

Misko Hevery, Google

Misko Hevery works as an Agile Coach at Google where he is responsible for coaching Googlers to maintain the high level of automated testing culture. This allows Google to do frequent releases of its web applications with consistent high quality. Previously he worked at Adobe, Sun Microsystems, Intel, and Xerox (to name a few), where he became an expert in building web applications in web related technologies such as Java, JavaScript, Flex and ActionScript. He is very involved in Open Source community and an author of several open source projects. Recently his interest in Test-Driven-Development turned into with which he hopes to change the testing culture of the open source community.

Automatic Dependency Injection Frameworks (such as GUICE, PicoContainer, and Spring) are very popular in Java, where they depend heavily on static typing, interfaces, reflection and annotations. But what about languages such as ActionScript, JavaScript, Python and Ruby, where duck-typing and lack of run-time-type-information at first glance make these frameworks impossible? Can a simple Dependency Injection Framework framework be built? We'll look at how the power of functional programing and functions as first class citizens in these languages can be leveraged to build a simple and effective dependency injection framework. We'll also explore the power of using such a framework in dynamic languages. To illustrate these ideas we will convert a JavaScript application which uses manual Dependency Injection into one using Automatic Dependency Injection Framework.


Demonstrate the value and feasibility of Automatic Dependency Injection Frameworks in duck type languages.


Start with a simple JavaScript application and through a series of refactorings introduce a dependency injection framework.

Audience: Researchers, Practitioners, Educators
Please email any questions to . This e-mail address is being protected from spambots. You need JavaScript enabled to view it