Adapter design pattern for beginners.
Background – Think about a situation where a Chinese person has to communicate to an Indian person. Where Chinese person doesn’t speak Hindi, and Indian person doesn’t speak Chinese. I know you already knew the solution :). Find a third person who understand Chinese, and Hindi both, and translate both ways so that they can communicate. Congratulations! If you understand above mentioned small concept, you know, adapter design pattern as well. This design pattern had come from the hardware industry. Look at the below mentioned diagram - You must have seen many hardware adapters in your life. India's electronic boards designed for round pins, but not in the US. So if you have purchased your laptop from the US, you will have a different charge pin. Like mentioned in the above diagram. You need an adapter. When homogeneous systems talks to each other. We need adapters to make the compatible connections/communication. In software, we have different OS, languag...