Numerous business logic services within my program need access to a common set of non-business logic services, such as email, printing, messaging (message boxes and prompts), and logging. I am planning on creating a facade to encapsulate EmailService, PrintService, MessageService, and LogService so that each business logic service just needs one constructor parameter to the facade class, instead of four parameters to each of the services.
So instead of
public BusinessLogicService(IEmailService emailService, IPrintService printService, IMessageService messageService, ILogService logService)
{
this.EmailService = emailService;
this.LogService = logService;
this.MessageService = messageService;
this.PrintService = printService;
}
I'll have this
public BusinessLogicService(ISomeFacade facade)
{
this.SomeFacade = facade;
}
My questions are:
Is this the correct usage of the facade pattern? If not, how should I be doing this?
I assume that having a standard set of services that are needed by a lot of business services is pretty common, so is there a standard naming convention for this sort of facade that encapsulates EmailService, PrintingService, MessagingService, LoggingService, and possibly some other non-business logic services that I need in the future?