• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WebObjects and dependency injection (DI)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebObjects and dependency injection (DI)


  • Subject: Re: WebObjects and dependency injection (DI)
  • From: Andrus Adamchik <email@hidden>
  • Date: Tue, 22 Sep 2009 12:20:25 +0300


On Sep 22, 2009, at 11:31 AM, Andrus Adamchik wrote:

We normally use Class.forName().newInstance() in some way or other to handle that. So can DI help me there? If yes, how?

Also there's a number of standard scenarios, where you can swap the actual service implementation behind the immutable injected interface proxy for a short period of time (e.g. within a request thread). A backend service may have request object injected in it, and when a service method is called within the request scope, the right request object is dynamically bound to the interface proxy. (Of course WORequest is not an interface, so it will require more indirection in WO).


In the same way you can bind your own request-scoped implementations of your custom services somewhere in the beginning of the request. And this transparently sets the execution context for all you other services and components.

Andrus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >WebObjects and dependency injection (DI) (From: Andrus Adamchik <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Henrique Prange <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Andrus Adamchik <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Anjo Krank <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Andrus Adamchik <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Anjo Krank <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Andrew Lindesay <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Anjo Krank <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Henrique Prange <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Anjo Krank <email@hidden>)
 >Re: WebObjects and dependency injection (DI) (From: Andrus Adamchik <email@hidden>)

  • Prev by Date: Re: Recommendations for deployment on VPS?
  • Next by Date: Re: Very interesting case
  • Previous by thread: Re: WebObjects and dependency injection (DI)
  • Next by thread: Re: WebObjects and dependency injection (DI)
  • Index(es):
    • Date
    • Thread