Is it bad practice to name classes after the façade pattern?
public class OrderFacade {}
public class InvoiceFacade {}
public class ThingFacade {} ...
These classes do follow the Façade pattern.
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.
Sign up to join this communityIs it bad practice to name classes after the façade pattern?
public class OrderFacade {}
public class InvoiceFacade {}
public class ThingFacade {} ...
These classes do follow the Façade pattern.
I would name them based on what the facade does for consumers, or what it needs to "look like" to the outside world. The fact that it is a facade is an implementation-detail.
So instead of, say, BillingSystemFacade
, I'd present it as a BillingService
. Heck, perhaps someday I can get rid of whatever clunky API is behind it, and rewrite it from scratch, but the consumers don't need to know whether it is/isn't a facade, only what it promises to do for them.