<?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: EDDYMENS</title>
    <description>The latest articles on DEV Community by EDDYMENS (@eddymens).</description>
    <link>https://dev.to/eddymens</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%2F921%2FkuiG2WFm.jpg</url>
      <title>DEV Community: EDDYMENS</title>
      <link>https://dev.to/eddymens</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eddymens"/>
    <language>en</language>
    <item>
      <title>I leant something new trying to build a Github profile analytics tool</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Sat, 06 Nov 2021 10:33:10 +0000</pubDate>
      <link>https://dev.to/eddymens/i-leant-something-new-trying-to-build-a-github-profile-analytics-tool-1mge</link>
      <guid>https://dev.to/eddymens/i-leant-something-new-trying-to-build-a-github-profile-analytics-tool-1mge</guid>
      <description>&lt;p&gt;So last night an interesting idea popped into my head, a simple solution to help you track who visited your Github profile. I began thinking of an approach and finally settled on &lt;strong&gt;&lt;a href="https://codingterms.com/term/pixel-tracking"&gt;pixel tracking&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;which means I will give you an image tag to embed in your GitHub profile &lt;strong&gt;README.md&lt;/strong&gt; ie: &lt;code&gt;&amp;lt;img src="https://4d0a552c1c8e02.lhr.domains/" width="0" height="0"/&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With this when someone lands on your page and their browser tries to get the image from my server I will collect all their browser info and use it to provide you analytics, so their IP helps me know their location,  &lt;strong&gt;&lt;a href="https://codingterms.com/term/user-agent"&gt;user agent&lt;/a&gt;&lt;/strong&gt; to get their device details, language, (Ethics aside for now :)) etc.&lt;/p&gt;

&lt;p&gt;Also since the width and height of the image is set to 0 they won't even see that it's there, very straightforward.&lt;/p&gt;

&lt;p&gt;This morning I decided to test this out on my &lt;a href="https://github.com/EDDYMENS/EDDYMENS/commit/0849a8f109fc76c5445b38d0491e245f1a187882"&gt;own profile&lt;/a&gt; and I learned something interesting I never thought of.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QGca0JsB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/8077713/140604485-6058c4cf-0db5-488c-b3b8-9f8d2116a9ad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QGca0JsB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/8077713/140604485-6058c4cf-0db5-488c-b3b8-9f8d2116a9ad.png" alt="server-log" width="880" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above is what I got back, &lt;code&gt;github-camo&lt;/code&gt; is what was sent back as the &lt;strong&gt;&lt;a href="https://codingterms.com/term/user-agent"&gt;user agent&lt;/a&gt;&lt;/strong&gt;. so I googled it.  It turns out to be a &lt;strong&gt;&lt;a href="https://codingterms.com/term/proxy-server"&gt;proxy server&lt;/a&gt;&lt;/strong&gt; setup by Github, &lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls"&gt;https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So basically the URL I used is masked by GitHub so I can't get info from the visitor's browser. So even the IP I get back is the one from GitHub's server and not the visitor.&lt;/p&gt;

&lt;p&gt;I knew Gmail has this kind of implementation to prevent pixel tracking but I always thought Github, Twitter, etc masked URLs using domains like &lt;strong&gt;githubusercontent.com&lt;/strong&gt; just for CDN purposes, I never thought it was more than just that.&lt;/p&gt;

&lt;p&gt;I am keeping this in mind for future work I will be doing that involves allowing people to embed or share URLs. &lt;/p&gt;

&lt;p&gt;But on the real, though Github should give us profile analytics just like they do with repos. :) &lt;/p&gt;

</description>
      <category>github</category>
      <category>proxy</category>
      <category>tracking</category>
    </item>
    <item>
      <title>No time to learn a static site generator? Try this</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Thu, 30 Sep 2021 16:01:56 +0000</pubDate>
      <link>https://dev.to/eddymens/no-time-to-learn-a-static-site-generator-try-this-2355</link>
      <guid>https://dev.to/eddymens/no-time-to-learn-a-static-site-generator-try-this-2355</guid>
      <description>&lt;h3&gt;
  
  
  What is a Static Site Generator(SSG)?
&lt;/h3&gt;

&lt;p&gt;Traditionally we built sites supported by a backend that takes data and spreads it onto an HTML template.&lt;br&gt;
 Backends also took care of the differences between rendered pages.&lt;br&gt;
This setup is what we refer to as a dynamically rendered site.&lt;/p&gt;

&lt;p&gt;For many sites, this approach meant each time a user visited the website, the backend did the same thing repeatedly. &lt;br&gt;
So the idea of a static site generator is to mix the data/content with the HTML templates once and then keep a copy of the output to be served to users.&lt;/p&gt;

&lt;p&gt;With this approach, you have a faster website. You also remove the overhead of maintaining the backend code in production, leaving you with a basic server setup to manage. &lt;/p&gt;

&lt;p&gt;You may also give up the server setup altogether to use any of the numerous static site hosting solutions out there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges static site generators present to developers
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Frandombyte%2Fimage%2Fupload%2Fv1633014848%2Fbusiness-man-pushing-large-stone-up-to-hill-business-heavy-tasks-and-picture-id825383494_gnphts.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Frandombyte%2Fimage%2Fupload%2Fv1633014848%2Fbusiness-man-pushing-large-stone-up-to-hill-business-heavy-tasks-and-picture-id825383494_gnphts.jpg"&gt;&lt;/a&gt;&lt;br&gt;
&lt;small&gt;Credit: &lt;a href="https://www.istockphoto.com/photo/business-man-pushing-large-stone-up-to-hill-business-heavy-tasks-and-problems-concept-gm825383494-133865749" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Do note that there are general cons to having static sites. I am not going to talk about those.&lt;br&gt;
I am addressing the cons static site generators themselves present.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They come with a learning curve, and it’s made worse given there are too many static site generators out there. This means you are likely to hop on a project using one you are not familiar with.&lt;/li&gt;
&lt;li&gt;Limited functionalities, developers are limited to what a static site generator provides. Do you want a specific date format? Your best bet is a plugin, and pray it exists.&lt;/li&gt;
&lt;li&gt;The authoring process is a nightmare for non-developers, from dealing with markdown files to sometimes dealing with build pipelines. It’s even becoming a requirement for hiring content creators in some cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What’s the alternative?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Frandombyte%2Fimage%2Fupload%2Fv1633015519%2Fcarbon_lfiffb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Frandombyte%2Fimage%2Fupload%2Fv1633015519%2Fcarbon_lfiffb.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just build your site in whatever framework you are comfortable with, Laravel, Express, whatever. &lt;br&gt;
Then use a tool like &lt;a href="https://www.gnu.org/software/wget" rel="noopener noreferrer"&gt;&lt;code&gt;wget&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://www.httrack.com" rel="noopener noreferrer"&gt;HTTrack&lt;/a&gt; to generate the static files.&lt;/p&gt;

&lt;p&gt;You might benefit from using SSGs, but I think this approach remains a good starting point.&lt;/p&gt;

&lt;p&gt;With this approach, you can build a complete website with a backend admin that anyone can use.&lt;br&gt;
Also, it will be based on a web stack you are familiar with or that your team is already using. You can build out whatever feature set you will need as well.&lt;/p&gt;

&lt;p&gt;The image above shows the exact command I run to generate my site, you can find the explanation of each parameter &lt;a href="https://explainshell.com/explain?cmd=wget+-mpEk+-nH++-P+output_folder+http%3A%2F%2F%3Clocalhost%3A8080" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
For example, I am currently working on &lt;a href="https://codingterms.com/" rel="noopener noreferrer"&gt;https://codingterms.com/&lt;/a&gt;, and it’s running as a laravel app locally.  I run &lt;code&gt;wget&lt;/code&gt; when I am ready to publish.&lt;/p&gt;

&lt;p&gt;As far as feature sets go, I have many of them. One example is my ability to create hyperlinks pointing to other pages. The system checks if the page exists before making them visible as links on the other page. This way, I don’t have to go through older articles to change links. &lt;/p&gt;

&lt;p&gt;I am using &lt;code&gt;wget&lt;/code&gt; for my personal website &lt;a href="https://eddymens.com" rel="noopener noreferrer"&gt;https://eddymens.com&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;Another approach is using a CMS then generate the static files for production. When dealing with plugins, you need to be aware that this might not translate well to static site land, which is a general characteristic of static sites anyway.&lt;/p&gt;

&lt;p&gt;Also, this allows you to move away from static sites to dynamic sites in a snap because you already have a dynamic site on hand.&lt;/p&gt;

&lt;p&gt;I am still on the lookout for the gotchas of this approach and will share more as I progress. &lt;/p&gt;

&lt;p&gt;Originally posted on &lt;a href="https://www.eddymens.com/blog/no-time-to-learn-a-static-site-generator-try-this" rel="noopener noreferrer"&gt;Eddymens Personal Site&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ssg</category>
      <category>staticsitegenerator</category>
      <category>website</category>
      <category>staticsite</category>
    </item>
    <item>
      <title>Trimming the fat off Bootstrap 4</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Sun, 13 Dec 2020 00:33:10 +0000</pubDate>
      <link>https://dev.to/eddymens/trimming-the-fat-off-bootstrap-4-1nod</link>
      <guid>https://dev.to/eddymens/trimming-the-fat-off-bootstrap-4-1nod</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xfOkWGR4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8s538izuq0jh50k690ia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xfOkWGR4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8s538izuq0jh50k690ia.png" alt="Bootstrap-cover-image" width="880" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bootstrap is a very useful CSS framework in the sense that it makes designing a website easy by providing a lot out of the box.&lt;/p&gt;

&lt;p&gt;It provides a lot from typography to Modal. Applying a style to your HTML is simply done by adding a bootstrap class to the element in question. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Adding bootstrap to a project&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Content Delivery Network (CDN)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h8_fZ_cU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98wpdx94me62awdgj8gl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h8_fZ_cU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98wpdx94me62awdgj8gl.png" alt="Bootstra-CDN" width="880" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The easiest and quickest way to add bootstrap to a project is through a CDN. Which is basically loading bootstrap into your project using a URL that loads up a copy of the bootstrap CSS file, You can also load accompanying dependencies in the same way if you need any of them. Bootstrap provides a minified copy which reduces the number of bytes transferred over the network.   &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local copy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You may also just make a copy of the bootstrap files and add it to your project. This is also a very straight forward approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Package Managers (NPM/Bower/Composer)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ka3TTJ76--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e111tyf7yab0nsq6okr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ka3TTJ76--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e111tyf7yab0nsq6okr0.png" alt="Bootstrap-package-manager-image" width="394" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Popular package managers like NPM and Composer allow you to pull in bootstrap like any other dependency in your project. Now at this point, I should also mention that you can also have Bootstrap CSS in different formats other than plain old CSS i.e.: Sass or Less, Bootstrap has moved away from Less onto Sass. In the next section, I will explain why and how the Bootstrap source is managed using Sass and how that can help you shave some bytes off Bootstrap when you ship to production.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Trimming the fat with Sass&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2r1-YzjK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x6stciugey7p2udk7dgz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2r1-YzjK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x6stciugey7p2udk7dgz.png" alt="Bootstrap-imports-image" width="736" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sass-lang.com/"&gt;Sass&lt;/a&gt; as defined on the website is a CSS extension language, This means Sass is a superset of CSS so every CSS syntax is valid in Sass. Sass adds a host of things to CSS which makes writing and managing CSS source code a joy and it's likely for this reason the Bootstrap source is now in Sass. I should also mention that in the end your Sass source code is transpiled to plain old CSS to be used in the browser.&lt;/p&gt;

&lt;p&gt;One of the features is the ability to split parts of your CSS files into components. Bootstrap is set up in this way, You have Bootstrap components such as modals, tables, grids all in different Sass files.&lt;/p&gt;

&lt;p&gt;So you can import only the parts of bootstrap you need into your project leaving out parts you don't need. Thus if you have no need for modals you don't have to import it. This leaves you with a smaller bootstrap CSS file to add to your project, &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Setting it all up&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Be sure to have &lt;a href="https://nodejs.org/en/"&gt;NodeJs&lt;/a&gt; and &lt;a href="https://www.npmjs.com/get-npm"&gt;NPM&lt;/a&gt; installed.&lt;/li&gt;
&lt;li&gt;Next, install Sass globally from the command line using &lt;code&gt;$ npm install -g sass&lt;/code&gt;. You will find other ways to install &lt;a href="https://sass-lang.com/install"&gt;Sass here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$ npm install bootstrap&lt;/code&gt; will install the latest version of Bootstrap in the node_modules folder.&lt;/li&gt;
&lt;li&gt;You will need to create a file for your Bootstrap imports and any CSS you will like to add. It can be whatever name but should have the extension &lt;code&gt;.scss&lt;/code&gt; eg: &lt;code&gt;app.scss&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In the scss file navigate and import all the bootstrap Sass files you will like to use. You can find the list of available and also required Bootstrap files you need to import &lt;a href="https://getbootstrap.com/docs/4.0/getting-started/theming"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;To get back a CSS file you can use in your project run the Sass compiler &lt;code&gt;$ sass app.scss &amp;gt; app.css&lt;/code&gt; now you can call &lt;code&gt;app.css&lt;/code&gt; in your project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pair this up with minification and GZIP over the network and you already improve the speed of your website.  &lt;/p&gt;

</description>
      <category>bootstrap</category>
      <category>sass</category>
      <category>css</category>
    </item>
    <item>
      <title>Getting your Windows files and folders to behave as on Linux</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Mon, 11 May 2020 16:20:58 +0000</pubDate>
      <link>https://dev.to/eddymens/getting-your-windows-files-and-folders-to-behave-as-on-linux-8bm</link>
      <guid>https://dev.to/eddymens/getting-your-windows-files-and-folders-to-behave-as-on-linux-8bm</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ck4SAl_y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jl0lr4x7n0wb9f143pqa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ck4SAl_y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jl0lr4x7n0wb9f143pqa.jpg" alt="Windows,Linux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will make this brief.&lt;/p&gt;

&lt;p&gt;If you write software on a Windows machine but then usually deploy on a Linux server you probably have run into the trouble of your software breaking because of the difference in the way both OS handles file names and the issue with referencing the wrong case of the name in your code.&lt;/p&gt;

&lt;p&gt;Basically you can get away with calling on &lt;code&gt;index.js&lt;/code&gt; as &lt;code&gt;Index.js&lt;/code&gt; on Windows but not on Linux. &lt;/p&gt;

&lt;p&gt;To get your directories and files to behave on Windows as they would on Linux. &lt;br&gt;
Open PowerShell navigate into your project directory and run the following script.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ enable}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;This will enable case sensitivity for when you reference a name of a file/folder in your code or if namespacing depends on file and folder names like in PHP. &lt;/p&gt;

&lt;p&gt;This way if you mix up the case of your file you won't be forgiven even on Windows because Linux won't either.&lt;br&gt;
I got this script on Stackoverflow but I am still looking for the source.&lt;br&gt;
I will add that bit when I find it.&lt;br&gt;
I kept the above script in a Gist for when I need it and felt I should share it.&lt;br&gt;
The End...&lt;/p&gt;

</description>
      <category>linux</category>
      <category>subsystem</category>
      <category>windows10</category>
      <category>bash</category>
    </item>
    <item>
      <title>Laravel file driven cache on steroids</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Sat, 18 Apr 2020 14:26:37 +0000</pubDate>
      <link>https://dev.to/eddymens/laravel-file-driven-cache-on-steroids-1f8d</link>
      <guid>https://dev.to/eddymens/laravel-file-driven-cache-on-steroids-1f8d</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AEcKZ2qRhp1zRzgqc" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AEcKZ2qRhp1zRzgqc"&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@toineprojects?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;toine G&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As of Laravel 7, there are 6 available cache drivers, with APC giving the best results and the file driver being the only one that requires no extra setup.&lt;/p&gt;

&lt;p&gt;I was speaking to a friend last night, who mentioned they used Redis as their cache driver. At this point, I have a project that still uses the file driver.&lt;/p&gt;

&lt;p&gt;I was thinking I could use some of that sweet performance of memory-driven cache but I really don’t want to install Redis at this time. Right then a solution hit me, something I knew but not really used.  &lt;strong&gt;“tmpfs”.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mount -t tmpfs -o size=12m tmpfs storage/framework/cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What does it do&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AdUHfLTNDw4OIJHUq" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AdUHfLTNDw4OIJHUq"&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@liam_1?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Liam Briese&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;tmpfs:&lt;/strong&gt; Allows you to store files in RAM by acting as a directory.&lt;/p&gt;

&lt;p&gt;Running the above on a Linux server within your Laravel directory will map your &lt;strong&gt;storage/framework/cache&lt;/strong&gt; to your RAM, which means you enjoy the drop in latency of your cached files by using the RAM as opposed to disk IO.&lt;/p&gt;

&lt;p&gt;It's a small improvement that can go a long way especially if you use cache a lot within your app.&lt;/p&gt;

&lt;p&gt;You can make sure your server switches to RAM storage on restart by putting the command below in your server's system configuration file &lt;strong&gt;/etc/fstab&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tmpfs storage/framework/cache tmpfs nodev,nosuid,noexec,nodiratime,size=12m 0 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And to revert back to Disk IO use the command below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ umount storage/framework/cache
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The End …&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>linux</category>
      <category>cache</category>
    </item>
    <item>
      <title>Leveraging affiliate programs to sell more as an indie hacker.</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Fri, 28 Feb 2020 19:43:55 +0000</pubDate>
      <link>https://dev.to/eddymens/leveraging-affiliate-programs-to-sell-more-as-an-indie-hacker-5bao</link>
      <guid>https://dev.to/eddymens/leveraging-affiliate-programs-to-sell-more-as-an-indie-hacker-5bao</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p3v83BkK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2152/1%2AjOF9WdGzYLfTz-pwmlUcTA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p3v83BkK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2152/1%2AjOF9WdGzYLfTz-pwmlUcTA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who is an indie hacker?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This I believe was coined by Courtland Allen who runs &lt;a href="https://www.indiehackers.com/"&gt;Indiehackers.com&lt;/a&gt;. So I won’t stress myself to come up with a definition, I will just quote the about section of the site.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You’re an &lt;strong&gt;indie hacker&lt;/strong&gt; if you’ve set out to make money independently. That means you’re generating revenue directly from your customers, not indirectly through an employer. Other than that, there are no requirements!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What is an affiliate program?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UahPjajS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AeiPRbUfHRtHlqCF5Q7I7Bw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UahPjajS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AeiPRbUfHRtHlqCF5Q7I7Bw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is basically a program set up to reward people known as &lt;strong&gt;affiliates&lt;/strong&gt; who bring in new customers or sales. These individuals are usually rewarded only when a sale is made. Think of it as a salesperson on commission only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why might this benefit an Indie Hacker?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QfhpV_2X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AMXmwXHPHzVk1dU_60PZmjQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QfhpV_2X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AMXmwXHPHzVk1dU_60PZmjQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As an Indie hacker, you already have a lot to do ie: product development, marketing, legal, sales, etc.&lt;/p&gt;

&lt;p&gt;Also, sales might not be your strongest skill, more soo for the many developers who decide to go the Indie hacker route. By having an affiliate program in place, you might only have to pitch to get affiliates to join the program and sell through them.&lt;/p&gt;

&lt;p&gt;This is a good strategy to boost your sales without having to be the only salesperson for your product.&lt;/p&gt;

&lt;p&gt;With that being said I believe doing the initial sales yourself and continuing to do some sales even with affiliates, is important if your product is to be loved by your users. Not only do you get to understand what your users want, but you also get to become better at selling.&lt;/p&gt;

</description>
      <category>affiliatemarketing</category>
      <category>sales</category>
      <category>indiehacker</category>
      <category>solodeveloper</category>
    </item>
    <item>
      <title>Load balancing without a load balancer</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Thu, 27 Feb 2020 17:51:26 +0000</pubDate>
      <link>https://dev.to/eddymens/load-balancing-without-a-load-balancer-26nb</link>
      <guid>https://dev.to/eddymens/load-balancing-without-a-load-balancer-26nb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bEU2LUqc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2190/1%2A_0X4z-hXatS8QLNwhqqFTg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bEU2LUqc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2190/1%2A_0X4z-hXatS8QLNwhqqFTg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is load balancing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Load balancing in web development land is a strategy used to handle high volumes of requests from users by either spreading the traffic evenly or strategically across multiple servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional Load balancing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a typical architecture with load balancing, you usually have one or more servers acting as load balancers solely dedicated to spreading traffic across the main application servers.&lt;/p&gt;

&lt;p&gt;With this approach there is a single &lt;strong&gt;point of failure&lt;/strong&gt; thus the load balancers themselves. Most teams use dedicated third-party load balancing services to improve their odds and also because sometimes they don’t have the capacity to run their own load balancers.&lt;/p&gt;

&lt;p&gt;But there are other options teams can explore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Another way&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5HYBhpoD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2082/1%2A7J4d0PSV8vRqDR0QbyUGfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5HYBhpoD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2082/1%2A7J4d0PSV8vRqDR0QbyUGfw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you happen to have a &lt;strong&gt;Single Page App&lt;/strong&gt; you might be able to explore the approach of allowing the Frontend to broadcast user requests directly to **all **the application servers, on receiving the first response returned by any of the servers you cancel, the connection to the others. You may also apply different strategies regarding how you broadcast the request. For example, you can have the right number of servers in every region based on the number of users from that region and route said users to those servers only.&lt;/p&gt;

&lt;p&gt;The good thing with this approach is that we no longer have a single point of failure since we have no central nodes or load balancers routing traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Things to note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your APIs or web app is not &lt;a href="https://restfulapi.net/statelessness/"&gt;&lt;strong&gt;stateless&lt;/strong&gt;&lt;/a&gt; having users be served by different servers can be a challenge as the user session might be known by only one server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is not a silver bullet&lt;/strong&gt; or a definite replacement for using Load balancers. This approach, for example, works best for small teams with a lot on their hands or a product that is just gaining traffic or apps that have known spike periods were having a load balancing setup might be an overkill.&lt;/p&gt;

&lt;p&gt;Also, this approach is &lt;strong&gt;deeply embedded within the architecture of your application&lt;/strong&gt; compared to using a load balancer that can be thrown in and thrown out easily, this also means it might be a challenge to tweak an existing app to go this route.&lt;/p&gt;

&lt;p&gt;Also, note for user requests that require data modification, it might not be a good idea to broadcast it to all the servers, this can lead to problems like a double purchase or multiple entries. For such requests, you might have to ping one server then the next in case the first fails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one example of ways to leverage one's coding skills to skip Ops #infracstructureAsCode&lt;/p&gt;

</description>
      <category>loadbalancing</category>
      <category>apidevelopment</category>
      <category>spa</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Be careful with HTML ID attributes</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Fri, 17 Jan 2020 12:19:04 +0000</pubDate>
      <link>https://dev.to/eddymens/be-careful-with-html-id-attributes-3mm6</link>
      <guid>https://dev.to/eddymens/be-careful-with-html-id-attributes-3mm6</guid>
      <description>&lt;p&gt;&lt;strong&gt;What are HTML attributes?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U2tDZb4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ArenvPRCHZD4zCH-UQLmaHg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U2tDZb4---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ArenvPRCHZD4zCH-UQLmaHg.png" alt="Sample HTML element"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML is made up of elements which help define the structure of a web page, Elements of the same type possess the same behavior across a web page. One way to make an element behave differently is by adding properties to them. One of the ways to add a property to an HTML element is using the attributes, for example, you can add CSS styles to elements using selector attributes like classes, ids, and names.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Working with selectors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cAWQxBo3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2572/1%2AeK9sdplMfX1iQa7CZ3amiA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cAWQxBo3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2572/1%2AeK9sdplMfX1iQa7CZ3amiA.png" alt="class and name attributes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Selectors help you target specific HTML elements, this way you can easily attach CSS styles or behaviors using Javascript. The most commonly used attributes are classes, ids, and names. Although any of these selectors can be used to add either style or behaviors.&lt;/p&gt;

&lt;p&gt;Usually, classes are used to add styles to elements simply because an element can have multiple classes and multiple elements can have the same classes, meaning you can apply multiple styles to an element as well as apply one style to different elements. Names are usually used with input elements to not only mark as the key for the data they collect and send to the server but also sometimes for applying targeted styles. More than one input can share a name, the reason being that you may have more than one form within a page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The ID attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AG3s9Gid--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3740/1%2AuURktrf-mV7I7UHXX7kCjQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AG3s9Gid--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3740/1%2AuURktrf-mV7I7UHXX7kCjQ.png" alt="Accessing input values using Id variables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ids&lt;/strong&gt;, unlike classes and names, should be assigned to only one element, its meant to serve as a unique identifier for accessing elements. But based on the specification most browsers convert &lt;strong&gt;ids&lt;/strong&gt;  into variables meaning you have access to the DOM of that particular element.&lt;/p&gt;

&lt;p&gt;Not using ids carefully could lead to polluting the javascript global scope, this might also lead to problems if your ids collide with the variable names within the global scope.&lt;/p&gt;

&lt;p&gt;Also at first glance, this might be seen as an easier way to access the DOM of any element with just the &lt;strong&gt;id&lt;/strong&gt; name without having to use query selectors. But this is a bad idea as a browser like Firefox discourages the use of this. It's much safer to just go with query selectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A simple solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qa7ca5KQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3784/1%2AXnw1qy4h10Ec7rKvTTdTRg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qa7ca5KQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3784/1%2AXnw1qy4h10Ec7rKvTTdTRg.png" alt="Using invalid variable names as Ids"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, the conversion of &lt;strong&gt;ids&lt;/strong&gt; into variables is something that is out of your control, but you can gain back that control, one way is to use invalid variable names as &lt;strong&gt;id&lt;/strong&gt; names, this way there is no way it will conflict with your variables in the global scope. But sometimes you can’t due to a naming conversation or some other reason, in which case the best option is to try to use fewer &lt;strong&gt;ids&lt;/strong&gt; &lt;strong&gt;where&lt;/strong&gt; and &lt;strong&gt;when&lt;/strong&gt; possible.&lt;/p&gt;

</description>
      <category>html</category>
      <category>ids</category>
      <category>variables</category>
    </item>
    <item>
      <title>I underestimated the responsibilities of UI/UX designers</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Tue, 12 Feb 2019 13:31:18 +0000</pubDate>
      <link>https://dev.to/eddymens/i-underestimated-the-responsibilities-of-uiux-designers-ick</link>
      <guid>https://dev.to/eddymens/i-underestimated-the-responsibilities-of-uiux-designers-ick</guid>
      <description>&lt;h1&gt;
  
  
  I underestimated the responsibilities of UI/UX designers
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2ArG56y-iee4sqUetk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2ArG56y-iee4sqUetk.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My initial views&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For long I have viewed the job of UI/UX designers as one that ensures a clean&lt;br&gt;
looking product with the best experience as possible. This is still true, but I&lt;br&gt;
have never thought about the depth of work required to get the best results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A case in point&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2A9g63vaZLEiHlnG2H" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2A9g63vaZLEiHlnG2H"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I found myself working on the API of a booking feature for an app, Most of my&lt;br&gt;
work was influenced by the mockups of the app, Unlike most bookings were you&lt;br&gt;
have pre-created slots for users to choose from, this was the kind where there&lt;br&gt;
are opening and closing times, which meant a user was allowed to pick any&lt;br&gt;
starting to closing time between the opening and closing times. This was&lt;br&gt;
represented on the mock-up as a simple time picker. For me, I just went ahead to&lt;br&gt;
create an endpoint to accept bookings, cross-checking to prevent overlaps then&lt;br&gt;
persist. From the frontend standpoint, things were not exactly ok. You see if&lt;br&gt;
the user is allowed to select their prefered times they might end up receiving&lt;br&gt;
error messages each time there are overlaps till they finally picked a free time&lt;br&gt;
range, which is not the best experience. The next best solution was to populate&lt;br&gt;
the time picker with available time slots, the challenge here is we might just&lt;br&gt;
end up with a lot of time slots to scroll through.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Ah Ah moment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2Aju_GpVsBUwluxhK4fdasXQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2Aju_GpVsBUwluxhK4fdasXQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This got me thinking, why is this not falling in place nicely, I mean as a&lt;br&gt;
developer the only time you seem to have to jump hoops is when you try to mock&lt;br&gt;
some natural world scenario, you know like calculating menstrual cycles,&lt;br&gt;
timezones etc. There was something wrong. It took a while but it hit me, This is&lt;br&gt;
not about implementation its design, This is not a problem for a time picker,&lt;br&gt;
this is one that is best solved with something like a display calendar. All&lt;br&gt;
booked times are spread and displayed on the calendar, this naturally reveals&lt;br&gt;
unbooked slots then the user can pick empty slots. Simple and clean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final thoughts and my new view&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The one thing I kept thinking about after was if I were a UI/UX designer how&lt;br&gt;
would I get this right before it gets to the implementation stage? How do I&lt;br&gt;
learn these things? Sure for something like the above case, I would spend time&lt;br&gt;
learning about available inputs and when best to use them. But what about other&lt;br&gt;
aspects of UI/UX? The only way to know the best option to go with sometimes&lt;br&gt;
depends on thinking not only through the colour scheme, the user flow but also&lt;br&gt;
aspects like &lt;strong&gt;data flow&lt;/strong&gt; and **timeliness. **The commonest form of data flow&lt;br&gt;
thought of are empty states and overflow of data(when to paginate), what about&lt;br&gt;
that long list of available time slots, how long will it take a user to find the&lt;br&gt;
perfect time to pick or how long till the server returns the entire time list on&lt;br&gt;
picking a date and how can entire process of returning a list be avoided ?&lt;br&gt;
Populating a design or mock with data reveals a lot of things that might be&lt;br&gt;
overlooked and caught only during implementation because well that's usually the&lt;br&gt;
only time you have test data going through the product. Imagine forgetting to&lt;br&gt;
add country codes to phone numbers at the design stage and only realising you&lt;br&gt;
need to add this when you get to the point of implementing SMS.&lt;/p&gt;

&lt;p&gt;As I keep thinking about it, It becomes clear to me a better UI/UX is one that&lt;br&gt;
considers the entire life of the app from development to growth. With&lt;br&gt;
considerations like happy, sad, failed, successful paths along the way. Thinking&lt;br&gt;
through the colours and product flow alone is not enough. The work of the UI/UX&lt;br&gt;
designer is one that brings the product to life through imaginations prior to&lt;br&gt;
implementation. Again this is something I have never given deep thoughts, maybe&lt;br&gt;
many already know this but me, I never thought of it.&lt;/p&gt;

</description>
      <category>ui</category>
      <category>ux</category>
    </item>
    <item>
      <title>Knowing when it's a Model or a Builder(Laravel)</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Mon, 07 Jan 2019 23:58:14 +0000</pubDate>
      <link>https://dev.to/eddymens/knowing-when-its-a-model-or-a-builderlaravel-5725</link>
      <guid>https://dev.to/eddymens/knowing-when-its-a-model-or-a-builderlaravel-5725</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@Eddy_mens?source=post_header_lockup"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n701Eqqh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/fit/c/100/100/1%2AKw-pPv-KJ73B7enK1Tg1uQ.png" alt="Go to the profile of EDDYMENS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qOuuXzac--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1600/1%2AW6qRPuUgavyUCVmFSMTVLQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qOuuXzac--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1600/1%2AW6qRPuUgavyUCVmFSMTVLQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User::where('id',1)-&amp;gt;update([])&lt;/code&gt; and &lt;code&gt;User::find(1)-&amp;gt;update([])&lt;/code&gt; do the same thing but in different ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Erhn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When working with databases in Laravel you usually find yourself either using &lt;strong&gt;Eloquent&lt;/strong&gt; or the lower level &lt;strong&gt;Fluent queries&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Eloquent provides ways to “objectice” working with databases using the Fluent queries. Simply put its a wrapper around Fluent queries with extra cheese :).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some underlying Mechanisms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Generally, everything regarding &lt;strong&gt;Fluent queries&lt;/strong&gt; can be found under the namespace &lt;code&gt;Illuminate\Database\Query\Builder&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And everything Eloquent under &lt;code&gt;Illuminate\Database\Eloquent\Model&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further into Eloquent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KaDimfIv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1600/1%2AjPhwOHbVoX8F3lzzP0eSeA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KaDimfIv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1600/1%2AjPhwOHbVoX8F3lzzP0eSeA.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;If you know you know :)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Eloquent also has many parts to it, the main point of attraction the &lt;strong&gt;Model Class,&lt;/strong&gt; Its own &lt;strong&gt;Query Builder Class&lt;/strong&gt; as well other important classes like the &lt;strong&gt;Relations&lt;/strong&gt; etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt; Now let's try and break a couple of queries down&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;User::where('id',1)&lt;/code&gt; &lt;strong&gt; :&lt;/strong&gt; This statement starts out as an eloquent model then once &lt;strong&gt;where&lt;/strong&gt; is called the returned instance is that of the eloquent builder which means you can append more query methods. &lt;strong&gt;NB:&lt;/strong&gt; The &lt;strong&gt;Eloquent&lt;/strong&gt;  &lt;strong&gt;Builder&lt;/strong&gt; extends the &lt;strong&gt;Fluent&lt;/strong&gt; Query Builder to perform its task.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User::find(1)&lt;/code&gt; &lt;strong&gt; :&lt;/strong&gt; This statement immediately returns a model instance of the record where the primary key is &lt;strong&gt;1 NB:&lt;/strong&gt; This will return an eloquent collection if multiple ids are passed to the &lt;strong&gt;find&lt;/strong&gt; method eg &lt;code&gt;find([1,2,3]&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So the first query with the &lt;strong&gt;where&lt;/strong&gt; method returns an instance of the query builder which means we can append more query builder methods as we go, and the fluent query when the called method does not exist within the eloquent builder class eg: the &lt;code&gt;join&lt;/code&gt;method.&lt;/p&gt;

&lt;p&gt;With the second query, we can append both model and query builder methods still.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NB:&lt;/strong&gt; Some methods exist in both the Builder and Model class.&lt;/p&gt;

&lt;p&gt;So as you would imagine if you have a model instance the first point of reference of the method will be from the &lt;strong&gt;Model&lt;/strong&gt; class and if not found will be looked up from the &lt;strong&gt;Query Builder.&lt;/strong&gt; More or less like method overriding in the case of inheritance. But in this case, the magic method &lt;strong&gt;__call&lt;/strong&gt; is used for this check &lt;a href="https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Model.php#L1602"&gt;https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Model.php#L1602&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And one of such methods that exist in both the &lt;strong&gt;Builder&lt;/strong&gt; and &lt;strong&gt;Model&lt;/strong&gt; is the update method.&lt;/p&gt;

&lt;p&gt;There are a few differences in the implementation of these updates with the one in the &lt;strong&gt;Model&lt;/strong&gt; returning false if the model does not exist as well as allowing the user to pass in options such as whether to set the timestamp or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is it worth noting though?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not that you might want to do this, but say for some reason you override the update method in a Model. Well, what this means is as long as you have a &lt;strong&gt;Model&lt;/strong&gt; instance say like in our example above &lt;code&gt;User::find(1)-&amp;gt;update([...]&lt;/code&gt;your overridden method will be executed.&lt;/p&gt;

&lt;p&gt;But in the case, the other kind of query is used where a &lt;strong&gt;Builder&lt;/strong&gt; is returned, your method will not run as the default update within the &lt;strong&gt;Builder&lt;/strong&gt; will be called instead.&lt;/p&gt;

&lt;p&gt;But hopefully, you don’t have to override any methods but find other cleaner ways to handle situations you might have.&lt;/p&gt;

&lt;p&gt;What I am hoping to draw to light with this post though is the usefulness of understanding how things work and how it might come handy one day :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/api/5.7/Illuminate/Database/Eloquent.html"&gt; &lt;strong&gt;Illuminate\Database\Eloquent | Laravel API&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
_Edit description_laravel.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Builder.php#L1291"&gt;https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Builder.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Model.php#L1602"&gt;https://github.com/laravel/framework/blob/5.7/src/Illuminate/Database/Eloquent/Model.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://laravel.com/docs/5.7/eloquent#updates"&gt; &lt;strong&gt;Eloquent: Getting Started - Laravel - The PHP Framework For Web Artisans&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
_Laravel - The PHP framework for web artisans._laravel.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>How I learn’t how Laravel works</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Wed, 08 Nov 2017 10:08:38 +0000</pubDate>
      <link>https://dev.to/eddymens/how-i-learnt-how-laravel-works-a5c</link>
      <guid>https://dev.to/eddymens/how-i-learnt-how-laravel-works-a5c</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--if2-QVKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AK-3j2d__EGKgzKgtHZSj4w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--if2-QVKC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AK-3j2d__EGKgzKgtHZSj4w.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the best things to happen to developers in the 21st Century is open&lt;br&gt;
source, at least for me. The power to look under the hood of some of the key&lt;br&gt;
software out there is mega. Not only do you better understand the software, you&lt;br&gt;
become a better developer by learning as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started with Laravel.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prior to Laravel I did most of my PHP projects in either Yii , CakePHP and Slim&lt;br&gt;
for my APIs. Then the Laravel hype got to me , So on my next project I decided&lt;br&gt;
to try it out and it turns out its hyped for a reason.It had some interesting&lt;br&gt;
concepts that I wanted to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning beyond the Docs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The default place to look up possible things you can do with any piece of&lt;br&gt;
software is its documentation . I must mention that Laravel has very good&lt;br&gt;
documentation . But then again the single source of truth is the Laravel code&lt;br&gt;
base. Documents are prepared based on what is present in code and the code is&lt;br&gt;
more accessible to me than the docs. So why not look up that instead :) . You&lt;br&gt;
might be thinking this is hard to do . Its very easy . Example&lt;/p&gt;

&lt;p&gt;lets say you want to work with Laravel’s collection, which is a nice way to work&lt;br&gt;
with arrays. To make a collection out of an array you first collect it eg&lt;br&gt;
&lt;code&gt;collect(["name"=&amp;gt;"joe"])&lt;/code&gt; now depending on the editor or IDE you use you should&lt;br&gt;
be able to locate where the collect method lives by placing your cursor on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NWx7K6iK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AY8wPV_BpKONfPbLv0MVAzg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NWx7K6iK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AY8wPV_BpKONfPbLv0MVAzg.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;span class="figcaption_hack"&gt;Places the collect keyword exist&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;With most IDEs pointing your cursor on the keyword and pressing down on CTRL or&lt;br&gt;
Command will show you where this keyword is implemented and sometimes places you&lt;br&gt;
have used it. With this you are able to see how this is implemented as well as&lt;br&gt;
discover other callable methods.&lt;/p&gt;

&lt;p&gt;&lt;span class="figcaption_hack"&gt;List of other callable collect methods&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;For me this is gold as at a glance I can experiment and know what more I can do&lt;br&gt;
as well as understanding how these things are implemented. This saved me one&lt;br&gt;
time where I had code for counting my collection &lt;code&gt;collect([])-&amp;gt;count()&lt;/code&gt; . Count&lt;br&gt;
is just a wrapper around the PHP &lt;code&gt;count&lt;/code&gt; function and so I knew if the&lt;br&gt;
collection ever ended up being a string I will silently get back &lt;code&gt;0&lt;/code&gt; so I&lt;br&gt;
handled that nicely as the collection count method won’t do that for me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using Tinker.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well once I get to see all the options I have for a given Concept, Class or&lt;br&gt;
Function I immediately try out these methods using tinker. Tinker is the default&lt;br&gt;
REPL which allows one to try out Laravels components without having to deal with&lt;br&gt;
views. Its similar to the rails and Django console.&lt;/p&gt;

&lt;p&gt;It also has some cool features which I won’t get into, but as mentioned its one&lt;br&gt;
of the quickest way for me to try out stuff I discover within the framework.&lt;/p&gt;

&lt;p&gt;&lt;span class="figcaption_hack"&gt;./artisan tinker&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;From the above you will notice it also gives the namespace which collect belongs&lt;br&gt;
to. From there I can also go ahead and look it up some more.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Using *&lt;/em&gt;&lt;code&gt;dd(debug_backtrace());&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Alright so we’ve looked at how to discover some of the things packed in Laravel&lt;br&gt;
for developers. One other important piece is understanding how Laravel deals&lt;br&gt;
with the request/response flow.&lt;/p&gt;

&lt;p&gt;For me whenever I need to understand the flow of any PHP project I pull out&lt;br&gt;
&lt;code&gt;die(var_dump(debug_backtrace()));&lt;/code&gt; . I drop this at any part of the code I&lt;br&gt;
understand and run the app once again, view this in my browser and I end up with&lt;br&gt;
a complete execution stack up to where I dropped this. I can then follow through&lt;br&gt;
and understand how each class/method/file processes the request and hands over&lt;br&gt;
execution to the next. This gives me an understanding of how the app works as a&lt;br&gt;
whole. With Laravel even better we can replace &lt;code&gt;die&lt;/code&gt; , &lt;code&gt;var_dump&lt;/code&gt; with &lt;code&gt;dd&lt;/code&gt; so&lt;br&gt;
we end up with &lt;code&gt;dd(debug_backtrace());&lt;/code&gt; which gives us something much more&lt;br&gt;
pleasant to the eye.&lt;/p&gt;

&lt;p&gt;&lt;span class="figcaption_hack"&gt;Backtrace&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So above I have the complete execution path till it gets to&lt;code&gt;ServiceController&lt;/code&gt;&lt;br&gt;
You can see that the request came through the &lt;code&gt;Controller.php&lt;/code&gt; file from within&lt;br&gt;
the &lt;code&gt;Routing&lt;/code&gt; package. Ow by the way the laravel framework it self is based of a&lt;br&gt;
bunch of packages together known as illuminate which you can find on&lt;br&gt;
&lt;a href="http://github.com/illuminate"&gt;Github&lt;/a&gt;. There use to be lots of symfony parts in&lt;br&gt;
there as well . With every new release of Laravel I run &lt;code&gt;debug_backtrace&lt;/code&gt; just&lt;br&gt;
to see if there are any changes in the request/response flow. You get to learn a&lt;br&gt;
lot by doing this . Also it might take you a while to understand exactly what&lt;br&gt;
happens at every point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning from other Laravel Projects.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One interesting thing about code is that not even the authors of the tools can&lt;br&gt;
completely predict how developers will be using some of the things they created.&lt;/p&gt;

&lt;p&gt;For example some developers use blade for scripting and others as a stand alone&lt;br&gt;
tool for creating &lt;a href="https://github.com/themsaid/katana"&gt;static pages&lt;/a&gt;. This is&lt;br&gt;
also true for things within the framework.&lt;/p&gt;

&lt;p&gt;One of the best ways to pick up some of these things is to read the source of&lt;br&gt;
Laravel projects by other developers. One of the ways I decide which project to&lt;br&gt;
look at is through the &lt;a href="https://github.com/trending/php"&gt;Github PHP trending pages&lt;br&gt;
&lt;/a&gt;This way am more likely to find young Laravel&lt;br&gt;
projects that have smaller footprints. I can now follow the progress of this&lt;br&gt;
projects and learn while its grows. Also the few contributions I have made has&lt;br&gt;
been through this process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;People Behind the Framework&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One other important step that I take is to lookup those involved with the&lt;br&gt;
development of Laravel. This not only allow me keep up with the state of&lt;br&gt;
development of the framework. It also gives me a sense of why something exists&lt;br&gt;
or was added. I picked this approach up from school , where the only way I could&lt;br&gt;
understand something like calculus was to follow the life story of Newton and&lt;br&gt;
how he stumbled on Calculus. Also with something like PHP following the story&lt;br&gt;
allowed me understand why we have &lt;code&gt;strtoupper&lt;/code&gt; and &lt;code&gt;str_replace&lt;/code&gt; which is&lt;br&gt;
because the implementation is by two different people :). Anyways.&lt;/p&gt;

&lt;p&gt;These are some of the techniques that came to mind that I use. There might be&lt;br&gt;
more that escaped me but hopefully you find some of these techniques useful, And&lt;br&gt;
apply them as you try and understand the inner parts of Laravel.&lt;/p&gt;

</description>
      <category>phplaravel</category>
    </item>
    <item>
      <title>Substituting JavaScript with HTML</title>
      <dc:creator>EDDYMENS</dc:creator>
      <pubDate>Wed, 25 Oct 2017 15:04:58 +0000</pubDate>
      <link>https://dev.to/eddymens/substituting-javascript-with-html-9c3</link>
      <guid>https://dev.to/eddymens/substituting-javascript-with-html-9c3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aToCbdr_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2Anh5kmyjwgrz8xv3lrLkPmw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aToCbdr_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2Anh5kmyjwgrz8xv3lrLkPmw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So probably by now you are thinking of how in the world will HTML ever substitute Javascript.&lt;/p&gt;

&lt;p&gt;Well I didn’t mean it literally. But then in some vain its possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How we write code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--79ZyZQTa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ANVkEotMqoos4fNQ5boRDkg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--79ZyZQTa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ANVkEotMqoos4fNQ5boRDkg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever worked on a project were you realised between views you kept writing the same piece of code to get or send data back to your server ?&lt;/p&gt;

&lt;p&gt;The most obvious solution is to refactor and have this common part as a class, object, method , function, routine or whatever we do these days. So we can call on this same piece across multiple views.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Going a Step further&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;But then its only a few developers who go ahead to refactor the bulk of reusable code into refined libraries which can be used outside the original project.&lt;/p&gt;

&lt;p&gt;As a matter of fact once you begin to create libraries out of projects you work on you will begin to notice growth. By growth I mean you feel like an engineer because you spend time putting these libraries together to finish projects and spending your spare time patching and fixing these libraries and this expands the dept of your thinking. I must say its a very fun experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Show Me Proof&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I recently transitioned from building end user applications to focusing more on developer tools @&lt;a href="https://medium.com/@devless"&gt;Devless&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;I work on not only speeding up the software development process but also making sure its one that scales. One of our flag ship release is a backend framework that is ready for building SAAS applications right out the box.&lt;/p&gt;

&lt;p&gt;When we first launched we released a couple of SDKs to work with the framework including JS, RUBY, PHP and PYTHON . As part of our business model we also work with developers on enterprise apps. These projects usually serve as the point of truth for our framework . During such projects we get to know how much speed DevLess provides as far as rapid development goes and can it actually scale in production.&lt;/p&gt;

&lt;p&gt;Over the last couple of months I have learnt alot. One of the things I found was that we were writing too much JS even after refactoring the most common used JS code into functions and objects. Well other things contributed to the excessive writing of JS but thats for another post.&lt;/p&gt;

&lt;p&gt;Example: We had up to 8 form submissions and about 12 points where we displayed data . I began getting worried each time I had to put together a form then have some binding JS code call on the submission function to send this data over to the DevLess framework. So I set off to do something about it .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The AHA! Moment&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--POXxL2jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A3Csa4903w-nLl6sUJE7FtA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--POXxL2jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A3Csa4903w-nLl6sUJE7FtA.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;span&gt;&lt;a href="https://formspree.io/"&gt;https://formspree.io/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I don’t remember how I found Form Spree but the moment I saw the example on the page, something struck me . I realised the reason I still had to tell my forms about the JS functions was because I hadn’t taken Separation Of Concerns to a higher level . I quickly began to look at implementations close to Form Spree like Bootstrap and that completed the other half of the puzzle.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class="btn btn-warning"&amp;gt;Submit&amp;lt;button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With the addition of classes I can enjoy all the custom CSS Bootstrap provides for the most part of what we need as far as styling goes . Why can’t we have same for JS ? It turns out we actually do and such libraries are known as UnObstrusive JS libs.&lt;/p&gt;

&lt;p&gt;So we came up with a solution for sending data back to the backend with little or no Javascript at all.&lt;/p&gt;

&lt;p&gt;So for instance the sample code below is used to submit Data to a table labelled details. Note the class &lt;code&gt;dv-add-oneto:profiles:details&lt;/code&gt; thats all you need to submit the form below to DevLess .&lt;/p&gt;

&lt;p&gt;So now the JS library listens on the special classes and acts accordingly. This as opposed to what we had earlier is that now for N number of times we work with data from the backend the JS code responsible for it is the same . So for instance if you compare JQuery to Bootstrap. whereas you write some amount of JS to use JQuery you don’t write any CSS to use the Standard components within Bootstrap.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cool, What Next&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In the spirit of open sourcing everything and anything at DevLess we will be extracting the HTML SDK from DevLess and make it possible to use this with other frameworks as well. Also its important to note that the HTML SDK is not a magic bullet for all kinds of Data work. For some instances you may need to use other SDKs or write custom code for that. But at least now we get to keep what should be simple simple.&lt;/p&gt;

&lt;p&gt;You may Checkout the Docs below for what more you can do with the HTML SDK :&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Adios&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Alright this is were I say bye so please remember to Share , Love and comment down below. Oh! yh you can hit my up via email &lt;a href="mailto:edmond@devles.io"&gt;edmond@devles.io&lt;/a&gt; , or @eddy_mens on twitter&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/web-development?source=post"&gt;Web Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/javascript?source=post"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/backend-as-a-service?source=post"&gt;Backend As A Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/html?source=post"&gt;HTML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/tag/devless?source=post"&gt;Devless&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By clapping more or less, you can signal to us which stories really stand out.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://medium.com/@Eddy_mens"&gt;EDDYMENS&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;“Don’t worry about what anybody else is going to do. The best way to predict the future is to invent it.” Innovate or die ;)&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://medium.com/devless?source=footer_card"&gt;DevLess&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;DevLess is a platform that allows you to easily build robust backends for your web and mobile applications by piecing together plug and play backend modules.&lt;/p&gt;

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