All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Design pattern, strategy pattern, observer pattern, adapter pattern, model–view–controller?

Also known as: design pattern · strategy pattern · observer pattern · adapter pattern · model--view--controller

Definition 30.4 University Computer Science — Year 3 · Chapter 30 — Software Engineering: Design, Testing and Maintenance

A design pattern is a named, reusable solution to a design problem that recurs in a context, described by its problem, its structure and its consequences. The strategy pattern puts each variant of an algorithm behind one interface, so that the variant can be chosen at run time. The observer pattern lets objects register with a subject, which notifies each of them of its changes without knowing what they are. The adapter pattern wraps an object so that it offers the interface that a client expects. Model–view–controller (MVC) divides an interactive program into the model, which holds the data and the rules, the view, which presents them, and the controller, which turns the user’s input into operations on the model.

Read in context →