<?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: Baedyl</title>
    <description>The latest articles on DEV Community by Baedyl (@baedyl).</description>
    <link>https://dev.to/baedyl</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%2F65046%2F21f6b7f0-ba16-4a33-a851-5927d5421dc9.JPG</url>
      <title>DEV Community: Baedyl</title>
      <link>https://dev.to/baedyl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baedyl"/>
    <language>en</language>
    <item>
      <title>Communicating between browser tabs</title>
      <dc:creator>Baedyl</dc:creator>
      <pubDate>Thu, 27 May 2021 15:12:59 +0000</pubDate>
      <link>https://dev.to/baedyl/share-data-between-browser-tabs-4hil</link>
      <guid>https://dev.to/baedyl/share-data-between-browser-tabs-4hil</guid>
      <description>&lt;p&gt;I recently came across the issue of sharing some data between different tabs of the same web application. Using OAuth to retrieve an external provider's API key, saving it and finally displaying it on our platform. The first solution implied reloading the entire page. But the user experience was heavily compromised. In a SPA point of vue, imagine being in /process/emailing/... and redirected to /process 😕&lt;/p&gt;

&lt;p&gt;While looking for a more suitable solution, I came across the Broadcast Channel API.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. Messages are broadcasted via a message event fired at all BroadcastChannel objects listening to the channel.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's start by creating a broadcast channel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const channel = new BroadcastChannel('oauth')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we specified the name &lt;em&gt;oauth&lt;/em&gt; that will later be used in other parts of our app to listen on any message sent through this channel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;channel.postMessage(data)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we send a message and, we can pass any object we like. In our case, we just needed an indication to know a certain task was done so the content did not really matter, feel free to pass useful data according to your need.&lt;/p&gt;

&lt;p&gt;The data sent can be any of those supported values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All primitive types, excluding symbols&lt;/li&gt;
&lt;li&gt;Arrays&lt;/li&gt;
&lt;li&gt;Object literals&lt;/li&gt;
&lt;li&gt;String, Date, RegExp objects&lt;/li&gt;
&lt;li&gt;Blob, File, FileList objects&lt;/li&gt;
&lt;li&gt;ArrayBuffer, ArrayBufferView objects&lt;/li&gt;
&lt;li&gt;FormData objects&lt;/li&gt;
&lt;li&gt;ImageData objects&lt;/li&gt;
&lt;li&gt;Map and Set objects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we need to listen to the same channel in other parts of our app. To do so, we create a channel with the same name and use the &lt;strong&gt;onmessage&lt;/strong&gt; event handler&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const channel = new BroadcastChannel('oauth')
channel.onmessage = (e) =&amp;gt; {
  // Business logic here
  // data sent through the channel is available at e.data
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! We successfully sent data from a different window, tab or frame to another 😀.&lt;/p&gt;

&lt;p&gt;Finally, to make a channel stop receiving messages you can close it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;channel.close()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can achieve the same result using the SharedWorker API or even Local Storage but, personally I found this method the most intuitive. Do you know any other alternative ?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>vue</category>
    </item>
    <item>
      <title>The version control tool your team deserve</title>
      <dc:creator>Baedyl</dc:creator>
      <pubDate>Wed, 15 Apr 2020 18:11:00 +0000</pubDate>
      <link>https://dev.to/baedyl/the-version-control-tool-your-team-deserve-3da0</link>
      <guid>https://dev.to/baedyl/the-version-control-tool-your-team-deserve-3da0</guid>
      <description>&lt;p&gt;Since there are many solutions for us to choose out there, We will focus primary on the two most popular of them known as &lt;strong&gt;GitLab&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;How many of us actually thought that these two platforms were related? Honestly... They share many things in common, starting with the fact that they are both version control manager tools. But, each one of them offers a set of specific features that make them stand out from the rest.&lt;br&gt;
One of these  platforms (&lt;strong&gt;GitHub&lt;/strong&gt;) has recently granted some of its premium features for free. Cool, right? But how does this new bundle compares to a robust existing solution such as &lt;strong&gt;GitLab&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;The main goal of this article is to give you enough insight to be able to make a choice for yourself/team that will suit your needs.&lt;br&gt;
If you go over to &lt;a href="https://github.com/pricing"&gt;https://github.com/pricing&lt;/a&gt; you will see a range of plans and features available in each one of them. Let's take a closer look at the free plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unlimited public/private repositories&lt;/li&gt;
&lt;li&gt;Unlimited collaborators&lt;/li&gt;
&lt;li&gt;2,000 Actions minutes/month Free for public repositories&lt;/li&gt;
&lt;li&gt;500MB of GitHub Packages storage Free for public repositories&lt;/li&gt;
&lt;li&gt;Community Support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you scroll further down you will see a bunch of other features. Some of them include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protected branches&lt;/li&gt;
&lt;li&gt;Code owners&lt;/li&gt;
&lt;li&gt;Multiple pull requests assignees&lt;/li&gt;
&lt;li&gt;Repository insights&lt;/li&gt;
&lt;li&gt;Required reviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But pay attention, as some of them are only available on public repositories. And if privacy is one of your (or team) concerns, then these might not be as much appealing as they seem. Otherwise, if keeping the code public is not an issue for you (or team), then you could profit of a lot of features without spending a penny.&lt;/p&gt;

&lt;p&gt;For Gitlab pricing and features, go over at: &lt;a href="https://about.gitlab.com/pricing/"&gt;https://about.gitlab.com/pricing/&lt;/a&gt; &lt;br&gt;
There you will automatically realize that besides offering the same common features seen previously in the free plan, you also get a large choice of other useful tools such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for multiple kubernetes clusters&lt;/li&gt;
&lt;li&gt;Export issues in .csv files&lt;/li&gt;
&lt;li&gt;Java, npm, .NET, and other repositories to make it easier to publish packages&lt;/li&gt;
&lt;li&gt;Preview your changes with review apps&lt;/li&gt;
&lt;li&gt;And more...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will not define the term &lt;em&gt;DevOps&lt;/em&gt; here, but &lt;strong&gt;GitLab&lt;/strong&gt; also offers a set of useful &lt;em&gt;DevOps&lt;/em&gt; tools that can make your (team) software development cycle a lot easier and more transparent. These tools include but are not limited to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*DevOps* score&lt;/li&gt;
&lt;li&gt;Auto *DevOps*&lt;/li&gt;
&lt;li&gt;Performance testing&lt;/li&gt;
&lt;li&gt;Cluster monitoring&lt;/li&gt;
&lt;li&gt;Logging&lt;/li&gt;
&lt;li&gt;Audit management accross *DevOps* Lifecycle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although these features are not necessarily all included in the free plan, if you are willing to spend a few bucks to improve your (team's) workflow, &lt;strong&gt;GitLab&lt;/strong&gt; is the platform you want to turn to since, these last features are not available on GitHub.&lt;br&gt;
We will not go over the details of the entreprise plans. But they offer more flexibility and support. If you know another exciting version control manager tool that offers any feature not listed here, feel free to add it down!&lt;/p&gt;

</description>
      <category>review</category>
      <category>git</category>
      <category>github</category>
      <category>gitlab</category>
    </item>
  </channel>
</rss>
