You're about to create your best presentation ever

Green Factory Powerpoint Template

Create your presentation by reusing a template from our community or transition your PowerPoint deck into a visually compelling Prezi presentation.

Template and Factory Integration

Transcript: -Convert the interface of one class so that it can be used by another. -Adding/changing classes behind the adapter with the same interface is easy. If the interface is different you have to re-write your adapter. Strength: Decouples implementation from rest of code. Changes to the class behind the adapter are contained. Weakness: Adapter is specific to the class it is adapting. Changes to the class mean the adapter has to also be changed. Template Basic Template UML Integrating the Template and Adapter Design Patterns Questions? When using a template pattern, we define our procedures and the methods we need to carry them out. Doing this means we often need to provide adapters between the methods that define our general steps and the objects that are implementing them. Template and Adapter Patterns Adapter The template pattern's use as a framework makes it the perfect place to use wrapper patterns like the adapter. The use of an adapter allows you to use a greater variety of classes to perform the procedure that the template outlines. -Defers the implementation of methods to subclasses.-Used when you want to have different implementations of similar steps/procedures. Adapter Template -Adding new classes to the template is simple, as you simply inherit the template interface. -New classes do not have to also be adapters. -Interface is difficult to change as you must make changes to all of the subclasses of your template interface. Strength: Provide a framework for common tasks or processes. Weakness: When the task or process a template implements changes, all of it's concrete classes must also be changed. Template with Adapters Conclusion The integration of the template and adapter remains as easy to test as either of the patterns individually. 1. Test the classes being adapted. 2. Test the template. Strengths - Only need to test the methods the adapter uses in the class it is adapting. Weakness -Either have to do the testing inside the template class or expose more methods than necessary. Maintenance Testing

Now you can make any subject more engaging and memorable