Titanium application example using dependency injection