<?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: Kaleb McKinney</title>
    <description>The latest articles on DEV Community by Kaleb McKinney (@mckkaleb).</description>
    <link>https://dev.to/mckkaleb</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%2F156107%2F629731fa-6281-4bf4-ab35-a41ac402251b.png</url>
      <title>DEV Community: Kaleb McKinney</title>
      <link>https://dev.to/mckkaleb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mckkaleb"/>
    <language>en</language>
    <item>
      <title>Maybe transpiled(to JS) languages are good?</title>
      <dc:creator>Kaleb McKinney</dc:creator>
      <pubDate>Thu, 09 Dec 2021 00:24:52 +0000</pubDate>
      <link>https://dev.to/mckkaleb/maybe-transpiledto-js-languages-are-good-3mp0</link>
      <guid>https://dev.to/mckkaleb/maybe-transpiledto-js-languages-are-good-3mp0</guid>
      <description>&lt;p&gt;This may not be the most sensational topic these days, as front end webdev has largely moved to JS frameworks and/or TypeScript, but I think it's an interesting topic to explore. Why so? The heyday of these kinds of projects seemed to be about a decade ago. I think of this kind of like the same as what Node is, but in reverse. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is Node so popular?&lt;/strong&gt; &lt;br&gt;
Node gets a lot of support because it's JavaScript. It makes sense; front end devs who need to write a backend are familiar with JS, so if they can write their backend in JS too, there's no need to familiarize with another programming language. Similar to projects like Flutter, why write native code for every platform, when you could use one codebase (or programming language in this analogy)? &lt;/p&gt;

&lt;p&gt;Now, I &lt;em&gt;can&lt;/em&gt; write JavaScript reasonably well, but I'm more of a backend dev who also does front end stuff. So, I'm basically the ideal Node user, but in reverse. Wouldn't it be great, then, if I could use another programming language I already use and enjoy for front end projects? This is possible, of course, however support isn't great for most languages (including my beloved Dart since there's no framework to use anymore :/). &lt;/p&gt;

&lt;p&gt;The advent of WebAssembly brought this concept back in a way. The idea that you could use any language for client-side projects is very appealing, but wasm isn't necessary for it to work. Transpiled languages are just as good (maybe better for most applications) since the outputted JS is almost always faster than if you had written the code in JavaScript yourself, and it just requires less work. &lt;/p&gt;

&lt;p&gt;A future where it's just as easy or normal to use a programming language like Dart, Kotlin, Scala, .NET, etc., (and of course JS as well) isn't that hard to accomplish, or far away if it gets support. It would be fantastic for front end development to be as diverse as the backend (and the rest of the software sphere for the matter), not just because choice-which is great in itself-, but also it could bring in more people who are at the moment hesitant to try out the webdev world because they don't want to have to learn JavaScript.&lt;/p&gt;

&lt;p&gt;So, there's my thoughts on the matter, it'd be nice to hear you have to say as well down in the discussion. See you there!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Be a software developer with an associate's degree?</title>
      <dc:creator>Kaleb McKinney</dc:creator>
      <pubDate>Thu, 04 Jun 2020 00:13:15 +0000</pubDate>
      <link>https://dev.to/mckkaleb/be-a-software-developer-with-an-associate-s-degree-4k6b</link>
      <guid>https://dev.to/mckkaleb/be-a-software-developer-with-an-associate-s-degree-4k6b</guid>
      <description>&lt;p&gt;While I'm still in high school, I'm looking ahead as to what I'm going to to.&lt;/p&gt;

&lt;p&gt;Because of the TN Promise program, and some scholarships, I can get an associate's degree for just about free. Local community colleges offer an AAS Programming degree. Has anyone gone this route? How did it go? Would you recommend it? Also, if you're the one hiring, would you consider someone with an AAS? &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
    </item>
    <item>
      <title>First impressions with Alpine.js</title>
      <dc:creator>Kaleb McKinney</dc:creator>
      <pubDate>Sun, 29 Mar 2020 00:44:42 +0000</pubDate>
      <link>https://dev.to/mckkaleb/first-impressions-with-alpine-js-30pb</link>
      <guid>https://dev.to/mckkaleb/first-impressions-with-alpine-js-30pb</guid>
      <description>&lt;p&gt;If you can't get behind the big JavaScript frameworks or like using tools with a philosophy similar to &lt;a href="https://tailwindcss.com/"&gt;Tailwind&lt;/a&gt;, then you may find interest in &lt;a href="https://github.com/alpinejs/alpine/"&gt;Alpine.js&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Apline.js?
&lt;/h3&gt;

&lt;p&gt;Alpine.js is, as described on their GitHub repo, a rugged, minimal framework for composing JavaScript behavior in your markup. In other words, Apline offers reactive and declarative functionality of the big frameworks in a smaller package. &lt;/p&gt;

&lt;p&gt;Alpine doesn't offer &lt;i&gt;everything&lt;/i&gt;, however it offers the in-HTML features of the big frameworks. There is no built-in component engine like with Vue or Angular. There is no router. It's a &lt;i&gt;minimalist&lt;/i&gt; framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's look at some code!
&lt;/h3&gt;

&lt;p&gt;Alpine is heavily influenced by Vue, so if you know basic Vue.js, then Alpine will be immediately familiar to you.&lt;/p&gt;

&lt;h5&gt;
  
  
  Dropdown
&lt;/h5&gt;

&lt;p&gt;Here's how you could implement a drop down menu with Alpine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;x-data=&lt;/span&gt;&lt;span class="s"&gt;"{ open: false }"&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="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"open = true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open Dropdown&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt;
        &lt;span class="na"&gt;x-show=&lt;/span&gt;&lt;span class="s"&gt;"open"&lt;/span&gt;
        &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click.away=&lt;/span&gt;&lt;span class="s"&gt;"open = false"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Dropdown Body
    &lt;span class="nt"&gt;&amp;lt;/ul&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;Let's examine this to understand how this works.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;div&lt;/code&gt; element, you'll notice the &lt;code&gt;x-data&lt;/code&gt; attribute. The &lt;code&gt;x-data&lt;/code&gt; attribute is similar to the &lt;code&gt;data&lt;/code&gt; property in Vue. It takes a JavaScript object. &lt;code&gt;x-data&lt;/code&gt; is available to all elements within the &lt;code&gt;div&lt;/code&gt;. In this case, there is a property called &lt;code&gt;open&lt;/code&gt;, which is set to &lt;code&gt;false&lt;/code&gt; by default. &lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;button&lt;/code&gt; you'll see the &lt;code&gt;@click&lt;/code&gt; attribute. This works the same as in Vue. This can also be written as &lt;code&gt;x-on:click&lt;/code&gt;. It's pretty simple, when the button is clicked, it will execute the expression given. So, when the button is clicked, it resets the value &lt;code&gt;open&lt;/code&gt; from &lt;code&gt;x-data&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Finally, in the &lt;code&gt;ul&lt;/code&gt;, when have two attributes to cover. First, &lt;code&gt;x-show&lt;/code&gt;. &lt;code&gt;x-show&lt;/code&gt; receives an expression. In this case, it's just &lt;code&gt;open&lt;/code&gt;. If &lt;code&gt;open&lt;/code&gt; resolves to &lt;code&gt;true&lt;/code&gt;, then it will show, if &lt;code&gt;false&lt;/code&gt;, it won't. Second, &lt;code&gt;@click.away&lt;/code&gt; (also written as &lt;code&gt;x-on:click.away&lt;/code&gt;). Also very simple. If/when the mouse clicks outsude of the &lt;code&gt;ul&lt;/code&gt;, it executes the expression. In this case, it sets &lt;code&gt;open&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt;, in turn, closing the dropdown.&lt;/p&gt;

&lt;p&gt;You'll notice that there is no JavaScript. That is because Alpine initializes itself.&lt;/p&gt;

&lt;h4&gt;
  
  
  Using JavaScript
&lt;/h4&gt;

&lt;p&gt;For more complex tasks, we won't want to be writing our JavaScript in our HTML. So let's take a look at our previous example again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;x-data=&lt;/span&gt;&lt;span class="s"&gt;"{ open: false }"&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="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"open = true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open Dropdown&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt;
        &lt;span class="na"&gt;x-show=&lt;/span&gt;&lt;span class="s"&gt;"open"&lt;/span&gt;
        &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click.away=&lt;/span&gt;&lt;span class="s"&gt;"open = false"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Dropdown Body
    &lt;span class="nt"&gt;&amp;lt;/ul&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;Instead of having everything in our HTML, we can move things into our JavaScript. For example, we can move our &lt;code&gt;x-data&lt;/code&gt; into a function in a JavaScript file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;x-data=&lt;/span&gt;&lt;span class="s"&gt;"dropdownData()"&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="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"open()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Open Dropdown&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;ul&lt;/span&gt;
        &lt;span class="na"&gt;x-show=&lt;/span&gt;&lt;span class="s"&gt;"isOpen()"&lt;/span&gt;
        &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click.away=&lt;/span&gt;&lt;span class="s"&gt;"close()"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Dropdown Body
    &lt;span class="nt"&gt;&amp;lt;/ul&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;dropdownData&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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="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="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nx"&gt;close&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;open&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nx"&gt;isOpen&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&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="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;true&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;p&gt;In this situation, it's not very practical, but you can see how it can be done.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Apline.js is a simple, useful JavaScript framework that gives you the basics. &lt;i&gt;Just what you need, nothing you don't&lt;/i&gt;. For a large project, you would probably appreciate the extra utility of the big frameworks. But maybe all you want is a simple, no-nonsense, small framework for your project. That's where Alpine comes in. &lt;/p&gt;

&lt;p&gt;If you want to read the docs for Alpine, head over to their &lt;a href="https://github.com/alpinejs/alpine/"&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>JavaScript Frameworks: My Thoughts</title>
      <dc:creator>Kaleb McKinney</dc:creator>
      <pubDate>Sat, 28 Dec 2019 02:55:20 +0000</pubDate>
      <link>https://dev.to/mckkaleb/javascript-frameworks-my-thoughts-dd5</link>
      <guid>https://dev.to/mckkaleb/javascript-frameworks-my-thoughts-dd5</guid>
      <description>&lt;p&gt;JavaScript frameworks are all the rage these days, but an increasing number of developers, including myself, aren't so fond of them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why?
&lt;/h4&gt;

&lt;p&gt;For me, it's because they add so much complexity for what I see as a minimal gain. Frameworks like React and Angular allow you to create reusable components in your web project, but at the same time, completely take over your front-end. This might not necessarily be a bad thing, it could be a good thing if that's the way you like to develop, but for me, I don't like it.&lt;/p&gt;

&lt;p&gt;I'm not opposed to the idea of reusable components, I just think they should fit in to your project, not define it. This is where framework-agnostic web components come in. They can be used with any framework, or none at all.&lt;/p&gt;

&lt;p&gt;In my opinion, that's the way it should be. I use a tool like &lt;a href="https://lit-element.polymer-project.org/"&gt;Lit-Element&lt;/a&gt; to make web components that work regardless of what other tools I decide to use or not use.&lt;/p&gt;

&lt;p&gt;That seems like a "dream situation" to me. I can still leverage web components while not having to use a full-featured framework if I don't want to. And if you feel differently about it, write your thoughts in the comments if you feel inclined, I'd like to see what you have to say!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>angular</category>
      <category>react</category>
    </item>
  </channel>
</rss>
