<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Design Patterns on CS446/CS646/ECE452 S26</title><link>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/</link><description>Recent content in Design Patterns on CS446/CS646/ECE452 S26</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/index.xml" rel="self" type="application/rss+xml"/><item><title>Structural Patterns</title><link>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/structural/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/structural/</guid><description>&lt;h1 id="structural-design-patterns"&gt;
 Structural Design Patterns
 &lt;a class="anchor" href="#structural-design-patterns"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Structural patterns concern the composition of classes and objects into larger structures.
They help ensure that when parts of a system change, the overall structure remains flexible and efficient.&lt;/p&gt;
&lt;h2 id="adapter"&gt;
 Adapter
 &lt;a class="anchor" href="#adapter"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation&lt;/strong&gt;: We need to use an existing class whose interface is incompatible with what our code expects, and we cannot (or do not want to) modify that class (e.g., because it lives in a third-party library).&lt;/p&gt;</description></item><item><title>Behavioral Patterns</title><link>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/behavioral/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/behavioral/</guid><description>&lt;h1 id="behavioral-design-patterns"&gt;
 Behavioral Design Patterns
 &lt;a class="anchor" href="#behavioral-design-patterns"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Behavioral patterns concern the interaction and communication between objects.
They help distribute responsibilities among objects and define how they collaborate to carry out complex tasks.&lt;/p&gt;
&lt;h2 id="observer"&gt;
 Observer
 &lt;a class="anchor" href="#observer"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation&lt;/strong&gt;: When a system is partitioned into cooperating classes, a common need is to keep related objects in sync&amp;mdash;when one object changes state, others that depend on it should be notified.
The Observer design pattern implements the &lt;a href="../..//architectural-styles/implicit-invocation/"&gt;Implicit Invocation&lt;/a&gt; architectural style.&lt;/p&gt;</description></item><item><title>Creational Patterns</title><link>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/creational/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://lanortha.github.io/CS446-S26/docs/lectures/design-patterns/creational/</guid><description>&lt;h1 id="creational-design-patterns"&gt;
 Creational Design Patterns
 &lt;a class="anchor" href="#creational-design-patterns"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Creational patterns concern the process of object creation.
They help make a system independent of how its objects are created, composed, and represented.&lt;/p&gt;
&lt;h2 id="singleton"&gt;
 Singleton
 &lt;a class="anchor" href="#singleton"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Motivation&lt;/strong&gt;: Some classes must have exactly one instance (e.g., a file system, a database connection pool, a window manager).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Intent&lt;/strong&gt;: Ensure a class has only one instance and provide a global point of access to it.&lt;/p&gt;
&lt;p&gt;&lt;img src="singleton.png" alt="Singleton class diagram" /&gt;&lt;/p&gt;</description></item></channel></rss>