#815 Dependency between services?

ivan Fri 13 Nov 2009

I think it could be great if it will be possible to explicitly declare dependencies between services (for instance by setting field Type[] dependsOn in constructor). I've searched through discussion but couldn't find anything similar.

brian Fri 13 Nov 2009

I sort of thing that is more of a documentation thing.

If anything I would think the best way to capture it is as a facet versus an API.

freddy33 Sat 14 Nov 2009

Facet is the way to go. I'll really like to see if it's possible to implement the getter (and sometimes setter) depending on the facet value? This will provide clean lazy loading and DI for Fan.

brian Sat 14 Nov 2009

By getter/setter are you thinking something like this:

class MyService : Service
{
  @inject SqlService sql
}

freddy33 Sat 14 Nov 2009

Yep, exactly :)

brian Sun 15 Nov 2009

Yeah that be nice - I'll have to give that some thought to where something like would work into the architecture.

Login or Signup to reply.