In the development of a software solution, either for an enterprise or a much smaller group of end users, there are generally two schools of thought on how to proceed. You could plan and develop a solution completely from scratch, relying on your project team’s understanding and innovative design abilities to solve all issues that arise from your development effort. Alternatively, you could make use of a design pattern that gives you a templateto follow towards designing a complete solution that solves different issues for different situations as they arise. That is the idea behind design patterns. They are not complete solutions themselves that can be magically turned into code. But, they can be used as templates for solving development problems by using the fundamentals behind object-oriented design which define and use the relationships between classes and objects themselves, keeping them general enough to be reused over and over. As you can imagine, because they are generic, there are plenty of design patterns that exist. They range from the simple to the complex and each has its own pros and cons when deciding which to use in your development project. What follows is a compare and contrast of a sampling of the variety of design patterns in existence. Adapter Design Pattern
The first design pattern we will explore is the Adapter pattern, also known as the wrapper pattern. Generally speaking, the adapter design pattern converts one interface for a class or object into another, separate but compatible interface. This allows classes that would normally be autonomous of each, due to incompatibility to work together by supplying a specific interface to the end user, while still making use of the original interface as well. The adapter does the conversion between the two interfaces, and also converts the data that gets used in the forms needed within the overall solution. The adapter design pattern works like a bridge between to vastly different interfaces,...
Please join StudyMode to read the full document