views:

44

answers:

1

I have terminology/modeling question about representing components in a service. Consider..

Scenario A:

ICatalogService --exposes--> PublishingManager.Publish

ICatalogService --exposes--> RetrievalManager.Retrieve

Scenario B:

ICatalogService --exposes--> CatalogManager.Publish

ICatalogService --exposes--> CatalogManager.Retrieve

Does ICatalogService in Scenario A represent a "facade" as it implements more than 1 component? Is some other terminology appropriate?

For the purist, is there any advantages to separating the "publishing" and "retrieval" managers (AKA: controller) if they're managing the same types of objects?, OR would you use a single "CatalogManager"?

+1  A: 

The idea of a facade is that it hides complexity behind a simplifying interface. The fact that in scenario A you're explicitly exposing PublishingManager & RetrievalManager doesn't appear to fit that definition (difficult to be definitive without knowing more about your code).

To your second question. I'm assuming the two services are complementary and used to enable connection between publishers and retrievers. If that's true, then a couple of thoughts:

  1. I'd be comfortable putting both in the same service as the fundamental purpose is to create connections between publishers & retrievers
  2. Assuming I understand right, this looks like the publish/subscribe pattern. Might be worth having a look at that. Also consider using "Subscribe" instead of "Retrieve" as it should be more familiar.
sfinnie