Author: limpbizkit
Date: Sun Jun 21 19:23:05 2009
New Revision: 1027
Modified:
wiki/Motivation.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/Motivation.wiki
==============================================================================
--- wiki/Motivation.wiki (original)
+++ wiki/Motivation.wiki Sun Jun 21 19:23:05 2009
@@ -173,7 +173,7 @@
}}}
Now, whenever we add or remove dependencies, the compiler will remind us
what tests need to be fixed. The dependency is *exposed in the API
signature*.
-Unfortunately, now the clients of `BillingService` need to lookup its
dependencies. We can fix some of these by applying the pattern again!
Classes that depend on it can accept a `BillingService` in their
constructor. For top-level classes, it's useful to have a framework.
Otherwise you'll need you construct dependencies recursively when you need
to use a service:
+Unfortunately, now the clients of `BillingService` need to lookup its
dependencies. We can fix some of these by applying the pattern again!
Classes that depend on it can accept a `BillingService` in their
constructor. For top-level classes, it's useful to have a framework.
Otherwise you'll need to construct dependencies recursively when you need
to use a service:
{{{
public static void main(String[] args) {
CreditCardProcessor processor = new PaypalCreditCardProcessor();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---