Skip to content
Snippets Groups Projects
Commit 1bdeaae3 authored by W. Spencer Smith's avatar W. Spencer Smith
Browse files

Revisions for L36.

parent c565dcfa
No related branches found
No related tags found
No related merge requests found
Lectures/Figures/500px-AdapterPatternForWiki.jpg

18.6 KiB

Lectures/Figures/AdapterPattern4.gif

2.83 KiB

Lectures/Figures/Proxy_pattern_diagram.png

14.5 KiB

Lectures/Figures/factory_pattern_uml_diagram.jpg

18.7 KiB

No preview for this file type
......@@ -226,6 +226,25 @@ doing it the same way.''
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Strategy Design Pattern}
\bi
\item From \href{https://sourcemaking.com/design_patterns/strategy}{Source
Making web-page}
\item Define a family of algorithms, encapsulate each one, and make them
interchangeable.
\item Strategy lets the algorithm vary independently from the clients that use
it.
\item Capture the abstraction in an interface, bury implementation details in
derived classes.
\item \structure{Where have we used this pattern?}
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{UML Diagram of Measurable Interface}
......@@ -308,13 +327,22 @@ inefficient; in other cases it may be unsafe. This inefficiency or insecurity i
mechanisms, which should be kept separate from both the client and the component to which it needs access.
\item Solution: The client communicates with a representative rather than the component itself. This representative, the
\structure{proxy}, also does and pre- and postprocessing that is needed.
\item \href{https://en.wikipedia.org/wiki/Proxy_pattern}{Code}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{UML Diagram of Proxy}
\includegraphics[scale=0.5]{../Figures/Proxy_pattern_diagram.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Command Processor Pattern}
......@@ -348,5 +376,34 @@ so on. The actual execution of the command is delegated to a supplier component
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter Design Pattern}
\structure{When have we used the adapter (or wrapper) design pattern?}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Adapter Design Pattern}
\includegraphics[scale=0.7]{../Figures/500px-AdapterPatternForWiki.jpg}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Factory Pattern}
\includegraphics[scale=0.55]{../Figures/factory_pattern_uml_diagram.jpg}
\href{https://www.tutorialspoint.com/design_pattern/factory_pattern.htm}{Code}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment