<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John Baldwin on Medium]]></title>
        <description><![CDATA[Stories by John Baldwin on Medium]]></description>
        <link>https://medium.com/@johnbaldwin?source=rss-5b4335445a2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zDDkzzywCsip0EQB.</url>
            <title>Stories by John Baldwin on Medium</title>
            <link>https://medium.com/@johnbaldwin?source=rss-5b4335445a2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 05:12:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@johnbaldwin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Get on the Event Bus: Vue.js]]></title>
            <link>https://medium.com/@johnbaldwin/get-on-the-event-bus-vue-js-abcf63d7342d?source=rss-5b4335445a2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/abcf63d7342d</guid>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[John Baldwin]]></dc:creator>
            <pubDate>Thu, 20 Jun 2019 18:49:11 GMT</pubDate>
            <atom:updated>2019-09-09T16:23:40.944Z</atom:updated>
            <content:encoded><![CDATA[<p>Getting on the event bus bandwagon may sound like a bad idea, you can look up articles with Event Bus in the title and easily find articles that conjure up scary phrases like “anti-pattern” and “avoid at all costs”. Vue.js comes with a built in Event Bus system that really can work wonders if you need to communicate pieces of data across an entire application of uncoupled components.</p><p>That’s not to say that there aren’t pitfalls — but all of JavaScript is kind of akin to Indiana Jones running through the temple dodging arrows, gigantic rolling stones, and spike filled pits, right? A few of the disadvantages to note are that you really never know which component is sending the event, since they are sent through the channel. Also, anyone can emit events over that channel without restriction.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FCILY0mbLgM8ak%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FCILY0mbLgM8ak%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FCILY0mbLgM8ak%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b3d064565f4379b13d9ff11946b3367/href">https://medium.com/media/1b3d064565f4379b13d9ff11946b3367/href</a></iframe><p>You can read other articles to further your understanding of life cycles, async data, etc. This article is designed to get you up and running using the awesome abilities of Vue’s Event Bus system.</p><p>To start, let’s imagine we have a component, that has some sort of data (in this case a click counter). We want to trigger an emit event in the component that can be utilized globally throughout our app — with no dependency of parent/child state of the components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*En5-Gu-YgbgpVIXciNZ6KA.png" /><figcaption>A component in need of a bus (for demonstration purposes, a very simple example).</figcaption></figure><p>Next up — we need to create the EventBus. This is as simple as creating a new Vue instance which will magically give access to Vue’s internal event bus system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*B1SZjxDkLr-dJtcOILVMnA.png" /><figcaption>EventBus.js (could be housed in any folder you choose, I tend to organize this as a plugin/global component).</figcaption></figure><p>After that strenuous coding task — we can implement the EventBus in our ComponentToEmitEvent component. To do that we will import our EventBus and then handle the emit event inside of the click handler in the component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*tJmsDKIxDmVUVLnz8Lweqw.png" /><figcaption>Changes to the ComponentToEmitEvent.vue component. Imported the EventBus and utilized a global channel to send the event (in this case the click counter data) over the airwaves for other components to subscribe to.</figcaption></figure><p>So right now, we have an EventBus that is ready to ride, and a component that is ready to get on… we just need a destination. The beauty of the EventBus is that it doesn’t really matter where we are going. Let’s imagine up some completely unrelated portion of the application that needs access to our super important highly time sensitive click count data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*n-w7cKUNmZ2JIANs4fJIlA.png" /><figcaption>This component uses the EventBus to get the number of clicks sent on the ‘global-channel-for-event’.</figcaption></figure><p>And just like that we have completed the pipeline. By importing the EventBus into our component using EventBus.$on(...),our unrelated component (and you can tell by the component name that it is completely unrelated!) is now hooked into the channel &#39;global-channel-for-event&#39;and ready to spend its days on the couch watching the clicks go by, ready to tell anyone who will listen how many it has seen.</p><p>A few key notes for the road before you grab the wheel of the EventBus and strike out on your own to learn more about this pretty neat Vue ability.</p><blockquote>If you only want to listen to a single emission of an event, then you can pass once in place of on during the EventBus subscription… like so —</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3vw2Fi9vfS6ZO06NukT8Bg.png" /></figure><blockquote>If you wish to stop listening after a certain point you could use —</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5aFvW18GRr7-rIBExcbTg.png" /></figure><blockquote>EventBus could have more than one channel, unlike the TV in the 50’s. If you wish to unsubscribe to all channels from the EventBus you can use EventBus.$off() without passing any arguments.</blockquote><h3>About Me</h3><p>I work for <a href="https://orangebees.com/">Orange Bees</a>, an enterprise software engineering company in Greenville, SC, as a Frontend Software Engineer. I am experienced with Angular, React, and Vue.js.<br>You can find me on <a href="https://www.linkedin.com/in/john-baldwin-iii-41339b99/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abcf63d7342d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple, it is not always Easy…]]></title>
            <link>https://medium.com/@johnbaldwin/simple-it-is-not-always-easy-12bab67c94af?source=rss-5b4335445a2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/12bab67c94af</guid>
            <dc:creator><![CDATA[John Baldwin]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 01:28:20 GMT</pubDate>
            <atom:updated>2017-01-20T01:28:20.615Z</atom:updated>
            <content:encoded><![CDATA[<p>My take on Rich Hickey’s presentation: <a href="https://www.infoq.com/presentations/Simple-Made-Easy">https://www.infoq.com/presentations/Simple-Made-Easy</a></p><p>Simple, is not always Easy… and Easy is not always simple… but it is important to consider their meaning and their implications when applying thought process, planning, and implementation into our programming, or even our every day lives.</p><p>Simple — as I am sure has been restated in numerous blogs, forums, and other various writings — is derived from the Latin word Simplex, meaning one fold. Understanding this meaning is critical to our understanding of effective coding and programming.</p><p>Conversely, Complex — also Latin, holds a meaning related to being “hard” or “torturous”, “folded”, so to speak. Complexity is important to understand because of it’s opposition to simple and how both terms play off of each other in a give and take relationship.</p><p>One might think that “Easy” is directly related to simple. Looking at the root definition “to lie near”, you can see almost the ability to substitute easy with lazy. Something being simple can be extremely complex and difficult to make. Whereas ”Easy“ is almost a ‘use it and forget it’ attitude that takes away from the real value and genius of good planning, work, and long term sustainability of an idea, product, or program.</p><p>In programming it’s important to remember that hard work, diligent planning, simplification of what you are trying to accomplish into small pieces of code that can be reused will yield incredible results. Approaching programming from the easy mindset might just achieve the opposite.</p><p>At the end of day, it takes complex thought and understanding to design simple code that serves a wide variety of purpose, with the ability to do so in the minimalistic sense. Looking at the why, how, who, what, when, and where of the programs intentions and planning for these by using the most simple and untangled attempts of wrangling pure data will serve to create the best programs.</p><p>I thoroughly enjoyed Rich’s speech and hope that you will check it out too for inspiration — for there is much more to be said on the subject!</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12bab67c94af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Day of the CSS Slides…]]></title>
            <link>https://medium.com/@johnbaldwin/the-day-of-the-css-slides-66d4c2bab440?source=rss-5b4335445a2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/66d4c2bab440</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[John Baldwin]]></dc:creator>
            <pubDate>Wed, 11 Jan 2017 03:38:16 GMT</pubDate>
            <atom:updated>2017-01-11T03:38:16.322Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Once upon a time in a small room on the fourth floor of a banking building, there was class filled with coders who possessed great determination to learn CSS… on one particular day, they were required to recant the day’s lessons via a group of 19 slides they reviewed. One particular student, who jubilantly was still celebrating a miraculous Clemson National Championship victory from the night before, was on a mission to become the best coder he could be. One of the very amazing things that he took away from the day’s lesson was that using the new CSS column options — stemming from an incredible failure, he figured out that you can create numerous columns within an element, or consisting of multiple elements. However, when selecting multiple elements, these elements will wrap or become disjointed if the column height is not big enough to encompass each of the different elements. He decided he would further investigate to find out different was this could be handled — and found that flexbox might be the answer! But flexbox happened to be a little ahead of his ability at the time. It was a great discovery of enhanced knowledge for the future!</blockquote><p>codepen.io/jbaldwin3/post/a-miraculous-failure-and-discovery</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66d4c2bab440" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Day of the CSS slides…]]></title>
            <link>https://medium.com/@johnbaldwin/the-day-of-the-css-slides-9df473acd2db?source=rss-5b4335445a2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9df473acd2db</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[John Baldwin]]></dc:creator>
            <pubDate>Tue, 10 Jan 2017 19:09:25 GMT</pubDate>
            <atom:updated>2017-01-11T03:33:19.133Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Once upon a time in a small room on the fourth floor of a banking building, there was class filled with coders who possessed great determination to learn CSS… on one particular day, they were required to recant the day’s lessons via a group of 19 slides they reviewed. One particular student, who jubilantly was still celebrating a miraculous Clemson National Championship victory from the night before, was on a mission to become the best coder he could be. One of the very amazing things that he took away from the day’s lesson was that using the new CSS column options — stemming from an incredible failure, he figured out that you can create numerous columns within an element, or consisting of multiple elements. However, when selecting multiple elements, these elements will wrap or become disjointed if the column height is not big enough to encompass each of the different elements. He decided he would further investigate to find out different was this could be handled — and found that flexbox might be the answer! But flexbox happened to be a little ahead of his ability at the time. It was a great discovery of enhanced knowledge for the future!</blockquote><p>codepen.io/jbaldwin3/post/a-miraculous-failure-and-discovery</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9df473acd2db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>