<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Philipp Nowinski 🎸</title>
    <description>The latest articles on DEV Community by Philipp Nowinski 🎸 (@pnodev).</description>
    <link>https://dev.to/pnodev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F197289%2Fd46d85f8-414e-46b7-86df-d357a6f2d7ad.jpg</url>
      <title>DEV Community: Philipp Nowinski 🎸</title>
      <link>https://dev.to/pnodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pnodev"/>
    <language>en</language>
    <item>
      <title>Don't use the 'all' keyword in CSS transitions</title>
      <dc:creator>Philipp Nowinski 🎸</dc:creator>
      <pubDate>Tue, 23 Jul 2019 08:28:41 +0000</pubDate>
      <link>https://dev.to/pnodev/don-t-use-the-all-keyword-in-css-transitions-5eic</link>
      <guid>https://dev.to/pnodev/don-t-use-the-all-keyword-in-css-transitions-5eic</guid>
      <description>&lt;p&gt;CSS animations and transitions are great. They give us the power to spice up web experiences and help to make them feel more 'alive'. However, at the same time, animations and transitions can make a web experience far worse, when done the wrong way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beware of 'junk' from bad performing animations
&lt;/h2&gt;

&lt;p&gt;If you do just a bit of research, you will quickly notice, that you have to be very careful about which CSS properties you should animate and which you should not. To understand why you need to have a basic understanding of how the rendering process in the browser works.&lt;/p&gt;

&lt;p&gt;There are three phases that are important for us: &lt;em&gt;Layout&lt;/em&gt;, &lt;em&gt;Paint&lt;/em&gt;, and &lt;em&gt;Composite&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layout
&lt;/h3&gt;

&lt;p&gt;In the layout phase, the browser is pretty much figuring out which elements will go where, considering their widths and heights, as well as margins, paddings, borders, positioning and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paint
&lt;/h3&gt;

&lt;p&gt;In the paint phase, the browser starts filling in pixels. It basically means bringing every visual part of an element onto the screen. This involves things like text, colors, images, borders, box-shadows, etc. Typically, the painting is done onto multiple 'layers', which will be important for the next step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Composite
&lt;/h3&gt;

&lt;p&gt;At this time, we already have visual elements painted onto various layers. In this last step, all layers need to be drawn to the screen in the correct order. The order is important to make sure that elements that overlap each other, have the correct element sitting on top.&lt;/p&gt;

&lt;p&gt;We don't have to get into this too much, but what you should keep in mind is, that during a transition, the browser has to calculate stuff repeatedly to update what is on the screen.&lt;/p&gt;

&lt;p&gt;Now, depending on which properties you change during your animation, this might involve more or less work. Imagine you would do the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="m"&gt;.3s&lt;/span&gt; &lt;span class="n"&gt;ease-out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you were to change the width of that box, this would effect all of its surrounding elements as well. E.g. the box in the following example would be pushed to the side by the growing box, which would in turn trigger other elements to reposition as well. If we go back to the three phases we discussed, you will quickly realize that the browser has to recalculate the layout for every step of the animation, followed by the other two phases. This is quite a lot work and the main reason why badly done animations can cause a lot of junk on the page.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/kaesetoast/embed/jgWVzy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Change properties that trigger the least amount of work
&lt;/h2&gt;

&lt;p&gt;There is an excellent website that lists for each css property which phase when it gets change: &lt;a href="https://csstriggers.com"&gt;https://csstriggers.com&lt;/a&gt;. I highly recommend checking it out. There are a few properties that will always be safe to use and the most performant animations try to stick to those: &lt;code&gt;opacity&lt;/code&gt; and &lt;code&gt;transform&lt;/code&gt;. Whenever I do animations or transitions, I try to translate whatever effect I want to achieve back to those two properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid unwanted side-effects
&lt;/h2&gt;

&lt;p&gt;Being aware of the junk that might get caused by transitioning the wrong set of properties, you might get an idea of why I consider the usage of the &lt;code&gt;all&lt;/code&gt; keyword a bad practice. Sure, you can set &lt;code&gt;transition: all .3s ease-out;&lt;/code&gt; and still have a well-performing animation if you make sure to only change &lt;code&gt;opacity&lt;/code&gt; and &lt;code&gt;transform&lt;/code&gt;, but there is a good chance that someone else is going to change a property along the way, without knowing that this will trigger an animation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be explicit about what your code does
&lt;/h2&gt;

&lt;p&gt;Another aspect that you should consider when writing animations and transitions is maintainability. I encountered a lot of legacy codebases that made heavy use of the &lt;code&gt;all&lt;/code&gt; keyword, probably because it was easier to write. But changing this back to a more explicit transition can be very frustrating if you don't exactly know what the author wanted to achieve. You have to examine the animation to find out which properties actually do change and which do not. Writing transitions and animations only for explicit keywords, will not only prevent unwanted junk but also help others (and yourself in the future) to understand your code more easily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the computer yell at you
&lt;/h2&gt;

&lt;p&gt;I always like to put rules like that into my build-process or have them integrated into my text editor. I'd rather have the computer yelling at me at the moment I write bad code than my co-workers (or most likely myself) in a year. If you are using stylelint for checking your CSS, here is a neat little rule that will do exactly that: &lt;a href="https://github.com/kristerkari/stylelint-high-performance-animation"&gt;https://github.com/kristerkari/stylelint-high-performance-animation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>performance</category>
      <category>animations</category>
    </item>
    <item>
      <title>A simple pattern for creating JavaScript UI modules</title>
      <dc:creator>Philipp Nowinski 🎸</dc:creator>
      <pubDate>Thu, 18 Jul 2019 09:51:44 +0000</pubDate>
      <link>https://dev.to/pnodev/a-simple-pattern-for-creating-javascript-ui-modules-o9f</link>
      <guid>https://dev.to/pnodev/a-simple-pattern-for-creating-javascript-ui-modules-o9f</guid>
      <description>&lt;p&gt;During the last 6 years or so, I spent a lot of time writing small JavaScript modules to control UI components. The kind of elements you would find on most modern webpages, like tabs, accordions, image galleries – you name it.&lt;/p&gt;

&lt;p&gt;A common mistake I've seen (and made myself) over and over again, is the weak handling of DOM references in your component's JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  One object to rule them all – or: let there be chaos
&lt;/h2&gt;

&lt;p&gt;This is a pattern I found in lots of legacy codebases I got handed during my last job (and again, I'm also guilty of writing code like this in the past). Consider the following markup for a simple UI element, like an accordion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"m-accoridon-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion__header"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion-header-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion__toggle"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;data-toggle=&lt;/span&gt;&lt;span class="s"&gt;"collapse"&lt;/span&gt; &lt;span class="na"&gt;data-target=&lt;/span&gt;&lt;span class="s"&gt;"#accordion-panel-1"&lt;/span&gt; &lt;span class="na"&gt;aria-expanded=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;aria-controls=&lt;/span&gt;&lt;span class="s"&gt;"accordion-panel-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            First item
        &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"accordion-panel-1"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion__panel"&lt;/span&gt; &lt;span class="na"&gt;aria-labelledby=&lt;/span&gt;&lt;span class="s"&gt;"m-accordion-header-1"&lt;/span&gt; &lt;span class="na"&gt;data-parent=&lt;/span&gt;&lt;span class="s"&gt;"#m-accoridon-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!--    some accorion content    --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, as you can see, there are a few elements here we need references to. We need at least references to the accordion toggles (to add click-event-listeners) and the associated panels (to show or hide them on click). Here is one approach to handle this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toggles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.m-accordion__header&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;panels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.m-accordion__panel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;toggles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toggle&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;openPanel&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In this approach, we store all toggles and panels on the page in a constant. This works well in a reduced use case. Let's say we have multiple instances of this element on the same page. The code would still work, but things are already harder to keep track of.&lt;/p&gt;

&lt;p&gt;So, let's add another level of complexity. Let's say we want to set different options for the accordion via data-attributes. Now you have to keep track of all &lt;code&gt;.m-accordion&lt;/code&gt; elements, store their different option sets, and even worse: map all of those options to the toggles and panels.&lt;/p&gt;

&lt;p&gt;This gets out of hand very quickly. So let's try to find a better approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  One module per element
&lt;/h2&gt;

&lt;p&gt;Modules are a great way to bring order into this kind of chaos. Let's try to organize our code in a way that one instance of a module is responsible for one instance of an element only.&lt;/p&gt;

&lt;p&gt;The main cause of pain in the first example was that for each interaction (user clicks on a toggle), we needed to figure out which accordion the user was interacting with. So let's try to abstract that away. Ideally, we don't even want to be bothered with the possibility that there are other instances on the same page.&lt;/p&gt;

&lt;p&gt;First, let's move our code into a class. If you are familiar with languages like PHP or Java, this will already be second nature for you (paradoxically though, I've seen especially developers with a strong focus on these languages struggling with applying the same paradigm to JavaScript).&lt;/p&gt;

&lt;p&gt;The idea is simple: we will have on instance of the class for every element on the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Accordion&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_root&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_root&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_root&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_toggles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_root&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.m-accordion__header&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_panels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_root&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.m-accordion__panel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_setupEventListeners&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;_setupEventListeners&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_toggles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toggle&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;open&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// instantiation of all accordion elements&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;accordionElements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.m-accordion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;accordionElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accordionElement&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Accordion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accordionElement&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So, what exactly did we do here?&lt;/p&gt;

&lt;p&gt;Let's focus on the second part first. We use &lt;code&gt;document.querySelectorAll&lt;/code&gt; to fetch every accordion container-element from the current page. So this gives us a &lt;code&gt;NodeList&lt;/code&gt; containing all DOMNodes that are accordion-containers. We then iterate over those elements, instantiate a new &lt;code&gt;Accordion&lt;/code&gt; class instance and pass the accordion-container as an argument.&lt;/p&gt;

&lt;p&gt;Then, in the class itself, we receive this element as &lt;code&gt;_root&lt;/code&gt; in the constructor and save it as a class-variable &lt;code&gt;this._root&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;And that's it. From now on, we will never have to refer to &lt;code&gt;document&lt;/code&gt; inside our class again to fetch elements that are part of the accordion. Every time we need to grab a part of our component, we can just fire &lt;code&gt;querySelector&lt;/code&gt; on &lt;code&gt;this._root&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This essentially means that all queries inside our component are scoped now. At this point, we don't have to think about other accordion instances on the same page anymore. There is no way that two instances of the accordion interfere with each other, as long as we don't break out of this scope. If we want to fetch the aforementioned configuration options now, we just grab them from &lt;code&gt;this._root&lt;/code&gt; and be done with it.&lt;/p&gt;

&lt;p&gt;Thinking in this kind of model makes writing UI code a lot easier and helps to keep an overview of all the moving parts of your website. It definitely helped me a bunch over the years.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ui</category>
      <category>patterns</category>
      <category>modules</category>
    </item>
  </channel>
</rss>
