The Concierge Antipattern
A concierge can be invaluable in a hotel. Here’s an extract from the Wikipedia definition of concierge:
“In hotels, a concierge assists guests with various tasks like making restaurant reservations, arranging for spa services, procurement of tickets to special events and assisting with various travel arrangements and tours of interesting places to visit. In upscale establishments, a concierge is often expected to ‘achieve the impossible,’ dealing with any request a guest may have, no matter how apocryphal or strange, relying on an extensive list of personal contacts with various local merchants and service providers.”
What does this have to do with software design? Well, I’ve seen a similar solution applied in software design -and I thought I’d note my thoughts on what I’ve seen.
The Concierge Framework
The Concierge Framework will simplify your application development by providing you with all the services you need. Which sounds great. But there are some drawbacks. Firstly, remember how the hotel concierge relies on “an extensive list of personal contacts”? The Concierge Framework does, too. In the case of a framework, this usually means a load of dependencies. So, when you decide to use a newer version of your favourite logging framework, you can expect the Concierge Framework to get upset. Secondly, the Concierge will often have a particular way of accomplishing tasks – which will constrain what you can do. So, if you want to do things differently you’ll need to write it yourself or hack the framework.
How do you know you’re using a Concierge Framework? Often you’ll find that all the layers of your application need to be dependent on the Framework (and on all of its dependencies.) You’ll also find that some simple tasks become absurdly difficult. An occasional side effect of using a Concierge Framework is an obscene amount of configuration. Put simply, if you feel that the framework in question is being too helpful, it’s probably an instance of a Concierge Framework.
The Concierge Framework may be a misunderstanding of the Façade pattern. It goes beyond the scope of the Façade pattern by trying to provide a simplified interface to too much – and that’s clearly an (unstable) abstraction too far.
Does this antipattern resonate with your experience?