From the course: C#: Design Patterns Part 1

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Class adapter vs. object adapter

Challenge: Class adapter vs. object adapter - Python Tutorial

From the course: C#: Design Patterns Part 1

Start my 1-month free trial

Challenge: Class adapter vs. object adapter

(upbeat music) - [Instructor] Now that we've seen both the class and object variants of the adapter pattern, we can compare them in one more way. The challenge is to convert the H+ Sport's order item view model we've just created from using the object adapter pattern to using the class adapter pattern. Once you do this, think about how this changes the way that the adaption happens and what additional flexibility or inflexibility you now have in the applications architecture. What would it mean if the whole application use this pattern for view models? What's easier or more complicated with the class adapter pattern over the object adapter pattern?

Contents