<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Deji Adesoga on Medium]]></title>
        <description><![CDATA[Stories by Deji Adesoga on Medium]]></description>
        <link>https://medium.com/@desoga?source=rss-53cf172e7f39------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tw3lwTYv0vmhSjnPCmZuIQ.jpeg</url>
            <title>Stories by Deji Adesoga on Medium</title>
            <link>https://medium.com/@desoga?source=rss-53cf172e7f39------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:29:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@desoga/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular Tips: Transforming Observables into Signals for Enhanced Reactivity]]></title>
            <link>https://javascript.plainenglish.io/angular-tips-transforming-observables-into-signals-for-enhanced-reactivity-c8c8b32822f2?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8c8b32822f2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular-17]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Thu, 01 Feb 2024 15:14:34 GMT</pubDate>
            <atom:updated>2024-02-06T16:17:23.631Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Demystifying Reactivity with Angular Signals" src="https://cdn-images-1.medium.com/max/1024/1*YyrLV3Oby4SuEU74iPAZlw.png" /><figcaption><a href="https://www.newline.co/courses/demystifying-reactivity-with-angular-signals"><strong>Demystifying Reactivity with Angular Signals</strong></a></figcaption></figure><h3>Introduction</h3><p>There’s always been a love-hate relationship with front-end devs and Angular.</p><p>It’s a really powerful framework, and yet so hard to get into it, especially if you’re a newer engineer.</p><p>Thankfully, Angular keeps evolving, year by year, and continuously offering better, easier, and more efficient ways to manage data and reactivity.</p><p>One such evolution is the conversion of observables to signals using Angular’s interoperability API.</p><p>This post explores this transformative process and its significance in enhancing application reactivity and performance.</p><p><strong><em>Unlock Your Angular Signals Knowledge with my New Course: </em></strong><a href="https://www.newline.co/courses/demystifying-reactivity-with-angular-signals"><strong><em>Demystifying Reactivity with Angular Signals</em></strong></a></p><figure><a href="https://www.newline.co/courses/demystifying-reactivity-with-angular-signals"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWUZZ1WcihOBBIxuNiyGhg.jpeg" /></a><figcaption><a href="https://www.newline.co/courses/demystifying-reactivity-with-angular-signals"><strong>Demystifying Reactivity with Angular Signals</strong></a></figcaption></figure><h3>Understanding Observables and Signals in Angular</h3><p>In Angular, observables are a core part of managing data streams, particularly when fetching data from REST APIs. They provide a powerful way to handle asynchronous data flows. However, managing these observables, especially in complex applications, can become challenging. This is where signals come in, offering a simpler and more reactive way to handle data.</p><h3>The toSignal API: The Hero We All Needed</h3><p>The toSignal method, a part of Angular&#39;s interoperability API, is pivotal in converting observables to signals. It enhances data stream management, making applications more efficient and responsive. The toSignal API accepts various data types and a source, such as data from a REST API, and can also take an initial value, defaulting to &#39;undefined&#39; if not provided.</p><p>A basic example of the toSignal API in use:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0cc5db7e8db29a849e7ba7084021bc1/href">https://medium.com/media/f0cc5db7e8db29a849e7ba7084021bc1/href</a></iframe><p>In this instance, fetchData is a function that returns an observable from a REST API, which is then transformed into a signal.</p><h3>Implementing Reactive Primitives for Efficient State Management</h3><p>Angular’s reactive primitives — effects, computed, and signal — play a crucial role in managing state reactively. The focus here is on the computed primitive, which wraps the environment and implements the first reactive primitive. An observable variable is created to hold API response data, which is then converted to a signal.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c70e057bffef308b6573bb96727a691c/href">https://medium.com/media/c70e057bffef308b6573bb96727a691c/href</a></iframe><h3>Integrating Signals into Angular Components</h3><p>To utilize the products signal in a component, Angular 17’s new @For loop syntax provides a better alternative to the traditional ngFor. This integration significantly simplifies the component&#39;s code and enhances reactivity.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c36e2b4dda5345cf423359b2de073fcd/href">https://medium.com/media/c36e2b4dda5345cf423359b2de073fcd/href</a></iframe><p>The conversion offers several advantages:</p><ul><li><strong>Simplified State Management</strong>: Signals provide a more straightforward approach to managing data streams compared to observables.</li><li><strong>Enhanced Reactivity</strong>: Signals update the UI reactively, ensuring that changes in data are immediately reflected.</li><li><strong>Performance Improvements</strong>: By reducing the reliance on observables in templates, potential performance issues are minimized, leading to faster, more responsive applications.</li></ul><h3>Conclusion</h3><p>Converting observables to signals in Angular represents a significant step towards more efficient and reactive web applications. By understanding and implementing this process, developers can optimize the performance and maintainability of their applications. As Angular continues to evolve, embracing these advancements is key to staying ahead in the dynamic world of web development.</p><p><em>Originally published at </em><a href="https://www.newline.co/@desoga10/angular-tips-transforming-observables-into-signals-for-enhanced-reactivity--96b0b843"><em>https://www.newline.co</em></a> <em>on January 26th, 2024.</em></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a><strong> | </strong><a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://stackademic.com/"><strong>Stackademic</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8c8b32822f2" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/angular-tips-transforming-observables-into-signals-for-enhanced-reactivity-c8c8b32822f2">Angular Tips: Transforming Observables into Signals for Enhanced Reactivity</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A First Look at How to Set Up React 18 Alpha with Snowpack and Vercel]]></title>
            <link>https://javascript.plainenglish.io/a-first-look-at-how-to-set-up-react-18-alpha-with-snowpack-and-vercel-d49f31d18f42?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49f31d18f42</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[snowpack]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sun, 18 Jul 2021 23:29:42 GMT</pubDate>
            <atom:updated>2021-07-20T04:47:41.511Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to set up React 18 Alpha with Snowpack and Vercel</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJ7bXgbzR2IyeO7K9gMbRA.png" /><figcaption>Header Image</figcaption></figure><h3>If you prefer watching a video…</h3><p><em>Be sure to Subscribe to the Official </em><a href="https://www.youtube.com/c/TheCodeAngle/videos"><em>Code Angle</em></a><em> Youtube Channel for more videos.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FenqRAjGox2Q%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DenqRAjGox2Q&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FenqRAjGox2Q%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ba5699a3a754a381e8c2167cd7de8a6/href">https://medium.com/media/8ba5699a3a754a381e8c2167cd7de8a6/href</a></iframe><blockquote>Talk is cheap. Show me the code<br>― Linus Torvalds</blockquote><h3>Table of Contents</h3><ol><li><a href="#1f8f"><em>Introduction</em></a></li><li><a href="#95c7"><em>Installation and Set up of React Using Snowpack</em></a></li><li><a href="#1c90"><em>Folder Structure</em></a></li><li><a href="#55ba"><em>Code Overview</em></a></li><li><a href="#4ae5"><em>Running the Application</em></a></li><li><a href="#798f"><em>Deployment Process Using Vercel</em></a></li><li><a href="#af36"><em>Conclusion</em></a></li></ol><h3>Introduction</h3><p>Earlier this month the React Team released some updates concerning the release of React 18. These updates include the following:</p><ul><li>Work has begun on the React 18 release, which will be the next major version.</li><li>A working group has been created to prepare the community for the gradual adoption of new features.</li><li>An Alpha version has already been published for library authors to try and provide valuable feedback.</li></ul><p>This tutorial aims to set up the React 18 Alpha version using SnowPack, a lightning-fast front-end build tool, designed for the modern web. Then we deploy on <strong>Vercel</strong>.</p><h3>Installation and Set up of React Using Snowpack</h3><p>First, you need to have <a href="https://nodejs.org/en/">Node.js</a> installed, once that is done then you can now install <a href="https://www.snowpack.dev/">Snowpack</a>. You can use the command below to install Snowpack.</p><pre>npm install snowpack</pre><p>Once installed, you can head to a directory where you want to put your new project.</p><p>Now run the following command in your terminal to create a new directory called <strong><em>react-snowpack. </em></strong>This will automatically generate a minimal boiler plater template.</p><pre>npx create-snowpack-app react-snowpack --template @snowpack/app-template-minimal</pre><p>You can now head to the new directory with the following command</p><pre>cd react-snowpack</pre><p>Once inside this directory, we can finally install the React 18 Alpha version by running the command below.</p><pre>npm i react@alpha react-dom@alpha</pre><p>Once this is done, you can check your package.json file to confirm <strong><em>React 18 Alpha</em></strong> has been installed. It should look something like what we have below.</p><pre>&quot;dependencies&quot;: { &quot;react&quot;: &quot;^18.0.0-alpha-cb8afda18-20210708&quot;, &quot;react-dom&quot;: &quot;^18.0.0-alpha-cb8afda18-20210708&quot; <br> } <br>}</pre><h3>Folder Structure</h3><p>React makes use of a templating language called <strong>JSX</strong>. <strong>JSX </strong>stands for JavaScript XML. It is an inline markup that looks like <strong>HTML</strong> that gets transformed to <strong>JavaScript </strong>at runtime<strong>.</strong></p><p>The First step towards the folder restructure is to rename the<strong><em> index.js</em></strong> file with a <strong>jsx</strong> extension like so, <strong><em>index.jsx. </em></strong>Doing this will allow <strong><em>Snowpack </em></strong>to know that we are running a React project.</p><p>In the end, we should have the folder structure below.</p><pre>&gt; public <br>  &gt; index.css <br>  &gt; index.html <br>&gt; src <br>  &gt; App.jsx <br>  &gt; index.jsx <br>.gitignore <br>package-lock.json <br>package.json <br>snowpack.config.mjs</pre><h3>Code Overview</h3><p>We are going to have code modification in four files(<strong><em>index.html, App.jsx, index.jsx and snowpack.config.mjs</em></strong>) before we start up the app and deploy it on Vercel.</p><h3>index.html</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22d080c5bc3aa15bccadcf87b59b956e/href">https://medium.com/media/22d080c5bc3aa15bccadcf87b59b956e/href</a></iframe><p>In the index.html code, three things have to be noted:</p><ul><li>The <strong><em>id</em></strong><em> </em>called <strong><em>root</em></strong><em> </em>which we will refer to in the index.jsx file.</li><li>In the script tag, we have a type called module to enable snowpack to know we will be making use of ES6 syntax.</li><li>Also in the script tag, we have an <strong>src </strong>attribute to signify the path of our deployment directory which will be configured in the <strong><em>snowpack.config.mjs</em></strong> file.</li></ul><h3>App.jsx</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dab3bf4d094f561303f044213996e7b/href">https://medium.com/media/1dab3bf4d094f561303f044213996e7b/href</a></iframe><p>Above in the <strong><em>app.jsx</em></strong><em> </em>file, we generate a simple <strong><em>React</em></strong><em> </em>boilerplate template using a functional component.</p><h3>index.jsx</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c2c92c31c6bc8ad4ba9cf409960b9e4/href">https://medium.com/media/7c2c92c31c6bc8ad4ba9cf409960b9e4/href</a></iframe><p>In the <strong><em>index.jsx</em></strong><em> </em>file, we did three things to enable us startup the app.</p><ul><li>First, we import <strong>React, ReactDOM</strong> and the <strong><em>App.jsx</em></strong><em> </em>file.</li><li>Then we created a variable to get the id in the<strong><em> index.html</em></strong> file.</li><li>Finally, we made use of the new <strong><em>createRoot </em></strong>API in <strong>React 18</strong> to render the application.</li></ul><h3>snowpack.config.mjs</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48ddc6a866d4bdde70eed12ea911177f/href">https://medium.com/media/48ddc6a866d4bdde70eed12ea911177f/href</a></iframe><p>Every <strong>Snowpack </strong>app makes use of the <strong><em>snowpack.config.mjs </em></strong>file for any configurations like the deployment process. In this project, we will only edit the mount object by adding the <strong><em>public</em></strong><em> </em>and <strong><em>src</em></strong><em> </em>keys.</p><p>These serve as a pointer to the path where our deployment folder will be built when we run the build command.</p><h3>Running the Application</h3><p>Now with all our files saved, we can head back to our terminal and run the start command npm run start, which will produce the page below in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jyFbZch8i7VTE3Mu.png" /></figure><p>Now our <strong><em>React 18 alpha</em></strong> app is successfully up and running.</p><h3>Deployment Process using Vercel</h3><blockquote>Vercel enables developers to host websites and web services that deploy instantly and scale automatically all without any configuration.</blockquote><blockquote><strong>-Vercel</strong> Documentation</blockquote><p>The first step towards deployment is running the command below at the root of our project.</p><pre>npm run build</pre><p>This will generate a <strong>build</strong> directory. Inside the <strong>build </strong>directory is a <strong><em>dist</em></strong><em> </em>folder that contains the code we will push to <strong>Vercel</strong>.</p><p>Next up we do the following:</p><p><strong>1). Install Vercel</strong></p><p>To do this we run the command npm i -g vercel</p><p><strong>2). Login into Vercel</strong></p><p>After installing Vercel globally on your machine. Type vercel in the terminal. This will prompt you to log into your account if you are not already logged in.</p><p><strong>3). Project Setup and Deployment</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_loKexVJPTdfIsFT.png" /></figure><p>To summarize the prompt question in the image above, the following questions will be asked:</p><ul><li>Set up and deploy — <strong><em>Y</em></strong><em> (It’s a new application).</em></li><li>Which scope do you want to deploy to? <em>— Select the name of your account.</em></li><li>Found project “desoga10/snowpack-react”. Link to it? — <strong><em>N</em></strong><em> (Because we want to deploy as a different project).</em></li><li>Link to a different existing project? — <strong><em>N </em></strong><em>(Because we are creating a new project).</em></li><li>What’s your project’s name? <em>(react-snoww).</em></li><li>In which directory is your code created? ./build (It’s in the build folder we generated with the<strong><em> npm run build</em></strong> command).</li><li>Want to override the settings? <strong><em>N </em></strong><em>(To prevent Vercel from making changes to or default settings ).</em></li></ul><p>Vercel will now build the application, installing all dependencies in the process. When the installation is done, a inspect link will be available in the terminal. With this link, we can access the Vercel dashboard to see our deployed app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2-4lETb14wNtkN5q.png" /></figure><p><strong>4). Open the Deployed Project</strong></p><p>You can now visit the newly deployed project by clicking on the “visit” button on your dashboard shown in the image above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_4gsGwRoBZAZG9HV.png" /></figure><h3>Conclusion</h3><p>You can find the deployed code in my <a href="https://github.com/desoga10/react-snow">GitHub</a> account.</p><p>I create <a href="https://www.youtube.com/TheCodeAngle">Youtube</a> tutorials too, make sure to subscribe, thank you.</p><p><em>Originally published at </em><a href="https://thecodeangle.com/a-first-look-at-how-to-set-up-react-18-aplha-with-snowpack-and-vercel/"><em>https://thecodeangle.com</em></a><em> on July 18, 2021.</em></p><p><em>More content at </em><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49f31d18f42" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/a-first-look-at-how-to-set-up-react-18-alpha-with-snowpack-and-vercel-d49f31d18f42">A First Look at How to Set Up React 18 Alpha with Snowpack and Vercel</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 10 Date Pickers in React]]></title>
            <link>https://javascript.plainenglish.io/top-10-date-pickers-in-react-c0fbf577e1cf?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0fbf577e1cf</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sun, 07 Mar 2021 01:52:22 GMT</pubDate>
            <atom:updated>2021-03-11T10:42:03.312Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhqOVnmXqG6bREbeTy21Tw.jpeg" /><figcaption>Header Image for Article</figcaption></figure><h3>Introduction</h3><p>A Date Picker is a form of graphical user interface that allows users to select a date from a calendar and/or time from a time range. The common practice in which a date picker is implemented is by providing a text-box field, which when clicked upon to enter a date, displays a pop-up calendar, such that when one of the characters on the calendar is selected, it displays the value inside the text input field.</p><p>Some of the advantages of using a date picker include:</p><ul><li>Entering dates becomes easier for the user and you can control the format of the data you receive.</li><li>Only valid dates can be entered.</li><li>Dates are properly formated to avoid confusion.</li><li>Date Pickers can help users out by including common holidays, for instance depending on the country chosen and integration of their own calendar.</li><li>Making the user enter a date by merely clicking on a date in the pop-up calendar as opposed to having to take their hand off the mouse to type in a date, reducing the chances of error in the process.</li></ul><p>In this tutorial, we will take a look at the top ten date pickers in react, using the estimated weekly downloads from the least number to the most on <a href="https://www.npmjs.com/">NPM</a>.</p><h3>10. @y0c/react-datepicker</h3><p>This date picker is a flexible, reusable, mobile-friendly DatePicker component for React. Its previous versions rely on <strong>moment.js, </strong>but now it is changed to <strong>Day.js</strong> because of bundle size issues.</p><h3>Brief Overview:</h3><p><strong>Version</strong></p><p>1.0.4</p><p><strong>License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>677</p><p><strong>Unpacked-size</strong></p><p>154kb</p><p><strong>Link To Repository:</strong></p><p>@<a href="https://github.com/y0c/react-datepicker">yoc/react- date picker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i @y0c/react-datepicker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1d2a4c78441953593c4682969351dfe/href">https://medium.com/media/b1d2a4c78441953593c4682969351dfe/href</a></iframe><p>What we did here was to create a new file. After this, we had to import <strong>React</strong>, <strong>DatePicker</strong>, <strong>RangeDatePicker</strong> as well as the assets for the <strong>CSS.</strong></p><p>Next, we created a functional component that has two variables. The first one is called <strong>onChangeValue </strong>which takes in an argument, while the second one is called <strong>onChangeRangeValue. </strong>These variables allow us to log the data for the date in the console.</p><p>Finally in our code, we display the date pickers by calling both the <strong><em>&lt;DatePicker onChange={onChangeValue} /&gt; </em></strong>and the <strong>&lt;RangeDatePicker onChange={onChangeRangeValue(“date”)} /&gt;</strong> that was imported earlier.</p><p>Each one has an <strong>onChange</strong> prop that takes in the variables that we created earlier.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qm5x5j2W3fZUnphXXZKtaA.gif" /><figcaption>gif showing react-datepicker example</figcaption></figure><h4>Possible Errors</h4><p>There is a chance you may get an error that says, <strong><em>ERROR Cannot find module ‘node-sass’. </em></strong>All you have to do when you get this error message is to run the command npm install node-sass in your terminal or command line.</p><h3>9. materialui-daterange-picker</h3><p>This is a react date range picker that makes use of @material-ui. Material-UI is the most popular React component library, with millions of users worldwide.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>5,135</p><p><strong>Unpacked-size</strong></p><p>1.12 MB</p><p><strong>Link To Repository :</strong></p><p><a href="https://github.com/jungsoft/materialui-daterange-picker#readme">materialui-daterange-picker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i materialui-daterange-picker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7271605ff71cd9c908051cb8e2231c02/href">https://medium.com/media/7271605ff71cd9c908051cb8e2231c02/href</a></iframe><p>Here we import <strong>React</strong> and the <strong>DateRangePicker</strong> as expected. Then we created a functional component. In this component, we declared a React hook called <strong>useState</strong> that takes in a variable(open) and a function(setOpen).</p><p>We state the <strong>useState</strong> to <strong>true</strong> by default because that is how our date picker will get displayed on the page.</p><p>Next up, we assigned an anonymous function to a variable called toggle. This makes sure that our date picker is always open no matter the state.</p><p>We then create another variable called <strong>setDateRange. </strong>This variable takes in an anonymous function that logs and alert the value of the date selected. We get the value for both the start date and the end date.</p><p>Finally in our return, we assign each props in the &lt; <strong>DateRangePicker /&gt;</strong> component to each of the variables.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shBECMa2DB_cQeWQPb2xsA.gif" /><figcaption>gif showing materialui-daterange-picker</figcaption></figure><h3>8. React-DateTime-Picker</h3><p>This is a fast, lightweight and easy to style date picker that only provides support for modern browsers. It is only compatible with 16.3 or later.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>20,973</p><p><strong>Unpacked-size</strong></p><p>193 kB</p><p><strong>Link To Repository:</strong></p><p><a href="https://github.com/wojtekmaj/react-datetime-picker#readme">react-datetime-picker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-datetime-picker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dccad8c3c7c36c6e219cd4063aff86be/href">https://medium.com/media/dccad8c3c7c36c6e219cd4063aff86be/href</a></iframe><p>From the above, we import <strong>React</strong>, <strong>useState</strong> and <strong>DateTimePicker</strong>, then we created a functional component. Then we declared a React hook called <strong>useState</strong> that takes in a variable(value) and a function(onChange).</p><p>The value takes in the value of the current date which will be displayed by default in the input field.</p><p>Next up we created a variable called <strong>getDateValue</strong>. This variable takes in an anonymous function that enables us to log and alert the value of the selected date. Also, the <strong>onChange</strong> function is called inside the anonymous function, this makes the date values in the input field change based on the date that was selected.</p><p>Lastly, in our return, we pass in the variables to the props inside the <strong>&lt;DateTimePicker /&gt;</strong> component.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S2yjLJpptO-Ol5vfCzb-Xg.gif" /><figcaption>gif showing react-datetime-picker</figcaption></figure><h3>7. react-date-range</h3><p>This is a React Date Picker component for choosing dates and date ranges. It makes use of <strong>date-fns</strong> for date operations. Some of the qualities of this date picker include:</p><ul><li>Stateless date operations</li><li>Highly configurable</li><li>Multiple range selection</li><li>Based on native js dates</li><li>Drag n Drop selection</li><li>Keyboard friendly</li></ul><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>63,883</p><p><strong>Unpacked-size</strong></p><p>1.92 MB</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/hypeserver/react-date-range#readme">react-date-range</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-date-range</pre><p><strong>Step 2</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3b76c9afdf256e127879a4cc089a404/href">https://medium.com/media/f3b76c9afdf256e127879a4cc089a404/href</a></iframe><p>The first thing we did was import <strong>React</strong>, the CSS files for the theme and also the necessary component from <strong>react-date-range.</strong></p><p>Next, we created a function called <strong>handleSelect</strong>, that helps log the date values to the console.</p><p>Finally, in our return, our first component called <strong>&lt;Calendar /&gt;</strong> we declared some props and assigned some variables to it. The first is the date prop that takes in a new Date value, second is the <strong>onChange</strong> prop that takes in the <strong>handleSelect</strong> variable that logs out the date values to the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-zi6n_1RLRNqJHrhUP1xA.gif" /><figcaption>gif showing react-date-range</figcaption></figure><h3>6. react-date-picker</h3><p>This is a fast, lightweight and easy to style date picker that only provides support for modern browsers. With this date picker, you can pick days, months, years, or even decades.</p><p>It is only compatible with 16.3 or later.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>78,779</p><p><strong>Unpacked-size</strong></p><p>209 kB</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/wojtekmaj/react-date-picker#readme">react-date-picker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-date-picker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7aa2297e5ee9eaaf2ebdd0951a772937/href">https://medium.com/media/7aa2297e5ee9eaaf2ebdd0951a772937/href</a></iframe><p>From the above, we import <strong>React</strong>, <strong>useState</strong> and <strong>DatePicker</strong>, then we created a functional component. Next, we declared a React hook called <strong>useState</strong> that takes in a variable(value) and a function(onChange).</p><p>The value takes in the result of the current date which will be displayed by default in the input field.</p><p>Next up we created a variable called <strong>dateValue</strong> . This variable takes in an anonymous function that enables us to log and alert the value of the selected date. Also, the <strong>onChange</strong> function is called inside the anonymous function, this makes the date values in the input field change based on the date that was selected.</p><p>Lastly, in our return, we pass in the variables to the props inside the <strong>&lt;DatePicker /&gt;</strong> component.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkSxpKBOoO7At7QQhVZW_w.gif" /><figcaption>gif showing example of react-date-picker</figcaption></figure><h3>5. react-big-calendar</h3><p>This is an events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-based approach.</p><p><strong>react-big-calendar</strong> makes use of three options for handling the date formatting and culture localization, depending on your preference of <strong>DateTime</strong> libraries. You can use either the <a href="https://momentjs.com/">Moment.js</a>, <a href="https://github.com/jquery/globalize">Globalize.js</a> or <a href="https://date-fns.org/">date-fns</a> localizers.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>126,292</p><p><strong>Unpacked-size</strong></p><p>1.13 MB</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/jquense/react-big-calendar#readme">react-date-calendar</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-big-calendar</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e4eddaad9a9435486b280f8031bd97fb/href">https://medium.com/media/e4eddaad9a9435486b280f8031bd97fb/href</a></iframe><p>From the above, we import <strong>React</strong>, the necessary dependencies from<strong> react-big-calendar</strong>, <strong>moment.js</strong> as well as the needed <strong>CSS</strong> assets.</p><p>Next up we set the structure for <strong>moment.js</strong>, after which we declare a variable called <strong>myEventsList</strong>. This variable contains an array of objects that sets a start-date, end-date as well as the title of the event to take place on those days.</p><p>Finally, we return our <strong>&lt;Calendar /&gt;</strong> component which contains the props in which we passed the date and also the list of events.</p><h4>Results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtZxHlFNJMhUGfYF0ihrZA.gif" /><figcaption>gif showing example of react-big-calendar</figcaption></figure><h3>4. react-datetime</h3><p>This Date-Picker can be used as a date picker, time picker or both at the same time. It is <strong>highly customizable</strong> and it even allows to edit date’s milliseconds.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>207,604</p><p><strong>Unpacked-size</strong></p><p>296 kB</p><p><strong>Link To Repository</strong></p><p><a href="https://www.npmjs.com/package/react-datetime">react-datetime</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-datetime</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/770f88aa4611c29868df878c01190a51/href">https://medium.com/media/770f88aa4611c29868df878c01190a51/href</a></iframe><p>Here we import <strong>React</strong>, the <strong>CSS</strong> assets and <strong>Datetime </strong>from the<strong> react-datetime</strong> library.</p><p>Inside our functional component, we created a variable called <strong>setDateTime. </strong>This variable takes in an anonymous function that will display the values of the date both inside the browser console and the alert box.</p><p>Finally, in our return, we create our <strong>&lt;Datetime /&gt;</strong> component and assign the necessary props to it, which makes our date-picker functional.</p><h4>Results</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sMnVuWIhnc5a9Fm0LUW70w.gif" /><figcaption>gif showing react-datetime</figcaption></figure><h3>3. react-day-picker</h3><p>This is a date-picker that is highly customizable, localizable, with ARIA support, no external dependencies.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>438,116</p><p><strong>Unpacked-size</strong></p><p>686 kB</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/gpbl/react-day-picker">react-day-picker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-day-picker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f4e7a67cae66da3a2b22e5650d08ee3/href">https://medium.com/media/6f4e7a67cae66da3a2b22e5650d08ee3/href</a></iframe><p>From the above code, we import <strong>React</strong>, the <strong>DayPickerInput</strong> and the <strong>CSS</strong> assets.</p><p>In our functional component, we created a variable called <strong>onDayChangeInput. </strong>Inside this variable is an anonymous function that logs the date valued to the console as well as showing an alert box.</p><p>Then finally, in our return, we include the props in our <strong>&lt;DayPickerInput /&gt;</strong> component.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4U_fRwIQHfiZybTK9dMPQ.gif" /><figcaption>gif showing example of react-day-picker</figcaption></figure><h3>2. @material-ui/pickers</h3><p>This date-picker is an accessible, customizable, delightful date &amp; time pickers for React. It is one of the most high-quality date-picker out there.</p><p>It is based on Material-UI, the world’s most popular React component library.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>596,404</p><p><strong>Unpacked-size</strong></p><p>1.49 MB</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/mui-org/material-ui-pickers">material-ui pickers</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i @material-ui/pickers</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55c6c2b045526d7de356f118a77726f0/href">https://medium.com/media/55c6c2b045526d7de356f118a77726f0/href</a></iframe><p>The code above shows how we import the necessary dependencies to run the project.</p><p>Then in our functional component, we created a <strong>useState</strong> hook that has a variable and a function called <strong>selectedDate</strong> and <strong>handleDateChange</strong> respectively.</p><p>Next, we created a variable called <strong>dateChangeValue</strong> that holds an anonymous function. Inside this function we do three things:</p><ul><li>We call the <strong>handleDateChange</strong> function from our <strong>useSate</strong>, this helps us update the change event on the date-picker, shown on the page.</li><li>Next up we log and alert the value of the date that is clicked on the date-picker.</li></ul><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4y4A1WVURqmxe1dDvD2zw.gif" /><figcaption>gif showing example of @material-ui pickers</figcaption></figure><h4>Possible Errors</h4><p>There is a possibility you run into this error: Module not found: Can’t resolve ‘@date-io/date-fns’</p><p>When that happens, you can run the following commands to solve the issue:</p><pre>$ npm i --save date-fns@next @date-io/date-fns@1.x</pre><h3>1. React Date Picker</h3><p>This is a simple and reusable Datepicker component made for React. It is one of the most popular packages around the web, with hundreds of thousands of weekly downloads.</p><p>This date picker relies on <a href="https://date-fns.org/v2.0.0-alpha.18/docs/I18n">date-fns internationalization</a> to localize its display components. By default, the date picker will use the locale globally set, which is English.</p><h3>Brief Overview:</h3><p><strong>Version License</strong></p><p>MIT</p><p><strong>Estimated-Weekly -Downloads</strong></p><p>806,816</p><p><strong>Unpacked-size</strong></p><p>3.6.0</p><p><strong>Link To Repository</strong></p><p><a href="https://github.com/Hacker0x01/react-datepicker">react-datepicker</a></p><h3>Code Demo / Example</h3><p>In this short tutorial, I’ll be showing us how we can install, display and get the values of the date that is selected in the DatePicker.</p><h4>Step 1</h4><p>We will need to install React, this can be done trough Create-React-App. I wrote an article on how to install it <a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/#reactinstallation">here</a>.</p><p>Once that is done, we will need to navigate into the path of our folder in our terminal and run the npm command to install our Date-Picker package:</p><pre>npm i react-datepicker</pre><h4>Step 2</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/091cd25d80e49f56bbe739ea8d253c94/href">https://medium.com/media/091cd25d80e49f56bbe739ea8d253c94/href</a></iframe><p>Above we import all the necessary dependencies. Then in the functional component, we create a <strong>useState</strong> hook. This hook takes in a variable and a function called <strong>startDate</strong> and <strong>setStartDate</strong> respectively.</p><p>Next, we create a variable with an anonymous function called <strong>getDateValue.</strong></p><p>In this variable, the <strong>setStartDate</strong> function from the <strong>useState</strong> is updated with the value of the current date as they change on the page. We also log and alert the date values on the console.</p><p>Finally in our return, we declare our <strong>&lt;DatePicker /&gt;</strong> component and assign the necessary props to it.</p><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lMQ00d2kCxmSClaiz-tCXg.gif" /><figcaption>gif showing example of react-datepicker</figcaption></figure><h3>Conclusion</h3><p>So that is it for the top Date pickers in React. Date pickers are very popular and important components in the Frontend Development world. It is really great that we have so many Date Pickers out there, and we can easily implement anyone that seems like the right fit for our project.</p><p>If you have any difficulties in implementing any of the Date Picker discussed above, feel free to drop your issue in the comment section.</p><p>Also if you are looking for an open-source project to contribute to, a lot of the above Date Pickers provide an excellent opportunity for you to do so.</p><p>Also, <a href="https://github.com/desoga10/date-pickers">here</a> is the GitHub link to the code examples used in the article.</p><p><em>Subscribe to my </em><a href="https://www.youtube.com/channel/UChi_aILZkMMx8_KlVAsbI7g"><em>Youtube Channel </em></a><em>for more tutorials on web development content.</em></p><p><em>Originally published at </em><a href="https://thecodeangle.com/top-10-date-pickers-in-react/"><em>https://thecodeangle.com</em></a><em> on March 7, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0fbf577e1cf" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/top-10-date-pickers-in-react-c0fbf577e1cf">Top 10 Date Pickers in React</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Detailed Breakdown of HTML Form Event Attributes]]></title>
            <link>https://levelup.gitconnected.com/a-detailed-breakdown-of-html-form-event-attributes-925ab40b1ddf?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/925ab40b1ddf</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sat, 05 Dec 2020 10:43:32 GMT</pubDate>
            <atom:updated>2020-12-09T00:05:06.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Blog Post Image On HTML event attribute" src="https://cdn-images-1.medium.com/max/1024/1*lolLJG3OJsI87Qku36vzSw.jpeg" /></figure><blockquote>Don’t aspire to make a living, aspire to make a difference.- Denzel Washington</blockquote><h3>Table of Contents</h3><ol><li><a href="#5e4b">Introduction</a></li><li><a href="#6fa2">HTML Form Events<br></a>2.1 <a href="#2bef">onblur</a><br>2.2 <a href="#c195">onchange</a><br>2.3 <a href="#1c51">oncontextmenu</a><br>2.4 <a href="#875a">onfocus</a><br>2.5 <a href="#70cc">oninput</a><br>2.6 <a href="#2bf7">oninvalid</a><br>2.7 <a href="#c7d3">onreset</a><br>2.8 <a href="#fa96">onsearch</a><br>2.9 <a href="#0484">onselect</a><br>2.10 <a href="#4ed8">onsubmit</a></li><li><a href="#3302">Conclusion</a></li></ol><h3>Introduction</h3><p><strong>HTML </strong>forms allow users on a web page to enter data that will be sent to a server for processing. <strong>HTML </strong>forms are a powerful way of interacting with a web application. They include various elements called controls like (Text Input, Checkboxes, Radio Box, Select Box, e.t.c).</p><p>The <strong>HTML </strong>forms are enclosed inside a &lt;form&gt;&lt;/form&gt; element. The &lt;form&gt; element has various attributes, some of which includes the<strong> <em>action attribute, the target attribute</em></strong> and the <strong><em>method attribute</em></strong>.</p><h3>The Action Attribute</h3><p>The <strong>action </strong>attribute helps to determine the type of form data that will be sent to the server after the submission of a form.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd55b47f8859609be7eff06aea1f312a/href">https://medium.com/media/cd55b47f8859609be7eff06aea1f312a/href</a></iframe><p>From the above code, the form data is sent to a file called<em> “testpage.php” </em>with the help of the action attribute.</p><h3>The Target Attribute</h3><p>This attribute specifies to the browser the particular page to display the response that is received once the form has been submitted.</p><p>Also, The <strong>Target </strong>attribute can have the values below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bd7732d3fc5414d24a66a961cbc6672c/href">https://medium.com/media/bd7732d3fc5414d24a66a961cbc6672c/href</a></iframe><ul><li>The response is displayed in a new browser window or tab.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0a771354700a8b2f3f1da3653acd807/href">https://medium.com/media/e0a771354700a8b2f3f1da3653acd807/href</a></iframe><ul><li>The response is displayed in the current window. This is the default value of the <strong>Target</strong> attribute.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b094c787f66e2b860392e1783504457d/href">https://medium.com/media/b094c787f66e2b860392e1783504457d/href</a></iframe><ul><li>The response is displayed in the parent frame</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c5930aea97756d92a6dd581c6fb5d33/href">https://medium.com/media/3c5930aea97756d92a6dd581c6fb5d33/href</a></iframe><ul><li>The response is displayed in the full body of the window</li></ul><h3>The Method Attribute</h3><p>The <strong>Method </strong>attribute specifies the particular Hypertext Transfer Protocol ( <strong>HTTP</strong>) method to be used when submitting form data.</p><p>There are two types of <strong>HTTP</strong> method attribute that can be used with the <strong>&lt;form&gt;</strong> element. They include the <strong>GET</strong> and <strong>POST.</strong></p><p>The <strong>GET</strong> Attribute</p><pre>&lt;form action=&quot;/testpage.php&quot; method=&quot;get&quot;</pre><ul><li>The example above uses the <strong>GET</strong> method when submitting the form data.</li></ul><p>The POST Attribute</p><pre>&lt;form action=&quot;/testpage.php&quot; method=&quot;post&quot;&gt;</pre><ul><li>The example above uses the <strong>POST</strong> method when submitting the form data.</li></ul><p>Also, one of the most used elements in an <strong>HTML</strong> form is the <strong>&lt;input&gt; </strong>tag. The <strong>&lt;input&gt; </strong>tag can be displayed in so many ways within the <strong>HTML</strong> form. Some of which includes:</p><pre>&lt;input type=”text”&gt;</pre><p><strong><em>Displays a single-line text input field. It is the default type of the input element.</em></strong></p><pre>&lt;input type=”radio”&gt;</pre><p><strong><em>Shows a radio button (for selecting one of many choices).</em></strong></p><pre>&lt;input type=”checkbox”&gt;</pre><p><strong><em>Displays a checkbox (for selecting zero or more of many choices).</em></strong></p><pre>&lt;input type=”submit”&gt;</pre><p><strong><em>Shows a submit button (for submitting the form).</em></strong></p><pre>&lt;input type=”button”&gt;</pre><p><strong><em>Displays a clickable button.</em></strong></p><p>Now that we’ve covered the basics of the <strong>HTML </strong>form, let us dive into the various form events.</p><h3>HTML Form Events</h3><h3>1). onblur Event</h3><p>The <strong>onblur </strong>event renders when an object loses its focus. The <strong>onblur</strong> event is mostly used with form validation, that is, when a user leaves a form field.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onblur=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>Here, we will create an input field that displays an alert box once the input field loses focus.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de0b79c46e005ae742011662759b799f/href">https://medium.com/media/de0b79c46e005ae742011662759b799f/href</a></iframe><p>Above we have a function called which is declared inside an <strong><em>onblur </em></strong>attribute. Then we have our script tag linked top our JavaScript page, where we will perform the alert operation.</p><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/239be8274717098ea011297418d4ffcf/href">https://medium.com/media/239be8274717098ea011297418d4ffcf/href</a></iframe><p>In the JavaScript file, we:</p><ul><li>Accessed the input field by its <strong><em>id </em></strong>called <strong><em>myInput </em></strong>inside the <strong><em>blurFunction() </em></strong>function.</li><li>Declared a variable called <strong><em>blurry.</em></strong></li><li>Then we created a condition that if the value typed in the form is called <strong><em>blurry</em></strong>, then an alert box should pop up once the input field loses focus.</li></ul><h4>RESULT</h4><figure><img alt="A GIF showing blur attribute in action" src="https://cdn-images-1.medium.com/max/1024/1*hw63IDrkco1a0H_pQW4HkA.gif" /></figure><h3>2). onchange Event</h3><p>The <strong>onchange </strong>event occurs when the value of an element is changed. It is used in elements such as <em>&lt;input &gt; &lt;select&gt;</em> and <em>&lt;textarea&gt;.</em></p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onchange=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>Here, we will create a select element that returns different values on the DOM, based on the change event.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42addd1258268ffe810cff7032feaedd/href">https://medium.com/media/42addd1258268ffe810cff7032feaedd/href</a></iframe><p>In the <strong><em>HTML</em> </strong>page, we have a select element that shows various options with their values. The two important things to take note of here is:</p><ul><li>The<strong><em> clubSelect()</em></strong> function in the <strong><em>onchange</em></strong><em> </em>event attribute.</li><li>The <strong><em>div</em></strong><em> </em>that contains the <strong><em>result</em></strong><em> </em>class. This is where we will display the value of our event.</li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ebe9769c354f08b4589045f0130c04d8/href">https://medium.com/media/ebe9769c354f08b4589045f0130c04d8/href</a></iframe><p>Here what we simply did was:</p><ul><li>Declare the<strong><em> clubSelect()</em></strong> function created in the <strong>HTML</strong> page. This gives us access to the change event.</li><li>Create a <strong><em>result</em></strong><em> </em>variable that accessed the class.</li><li>Assigned the result variable to the <strong><em>textContent </em></strong>method, which helps us to set a given text to the node like so.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing change attribute" src="https://cdn-images-1.medium.com/max/1024/1*sZP5p3nsRA7L8zCPj9G0iw.gif" /></figure><h3>3). oncontextmenu Event</h3><p>The <strong><em>oncontextmenu</em></strong><em> </em>event performs its action when the user right-clicks the mouse on an object on the window. The <strong><em>oncontextmenu</em></strong><em> </em>event is supported in all browsers.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element oncontextmenu=&quot;event&quot;&gt;</pre><h3>Example</h3><p>In this example, we will be displaying an alert box within a <strong>div </strong>when we right-click, instead of the context menu options.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/199b6c209f37857c94210413c07a256c/href">https://medium.com/media/199b6c209f37857c94210413c07a256c/href</a></iframe><p>In the <strong><em>HTML</em></strong><em> </em>file, we have a that contains the <strong><em>oncontextmenu </em></strong>event attribute. The attribute contains the function called <strong><em>myAlert()</em></strong>, which will be used in the JavaScript file to create the alert box.</p><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c54cc3de994fc45af3c02a28f10bbe7/href">https://medium.com/media/4c54cc3de994fc45af3c02a28f10bbe7/href</a></iframe><p>In the <strong><em>app.js</em></strong> file, we called the <strong><em>myAlert()</em></strong> function and declared an alert box within it when the <strong><em>oncontextmenu </em></strong>is fired within the <strong><em>div</em></strong>.</p><blockquote>style.css</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c72ec2311c7e58b1ccd30ed68f7a7c0/href">https://medium.com/media/2c72ec2311c7e58b1ccd30ed68f7a7c0/href</a></iframe><h4>RESULT</h4><figure><img alt="GIF showing context attribute" src="https://cdn-images-1.medium.com/max/1024/1*M88BTaEtLCzgTKQeQtv4jw.gif" /></figure><h3>4). onfocus Event</h3><p>The <strong><em>onfocus </em></strong>event fires when a user sets the focus of the mouse on a particular element on the web page. It is the opposite of the <strong>onblur</strong> event.</p><p>It is mostly used with the <strong><em>&lt;input&gt;, &lt;select&gt;,</em></strong><em> </em>and <strong><em>&lt;a&gt; HTML</em> </strong>elements.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onfocus=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>Here we will display an alert box when the input field is in focus.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c7a8940cc225b97a1a3bab52db1a24a/href">https://medium.com/media/5c7a8940cc225b97a1a3bab52db1a24a/href</a></iframe><p>In the file above, we:</p><ul><li>declared the <strong><em>onfocus</em></strong><em> </em>event inside an input element.</li><li>created a <em>value</em> attribute with the word focus</li><li>Then we linked the file to out JavaScript file, where the magic happens.</li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ee6955d9670d0a0a496c039ef1c9cb2/href">https://medium.com/media/7ee6955d9670d0a0a496c039ef1c9cb2/href</a></iframe><p>In the <strong><em>app.js</em></strong> file we:</p><ul><li>Called the <strong><em>focusFunction()</em></strong> function.</li><li>Created the <strong><em>val</em></strong><em> </em>and focus variables. The <strong><em>val</em></strong><em> </em>variable accessing the input field, while the focus variable holds the word focus.</li><li>Then finally, we created a condition that says if the value of the form contains the word “<em>focus</em>” and the input field is in an event state, an alert box should be displayed.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing the focus attribute" src="https://cdn-images-1.medium.com/max/1024/1*U0Ry7HLjZ7k50ZNlNitTsg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1/0*MR0xS5kM8Z_mQ7ez" /></figure><h3>5). oninput Event</h3><p>The <strong><em>oniput </em></strong>event fires when the value of a text element like the or is changed. Similar to the event, the main difference is that the input event gets triggered immediately when there is a change, whereas the event occurs only when the element has lost focus.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element oninput=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>Here, we will display the value of the input field on the page as the value gets changed.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06e26a7ef5e7335243e4d4522d3b7455/href">https://medium.com/media/06e26a7ef5e7335243e4d4522d3b7455/href</a></iframe><p>Above we:</p><ul><li>Created an input tag. Inside which we have an <strong>id </strong>called “<strong><em>myInput</em></strong>”, which we will refer to in the JavaScript file.</li><li>We also have the <strong><em>oniput</em></strong><em> </em>event attribute declared.</li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6099a79cd5a0705c2cab118847bfc024/href">https://medium.com/media/6099a79cd5a0705c2cab118847bfc024/href</a></iframe><p>The <strong>app.js </strong>file is straight forward. All we did was:</p><ul><li>Refer to our function from the page.</li><li>Declared a variable called <em>values</em>, that accesses the input element.</li><li>Then we accessed the <strong>div</strong> with the <strong><em>id</em></strong><em> </em>of, which is where we will display the text from the input field.</li><li>With the help of the <strong><em>textContent</em></strong><em> </em>method, we can assign the texts to the <strong>div</strong> tag.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing the input attribute" src="https://cdn-images-1.medium.com/max/1024/1*MlFquB5ln2ljZMvUju-deA.gif" /></figure><h3>6). oninvalid Event</h3><p>The <strong><em>oninvalid </em></strong>event occurs when a submittable input element is invalid and does not meet certain conditions. In most case, an error message is shown stating why the input submission is not valid.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element oninvalid=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>Here we display an alert box that shows a message when an empty is submitted in the input field.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6b47617fd5f585ad98a578550743970/href">https://medium.com/media/f6b47617fd5f585ad98a578550743970/href</a></iframe><p>From the HTML file above, we created an input field that is expected to take in a username. Inside the input field, we have a function called <strong><em>testValidity(). </em></strong>This function will be used to display our alert box in the JavaScript file.</p><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b865e52edf4c4e7d45abaa67ec2bf5ee/href">https://medium.com/media/b865e52edf4c4e7d45abaa67ec2bf5ee/href</a></iframe><p>Here we simply reference the function called<strong><em> testValidity()</em></strong> set inside the <strong><em>oninvalid</em></strong><em> </em>event attribute in the <strong><em>HTML</em></strong><em> </em>file. Anytime the form is submitted with an input empty filed, the alert box will display the message “Field Cannot Be Empty”.</p><h4>RESULT</h4><figure><img alt="GIF showing the invalid attribute" src="https://cdn-images-1.medium.com/max/1024/1*1lw_viguFeVtaV3N9Uj1mw.gif" /></figure><h3>7). onreset Event</h3><p>The <strong><em>onreset</em></strong><em> </em>event occurs when a user clicks on a reset button within a form. This set the form back to the predefined state.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onreset=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>In this example, we will create an input field that gets cleared once the reset button is clicked. Once this event fires, we will log the time in which the form was clicked on the browser page.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e57db04e7c3ff9e0c8a27b0b557d4e7/href">https://medium.com/media/5e57db04e7c3ff9e0c8a27b0b557d4e7/href</a></iframe><p>Here we:</p><ul><li>Created a form tag that takes in an <strong><em>id</em></strong><em> </em>and an <strong><em>onreset</em></strong><em> </em>event attribute.</li><li>Created an input field that takes in some text.</li><li>A reset button that sets the state of the form to empty.</li><li>Lastly, we create a <strong><em>p</em></strong><em> </em>tag that carries an <strong><em>id</em></strong><em> called</em> <strong><em>display</em></strong><em> </em>to show the time the form was reset.</li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e4ef7292b1e1a168ea6415707bba64dd/href">https://medium.com/media/e4ef7292b1e1a168ea6415707bba64dd/href</a></iframe><p>In the JavaScript file we simply:</p><ul><li>Made reference to our<strong><em> resetForm()</em></strong> function.</li><li>Next, we append the <strong><em>textContent</em> </strong>method to display the current date as at when the rest button is clicked.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing the reset attribute" src="https://cdn-images-1.medium.com/max/1024/1*M2UP5xkGQwumyOWYYVGZsA.gif" /></figure><h3>8). onsearch Event</h3><p>The <strong><em>onsearch </em></strong>event occurs when a user initiates a search inside an element. The will have a type of “search” for this to get fired.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onsearch=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>We will create an input field that allows users to search once the enter button is pressed. The searched value will be shown on the page.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c6e70fb1ba735e38b390847a0cc36f9/href">https://medium.com/media/9c6e70fb1ba735e38b390847a0cc36f9/href</a></iframe><p>In the <strong><em>index.html</em></strong><em> </em>file, we:</p><ul><li>Created an input element that has an <strong>id</strong> called . We also declared the <strong><em>onsearch</em></strong><em> </em>event attribute that takes in a function</li><li>Lastly, we created a <strong>p</strong> element that has an <strong>id</strong> called to display to help show the value of the input field on the page.</li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed6086dd32e567c7b42cc49ec3b79211/href">https://medium.com/media/ed6086dd32e567c7b42cc49ec3b79211/href</a></iframe><ul><li>Made reference to the function called<strong><em> searchInput()</em></strong> declared in the <strong>HTML</strong> file.</li><li>Accessed the <strong>id’s</strong> in the <strong>HTML</strong> file.</li><li>Lastly, we displayed the value of the input field on the page once the ENTER key is pressed.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing the search attribute" src="https://cdn-images-1.medium.com/max/1024/1*c_UEz8ICuoFXLViqi-8MgQ.gif" /></figure><h3>9). onselect Event</h3><p>The <strong><em>onselect </em></strong>event only occurs when a particular text has been selected on either the <em>&lt;input type=”text”&gt;</em> or <em>&lt;textarea&gt;</em> elements.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onselect=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>In this example, we will create an input field. The goal is to display the number of text selected in the input field inside an alert pop box.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/436fee84a578136e8d89735b85fffad7/href">https://medium.com/media/436fee84a578136e8d89735b85fffad7/href</a></iframe><p>In the<strong><em> index.html</em></strong> file above, we:</p><ul><li>Created an input field which contains the value “Happiness is Free”.</li><li>Also, we have our attribute with a function called <strong><em>selected().</em></strong></li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1cea74b794386b58763e1fb9337d9970/href">https://medium.com/media/1cea74b794386b58763e1fb9337d9970/href</a></iframe><p>Here we:</p><ul><li>Referenced the <strong><em>selected() </em></strong>function from the <strong>HTML</strong> page.</li><li>Created a variable called <strong>highlighted. </strong>Inside this variable, we get the value of text inside the input field, while getting the index at the beginning and the end of the input field.</li><li>Lastly, when the text gets selected, we display an alert box showing the number of words that were selected in the input field.</li></ul><h4>RESULT</h4><figure><img alt="GIF showing the select attribute" src="https://cdn-images-1.medium.com/max/1024/1*Qx4ib4b7tIoGcp-gcgXL7Q.gif" /></figure><h3>10). onsubmit Event</h3><p>The <strong><em>onsubmit </em></strong>event gets triggered when a form is submitted on a page, by a user.</p><p><strong>SYNTAX in HTML</strong></p><pre>&lt;element onsubmit=&quot;myFunction&quot;&gt;</pre><h3>Example</h3><p>In this example, we will be submitting the values inside a form. We will get a confirmation message from another page.</p><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7cb200f4951c81668c92dd84af7d28a6/href">https://medium.com/media/7cb200f4951c81668c92dd84af7d28a6/href</a></iframe><p>In the <strong><em>index.html</em></strong> page, we:</p><ul><li>Have a form element with an action that routes to a <strong><em>submit.html</em></strong> page when the form is submitted.</li><li>Inside the form, we also have the event attribute, which takes in the function called <strong><em>myFunction()</em></strong></li><li>Also, have two input elements. One takes in the name input, while the other is a button that helps us submit the form.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b09aea85c33230f0e7f808520b92cd68/href">https://medium.com/media/b09aea85c33230f0e7f808520b92cd68/href</a></iframe><p>In the JavaScript file, we simply called the<strong><em> myFunction()</em></strong> declared in the <strong>HTML</strong> page, then we created an alert box that displays a message when the form is submitted.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91597286cd98ae0c5b80bf8e3fb93a47/href">https://medium.com/media/91597286cd98ae0c5b80bf8e3fb93a47/href</a></iframe><p>The <strong><em>submit.html</em></strong> file is the page that gets displayed when the form is submitted.</p><h4>RESULT</h4><figure><img alt="GIF showing the submit attribute" src="https://cdn-images-1.medium.com/max/1024/1*UTc9xQsXSVnTeJbYxah6yQ.gif" /></figure><h3>Conclusion</h3><p>This article aims to cover the basics of how the <strong>HTML </strong>form event attribute work.</p><p>Also, <a href="https://github.com/desoga10/HTML-form-event-attributes">here</a> is the GitHub link to the code examples used in the article.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/a-detailed-breakdown-of-html-form-event-attributes/"><em>https://thecodeangle.com</em></a><em> on December 5, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=925ab40b1ddf" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/a-detailed-breakdown-of-html-form-event-attributes-925ab40b1ddf">A Detailed Breakdown of HTML Form Event Attributes</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Five Reasons for why Dark Mode Matters]]></title>
            <link>https://codeburst.io/5-reasons-why-dark-mode-matters-be0cb0fbdf76?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/be0cb0fbdf76</guid>
            <category><![CDATA[design-thinking]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[user-experience-design]]></category>
            <category><![CDATA[user-interface]]></category>
            <category><![CDATA[user-experience]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sat, 31 Oct 2020 01:20:45 GMT</pubDate>
            <atom:updated>2020-12-06T00:12:54.525Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rzRHDUreJJh6U1ud4Hcpg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@bubo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lubo Minar</a> on <a href="https://unsplash.com/@bubo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><blockquote>When it is dark enough, you can see the stars.<em><br></em>― Ralph Waldo Emerson</blockquote><h3>Introduction</h3><p>According to an <a href="https://en.wikipedia.org/wiki/Screen_time#Statistics">American survey,</a> children between the ages of 8–12 and 13–18 spend a daily average of 4 hours 44 minutes, and 7 hours 22 minutes staring at screens (respectively). The data for these numbers were collected in 2019. This figure is higher for adults and, according to an article in the <a href="https://www.washingtonpost.com/technology/2020/03/24/screen-time-iphone-coronavirus-quarantine-covid/">Washington Post </a>earlier this year, the amount of screen time we consume has increased considerably due to <strong>COVID-19.</strong></p><p>Today, mobile devices take up a large percentage of the amount of time that people spend staring at screens; this is why there is a need for applications to have a <strong>dark mode</strong> option for its users. According to Wikipedia, dark mode <em>is a color scheme that uses light-colored text, icons, and graphical user interface elements on a dark background and is often discussed in terms of computer user interface design and web design.</em></p><p>Still unconvinced by the need for dark mode? Let’s look at the top five reasons why dark mode really matters for the end-users of an application!</p><h3>Reasons For Dark Mode</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cktJSXecyhvhUvrcQbCzMA.jpeg" /></figure><h3>1). Visual Attraction</h3><p>When applied in the right way, dark mode can look really appealing to the eye as it provides the opportunity to present a unique user interface to the end-users of an application. In terms of data presentation for graphical contents like dashboards that contain graphs and charts, <strong>Dark Mode</strong> brings out the elegance in the design, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCSLwTUdAeeyyHNBfqT-TA.png" /></figure><p>Unlike the drab white look that most applications have, the above image shows how dark mode can bring a significantly deeper and more attractive visual perception to an application.</p><h3>2). User Experience</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GVP2xOFmmNs32Av8oqaeaQ.png" /></figure><p>Providing the users of a product with the option of a dark mode is a good business decision, especially if the application requires users to spend lots of time on the application. This could be a great option for a streaming site; for example, YouTube. Streaming a video in <strong>light-mode</strong> under a dark environment or at night may not be a good experience for the eyes. Hence, applications that require people to spend lots of screen time should provide an option for dark mode for a better user experience. Above all, it is worthwhile noting that context is a key factor in making decisions on whether to implement the option of a dark mode.</p><h3>3). Eye Strain &amp; Blue Light Removal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5RAf1BeElTuhhCx_gBwkQ.jpeg" /></figure><p>By default, dark mode helps to reduce overall screen brightness. Although no study has outrightly confirmed that dark mode reduces eye strain, it can, however, be effective in low-light conditions. Furthermore, dark mode helps to reduce exposure to <strong>blue light;</strong> a high-frequency color in the “visible light spectrum” that can be seen by the human eye. Blue Light<strong> </strong>can be found almost everywhere, from smartphones to computers to other digital devices. Another source of blue light is the sun, so by stepping out of your house, you are exposed to a certain degree of blue light. The issue with blue light is that too much exposure to it can lead to digital eye strain. Since not everyone can see well with dark mode, some mobile devices provide the option for blue light filters. This can be found in the display settings area and can be easily adjusted to the level of blue light exposure you want.</p><h3>4). Reduction of Photophobia</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSmzQAO-vzICy4Pe9BGp4g.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@phael?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Raphael Brasileiro</a> from <a href="https://www.pexels.com/photo/grayscale-photo-of-an-eye-2558823/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>Photophobia is a symptom of abnormal intolerance to the visual perception of light. The source of this light could be any form of light source including sunlight. There are so many things that can cause photophobia, some of which include:</p><ul><li>Excessive light entering the eyes</li><li>Eye infection</li><li>Medications</li><li>Meningitis</li><li>Lack of eye pigment (Albinism)</li><li>Wearing contact lenses for an extended period of time, or wearing it wrongly.</li><li>Post Eye Surgery</li></ul><p>Photophobia usually disappears once the underlying cause is treated. A good way to deal with photophobia is by making use of the dark mode setting of a mobile device or an application. This helps to reduce the amount of bright light that goes directly into the eyes.</p><p>An extension you may consider installing on your desktop browser is <a href="https://nighteye.app/">Night Eye</a>, which is supported by almost all major web browsers. Night Eye helps you enable dark mode<strong> </strong>and other features across almost all the websites you view, to help cope with the light sensitivity.</p><h3>5). Battery Saver</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5vjmATf3SHabZAXwKhpAg.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@lastly?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Tyler Lastovich</a> from <a href="https://www.pexels.com/photo/black-android-smartphone-on-table-719399/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>Another positive impact of dark mode is the impact that it has on the battery life of mobile devices. Dark mode<strong> </strong>can significantly help reduce the battery drain on devices that use OLED (Organic Light-Emitting Diode) screens. Numerous studies have confirmed the fact that dark mode saves battery life. In an<a href="https://www.youtube.com/watch?v=UljafaxRcEE"> Android Dev Summit</a> in November of 2018, Google also confirmed that themes on android devices have a significant impact on the battery life of a mobile device. If you are using an Android device, you should consider using dark mode, especially at night. Not only is it easy on the eyes, but it also helps save your battery life.</p><h3>Factors To Consider When Selecting Dark Mode</h3><p>As trendy as dark mode seems, it is necessary to consider some factors before deciding to implement it in an application. Some of these factors are discussed below.</p><h4><strong>Readability and Visibility</strong></h4><p>Readability simply means the ease with which a reader can understand or perceive a written text. Applications that contain lots of text in their interface will have to be careful about how dark mode is implemented. If dark mode is not well implemented this will lead to a poor user experience with the users struggling to read the texts. This defeats one of the purposes for which dark mode was created and could lead to eye strain. Lots of research must go into how the backgrounds, text color, and font will work together.</p><h4><strong>Test Before Implementation</strong></h4><p>Testing helps to discover the strengths and weaknesses of the color scheme used in an application. Dark mode does not work well for all applications; for example, a website that contains lots of elements (such as text, images, and tables) may make it difficult for dark mode to be implemented.</p><h4>Other factors to consider include:</h4><ul><li>Determination of the target audience</li><li>Providing an option to switch between Light Mode and Dark Mode</li><li>The Environment</li><li>Accessibility</li></ul><h3>Conclusion</h3><p>The decision to always use dark mode<strong> </strong>should always be a relative one. For users of an application, knowing when to use light mode and dark mode<strong> </strong>at different times of the day is very essential for the eye. Thanks for reading, I hope you found this article helpful!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/5-reasons-why-dark-mode-matters/"><em>https://thecodeangle.com</em></a><em> on October 31, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be0cb0fbdf76" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/5-reasons-why-dark-mode-matters-be0cb0fbdf76">Five Reasons for why Dark Mode Matters</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Ways to Create a Modal Popup Box with HTML, CSS and Vanilla JavaScript]]></title>
            <link>https://javascript.plainenglish.io/4-ways-to-create-a-modal-popup-box-with-html-css-and-vanilla-javascript-4bd1e95d0f92?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bd1e95d0f92</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Tue, 06 Oct 2020 01:02:17 GMT</pubDate>
            <atom:updated>2020-12-06T00:14:09.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KZ1T-RV6SIgIKe96.jpg" /></figure><h3>Introduction</h3><p>When creating the design of a web page, one of the most important things to be into consideration is user interactivity. A good example of user interactivity is the Modal box.</p><p>A modal box mostly appears as a message box in the Browser based on an action performed by a user. The modal box comes in different forms and shapes which includes the Alert box, Flash notification box, Dialog box, Lightbox. Etc.</p><p>The unique feature of the modal box is the fact that it disables the main window in the browser but keeps it visible, with the modal window showing as a child window in front of the web page.</p><p>Some of the important cases for using a modal in an application include:</p><ul><li>Showing warnings for a certain course of action that may be irreversible.</li><li>Flash notifications on a new piece of information.</li><li>Increase in user interaction and engagement.</li></ul><p>Modals have their disadvantages too, in that:</p><ul><li>They can interrupt a user workflow.</li><li>They immediately demand the attention of the user.</li><li>They disable the contents in the background, which could be frustrating in some cases.</li></ul><p>Now let us get started with the creation of the modals.</p><h3>Sample 1</h3><p>The flow of the tutorial will see us create three files, the <strong>index.html, style.css</strong> and <strong>app.js </strong>files, over four samples. Then we give a detailed breakdown of the code in each of these files.</p><blockquote><strong><em>index.html</em></strong></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8c21f3a3a3ead007b47ac11f13c17e9/href">https://medium.com/media/a8c21f3a3a3ead007b47ac11f13c17e9/href</a></iframe><p>In the index markup page above, we have a <a href="https://fontawesome.com/">Font Awesome</a> script within the head tag<a href="https://fontawesome.com/">,</a> which we will be using inside the modal box to display an icon. We also linked the CSS and JavaScript pages on the index page.</p><p>In the body of the index page, we have some important <strong>HTML</strong> attributes like the <strong>id’s </strong>which will be used later in our JavaScript file to manipulate the page.</p><p>Then lastly in our button tag, we have an <strong>onclick </strong>event attribute which has an <strong>Alert </strong>function that gives us the functionality to display the modal message on the page.</p><blockquote><strong><em>style.css</em></strong></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68c42a1f0630b4016019c42e04041a8d/href">https://medium.com/media/68c42a1f0630b4016019c42e04041a8d/href</a></iframe><p>In the <strong>style.css</strong> file, we set the <strong>box-sizing</strong> of our page to<strong> border-box</strong>. This property allows us to include the padding and border in an element’s total width and height.</p><p>Then we styled our button with the<strong> .btn</strong> class. This allows us to position the button that allows us to display the modal at the centre of the page.</p><p>Lastly, using the <strong>#popUpBox, </strong>we can position the modal at the centre of the page.</p><p>With the <strong>z</strong>- <strong>index</strong> property, we can stack the modal in front of the other elements in the page.</p><p>The most important thing to take note of in the <strong>style.css</strong> file is the fact that we set the initial state of the display property as <strong>none. </strong>The reason for this will be explained in the <strong>app.js file.</strong></p><blockquote><strong><em>app.js</em></strong></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac26e8a361df5a02b7f86cd466e871bf/href">https://medium.com/media/ac26e8a361df5a02b7f86cd466e871bf/href</a></iframe><p>Here, we have a global variable called <strong>Alert, </strong>which instantiates a function called <strong>CustomAlert(). </strong>Inside this function, we:</p><ul><li>Accessed the <strong>#popUpBox (id). </strong>With this, we set the display as <strong>block</strong> which shows the modal when the <strong>button </strong>tag is clicked. Remember, the initial state was set as <strong>none </strong>in the CSS file.</li><li>Closed the modal by accessing the <strong>closeModal (id) </strong>in the <strong>HTML </strong>file. With this we able to set an HTML Button tag, with an <strong>onclick </strong>event attribute. In there we declared a function called<strong> ok().</strong></li><li>Finally, referencing the <strong>ok() </strong>function, we set the CSS properties of the modal to none, when the button gets clicked.</li></ul><p>With that, we should have the result below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AGTXsPI3s4ovBEhwG0xMww.gif" /><figcaption>sample 1 modal</figcaption></figure><h3>Sample 2</h3><p>We start with the <strong>index.html, style.css</strong> and <strong>app.js </strong>files respectively.</p><blockquote><strong>index.html</strong></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c829b2be7cc1f2f6d47a2fc643ec8aab/href">https://medium.com/media/c829b2be7cc1f2f6d47a2fc643ec8aab/href</a></iframe><p>From the above, we have the relevant links to our <strong>CSS</strong> and <strong>JavaScript</strong> files. Then in the body of the index page, we have an <strong>input</strong> tag with the type of <strong>Button</strong>.</p><p>We also have an <strong>onclick </strong>event attribute, with an <strong>alert()</strong> method containing a text that will be displayed in the modal.</p><blockquote>style.css</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2190b603478ae63987a443e25aa0b81f/href">https://medium.com/media/2190b603478ae63987a443e25aa0b81f/href</a></iframe><p>Here we:</p><ul><li>Styled our button with the <strong>.btn</strong> class that was declared in the <strong>index.html</strong> file</li><li>Then we have <strong>modalContainer, alertBox, alertBox h1, alertBox p, alertBox, closeBtn ID’s. </strong>All these are created in the <strong>app.js</strong> file. A different approach from how we created the modal in <strong>Sample 1.</strong></li></ul><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/99f01f8e816957a42c43ededff7ce776/href">https://medium.com/media/99f01f8e816957a42c43ededff7ce776/href</a></iframe><p>Here we break things down into 6 different parts:</p><ul><li>First, we set two global variables called <strong>closeModal</strong> and <strong>titleAlert </strong>which both hold the text that will be displayed in the modal box.</li><li>We declared a <strong>createCustomAlert() </strong>function. This is where we create the body of our modal, displayed on the page.</li><li>Then we created a <strong>div </strong>inside the body tag, assigned the <strong>modalContainer ID </strong>to it and then set the height to the scroll height of the page</li><li>The <strong>div</strong> for the body of the alert box was created next. We assigned the <strong>alertBox ID </strong>to it. We then set the modal to be at the centre of the page, while also setting the style to be visible.</li><li>Next, we set the title of the modal box by creating an <strong>h1 </strong>tag. The <strong>titleAlert </strong>text variable is then appended to the <strong>h1 </strong>tag to show the <strong>“It Pops!!!”</strong> message. We did something similar to the body of the modal, by creating a <strong>p </strong>tag and assigning a text node to it.</li><li>Lastly, we created a function called <strong>removeCustomAlert() </strong>to close the modal box. We do this by creating an <strong>a </strong>tag, adding a <strong>closeBtn ID </strong>to it and creating an <strong>onclick </strong>event handler that references the function that closes the modal.</li></ul><p>With that, we should have the result below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O95rimjmFwtGWdpCSWqNzQ.gif" /><figcaption>sample 2 modal</figcaption></figure><h3>Sample 3</h3><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1bca7f6f77cacefa188ffe7549320be/href">https://medium.com/media/d1bca7f6f77cacefa188ffe7549320be/href</a></iframe><p>In the index markup page above, we have a <a href="https://fontawesome.com/">Font Awesome</a> script within the head tag<a href="https://fontawesome.com/">,</a> which we will be using inside the modal box to display an icon. We also linked the CSS and JavaScript pages on the index page.</p><p>There is also two <strong>pop() </strong>functions declared in on the page, which we will be referring to in the <strong>app.js </strong>file.</p><blockquote>style.css</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46f6225508861b27e013ccbd1039cd66/href">https://medium.com/media/46f6225508861b27e013ccbd1039cd66/href</a></iframe><p>The styling above is straight forward. It is worthy to note that we set our <strong>#btn ID </strong>to a display of none, at the initial stage. We will be toggling the display property in the<strong> app.js</strong> file.</p><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e330e2494de57ea7b11380e8c450a4f7/href">https://medium.com/media/e330e2494de57ea7b11380e8c450a4f7/href</a></iframe><p>We start by setting a global variable called <strong>modal</strong> to null. Then we refer to the <strong>pop() </strong>function from the <strong>index.html</strong> page, afterwards, we set the conditional state of the modal.</p><p>If the modal is null at first and it gets clicked, we set the display to <strong>block </strong>and the modal variable to <strong>true</strong> to show the modal, and if the close button is clicked, we then set the display to <strong>none </strong>and the modal variable to <strong>null</strong> to remove the modal.</p><p>With this, we should have the result below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHeejTl2Tq2jbEt6m2URpA.gif" /><figcaption>sample 3</figcaption></figure><h3>Sample 4</h3><blockquote>index.html</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/612b7b04e7c49f5b14cda3b4dee70c4e/href">https://medium.com/media/612b7b04e7c49f5b14cda3b4dee70c4e/href</a></iframe><p>Here we will be making use of <strong>CSS</strong> classes instead of <strong>ID’S</strong> to manipulate the state of our modal. We have a button tag to sho the modal and a span with the letter “ <strong>X</strong> “ to close the modal.</p><blockquote>style.css</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3c50bc94a5711e4570c2927d9985b8f/href">https://medium.com/media/d3c50bc94a5711e4570c2927d9985b8f/href</a></iframe><p>Here we styled our button and our modal. The <strong>.modal </strong>class has an initial state, whose <strong>visibility</strong> is hidden. We will toggle this with a JavaScript function to show the modal.</p><blockquote>app.js</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75ff589eeb6cd1d5371c02e2e094fafe/href">https://medium.com/media/75ff589eeb6cd1d5371c02e2e094fafe/href</a></iframe><p>We are doing three things from the above:</p><ul><li>We get access to our HTML classes through the <strong>querySelector. </strong>The <strong>querySelector()</strong> method returns the first element that matches a specified CSS selector(s) in the document.</li><li>Then we created a <strong>toggleModal() </strong>function that toggles the <strong>show-modal </strong>class in the CSS.</li><li>Then finally, we added event listeners to our functions to toggle the state of the modal based on a certain condition when the button is clicked.</li></ul><p>With this, we should have the result below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4euKX4TYicSmxFjeqtzs6A.gif" /><figcaption>sample 4</figcaption></figure><h3>Conclusion</h3><p>So there goes the implementation for our 4 Modals. You can style it however you want and implement it in any project you are working on. I know the design may not be the best, but the goal of the article was more focused on the JavaScript implementation rather than the design.</p><p>The link to the code can be found here on <a href="https://github.com/desoga10/modal-popup">Github</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/4-ways-to-create-a-modal-popup-box-with-html-css-and-vanilla-javascript/"><em>https://thecodeangle.com</em></a><em> on October 6, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bd1e95d0f92" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/4-ways-to-create-a-modal-popup-box-with-html-css-and-vanilla-javascript-4bd1e95d0f92">4 Ways to Create a Modal Popup Box with HTML, CSS and Vanilla JavaScript</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular vs React vs Vue — Getting Started]]></title>
            <link>https://medium.com/weekly-webtips/angular-vs-react-vs-vue-getting-started-52e8cad74ba8?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/52e8cad74ba8</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sun, 13 Sep 2020 03:04:18 GMT</pubDate>
            <atom:updated>2020-12-06T00:06:42.554Z</atom:updated>
            <content:encoded><![CDATA[<h3>Angular vs React vs Vue — Getting Started</h3><figure><img alt="Angular vs React vs Vue — Getting Started" src="https://cdn-images-1.medium.com/max/1024/0*qelsK9WKdmJzHlDZ.png" /></figure><blockquote><em>The only way to learn a new programming language is by writing programs in it.</em></blockquote><blockquote>― <em>Dennis Ritchie</em></blockquote><h3>Table of Content</h3><ol><li><a href="#78c2"><strong>Introduction</strong></a></li><li><a href="#31e4"><strong>History</strong></a><strong><br></strong>2.1 <a href="#ca3f"><em>Angular</em></a><em><br></em>2.2 <a href="#bd8d"><em>React</em></a><em><br>2.3 </em><a href="#99e3"><em>Vue</em></a></li><li><a href="#31e9"><strong>Requirements &amp; Installation Process<br></strong></a><strong> </strong><em>3.1 </em><a href="#d601"><em>Angular</em></a><em><br>3.2 </em><a href="#f601"><em>React</em></a><em><br>3.3 </em><a href="#9d34"><em>Vue</em></a></li><li><a href="#dc7c"><strong>Conclusion</strong></a></li></ol><h3>Introduction</h3><p>As we all know, Javascript is the heart and soul of frontend web development. To build complex web applications, using vanilla javascript is probably not the right choice as you may end up pulling the hair out of your head.</p><p>To make things easier and product development faster, a library like <strong>j</strong>Query was introduced in 2006.</p><p>Later on, in 2010 <strong>A</strong>ngular js was created by Google. It became the first framework that provided a complete architecture for <strong>front-end</strong> application development.</p><p>Fast forward to today, and we have the big 3 that dominate the world of frontend web development ( <strong>Angular, React, and Vue</strong>)</p><p>Each of these tools is unique and can perform the same function effectively. One fact that cannot be ignored is that there will always be a debate about which is better among the three, but in this article, our focus is on how to set them up on our machine.</p><h3>History</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cgRBF5McpAzJYGlkfiyibw.jpeg" /></figure><h3>Angular</h3><p>Initially released by Google on<strong> 14th September 2016. </strong>It is completely different from <strong>A</strong>ngular Js which was created years earlier by the Google team. <strong>Angular</strong> was created to serve as an alternative to <strong>A</strong>ngular Js which has been placed on long-term support until <em>December 31, 2021.</em></p><p><strong>Angular</strong> is written in Typescript, which is a superset of Javascript. The <strong>Angular</strong> team is committed to making a major release once every 6 months.</p><p>As of today, the latest release is version 10 which was released June 24, 2020.</p><h3>React Js</h3><p>Initially released on May 29, 2013, it is maintained by Facebook and a community of developers.</p><p><strong>React </strong>is written in Javascript and it is regarded as the most popular and widely used between <strong>Angular</strong> and <strong>Vue</strong>.</p><p>The current stable version is 16.13.1, released on March 19, 2020.</p><h3>Vue.js</h3><p>Also called <strong>Vue </strong>is also an open-source JavaScript library just like <strong>R</strong>eact. It makes use of the <strong>model-view-viewmodel</strong> structure.</p><p><strong>Vue Js</strong> is written in Javascript. The current stable release is on August 20, 2020.</p><h3>Requirements &amp; Installation Process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KA4EV9mLkQ5vkVNcqqcFTw.jpeg" /></figure><h3>ANGULAR</h3><p>We are going to install and run the Angular application in 4 easy steps:</p><h3>Step 1: Download Node.js</h3><p>To use Angular, the first step is to install Node.js. Node.js is an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications.</p><p>The installation of Node comes along with <strong>NPM</strong>(Node Package Manager). NPM is the tool we will be using in the terminal to install other 3rd party libraries needed to run an Angular application.</p><p>If you don’t have Node.js installed on your machine, you can do that <a href="https://nodejs.org/en/download/">here</a></p><h3>Step 2: Install The Angular CLI</h3><p>Once Node.js has been installed on your machine, this stage involves installing the Angular CLI. We can do this by opening the terminal and running the command below:</p><pre>npm install -g @angular/cli</pre><p>Once the installation process is complete, you can type <strong><em>ng v </em></strong>in the terminal to confirm if it was successfully installed. That command will display the version of Angular you have running on your machine.</p><h3>Step 3: Create a New Angular Project</h3><p>Now that the Angular CLI has been installed, we now have access to the <strong>ng</strong> command in our terminal.</p><p>To create a new project we can run the command below:</p><pre>ng new my-first-project</pre><p>Once the installation process is complete and the needed dependencies and files downloaded, the next thing to do is to navigate into the project directory. We can do this by running the <strong>cd my-first-project </strong>command in the terminal<strong>.</strong></p><h3>Step 4: Run The Application</h3><p>To run the application and display it on the browser, we will run another command from the terminal, shown below:</p><pre>ng serve --open</pre><p>Once this command has executed successfully, a tab should open in the browser showing the <strong>Angular</strong> boilerplate template</p><p>We just successfully run an Angular application. By default, our application will be running on <strong>localhost:4200</strong></p><h3>Addition</h3><p>To prepare and bundle our app for production, we can run the<strong> ng build -prod</strong> command in the terminal. This will minimise and bundle our application making it ready for deployment.</p><h3>REACT.JS</h3><p>We will work on two different ways of setting up a React project. The first one will be done using the <strong>create-react-app</strong> command, and the second one will be set up using <strong>Webpack and Babel</strong>.</p><h3>Using The create-react-app Command</h3><p>This will be done in two(2) easy steps.</p><h3>Step 1: Install create-react-app</h3><p>To have access to the <strong>create-react-app command</strong>, we need to install it on the terminal using npm. The command to that is shown below:</p><pre>npm i create-react-app</pre><h3>Step 2: Create Project With NPX</h3><p>We can now create a new project using <em>npx</em>. <em>npx </em>is a package runner tool that comes with npm version 5.2 and above. It allows us to create a new React project from the terminal by running the command below:</p><pre>npx create-react-app my-first-app cd my-first-app npm start</pre><p>Above we created a new project called my-first-app , we moved into the newly created project directory and started the project with <em>npm.</em></p><p>By default, our project will be running on <strong>localhost:3000 </strong>in the browser. To prepare and bundle our app for production, we can run the<strong> npm run build</strong> command in the terminal.</p><h3>Using Webpack and Babel</h3><p>This involves a much longer process to run React. It will be done in 7 steps.</p><h3>Step 1: Create The Project Folder</h3><p>To install React using this method, we will create a new folder to install all the required dependencies. We can do this with the command below:</p><pre>C:\Users\user&gt; mkdir my-first-react-app C:\Users\user&gt; cd my-first-react-app</pre><h3>Step 2: package.json</h3><p>To install any dependencies, a <em>package.json</em> file is required to be installed in the project. To do this, we will run the <strong>npm init</strong> command in our project directory, from the terminal.</p><pre>C:\Users\user\my-first-react-app&gt; npm init</pre><p>The above command will require some information like the name, author, description version etc. to be filled in the terminal. A sample of this can be found below:</p><p>You can skip filling all the data above by adding a <strong>-y </strong>flag to the<strong> npm init</strong> command.</p><h3>Step 3: Install React and React Dom</h3><p>So for React to work on our project, we need to install React and React Dom. To do this, we will run the command below:</p><pre>C:\Users\user\my-first-react-app&gt; npm install react C:\Users\user\my-first-react-app&gt; npm install react-dom</pre><h3>Step 4: Install Webpack and Babel</h3><p>Let’s start with Webpack. Webpack is going to require three things to be installed.</p><pre>C:\Users\user\my-first-react-app&gt;npm install webpack webpack-dev-server webpack-cli --save</pre><p>Next up to install is Babel. Some of the Babel dependencies we are going to install include:</p><ul><li><strong>babel preset env — </strong>This package allows the compiling modern Javascript down to ES5.</li><li><strong>babel preset react </strong>— This package allows the compiling JSX down to Javascript</li><li><strong>babel-loader — </strong>This package allows transpiling JavaScript files using Babel and Webpack.</li><li><strong>babel-core — </strong>Gives us access to the Node API.</li></ul><p>Now let us install them by running the command below:</p><pre>C:\Users\user\my-first-react-app&gt;npm i @babel/core babel-loader @babel/preset-env @babel/preset-react html-webpack-plugin --save-dev</pre><p>Babel is now installed!</p><h3>Step 5: Create All Necessary Files</h3><p>We need to create the files needed for us to set up and bootstrap the application. These files are going to be created in the root folder <strong>(my-first-react-app </strong>) of the application. They include:</p><h3>Step 6: Configure Rules, Loaders, and Dev Servers</h3><p>Next step is to open up the files and complete the setup. We start with the <strong>index.html </strong>file<strong>.</strong></p><p><strong>index.html</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f31575b855bcc4f20267ede107ea88ee/href">https://medium.com/media/f31575b855bcc4f20267ede107ea88ee/href</a></iframe><p>The important thing to take note of in our<strong> index.html</strong> file is the div with the id called <strong>app.</strong></p><p><strong>App.js</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ace7ece38274afb7381055a72df490f5/href">https://medium.com/media/ace7ece38274afb7381055a72df490f5/href</a></iframe><p>This is the part of our code that will be shown in the browser. When we eventually run the application, we should see a <strong>Hello world</strong> text.</p><p><strong>index.js</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef2fc66d0e8564dd433bb43bcff49c56/href">https://medium.com/media/ef2fc66d0e8564dd433bb43bcff49c56/href</a></iframe><p>The <strong>App.js </strong>is imported into the <strong>index.js</strong> file, this enables us to render it into the browser.</p><p><strong>webpack.config.js</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e31690990d4752ba543bb96ef637162/href">https://medium.com/media/1e31690990d4752ba543bb96ef637162/href</a></iframe><p>From the above code, we set the entry point of the application as <strong>index.js.</strong> Then the output path is where we will bundle the app for production. This will be done inside the <strong>dist</strong> folder.</p><p>In the mode object, we can either set the app to be bundled for either production or development mode. This will be done in the <strong>package.json</strong> file</p><h3>Step 7: Setup package.json File</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11b3430a12d4894828d4d31a15b04046/href">https://medium.com/media/11b3430a12d4894828d4d31a15b04046/href</a></iframe><p>On opening the<em> package.json</em> file, you may come across <strong>“test” “echo \”Error: no test specified\” &amp;&amp; exit 1″ </strong>inside the scripts object. You should clear it off and post the above code in the scripts object.</p><p>Now inside the root of our application, we can start our application with the command below, like so:</p><pre>C:\Users\user\my-first-react-app&gt;npm start</pre><p>The app will run on <a href="http://localhost:8080/"><strong>http://localhost:8080</strong></a> by default. If we go to this address on the browser, we should see <strong>Hello World</strong> on display.</p><p>To generate the bundle needed for deployment, we can run the command below in the terminal.</p><pre>C:\Users\user\my-first-react-app&gt;npm run build-for-windows</pre><p>So that is how <strong>React</strong> can be created using <strong>Babel</strong> and <strong>Webpack</strong>.</p><h3>VUE.JS</h3><p>We will be setting up <strong>Vue</strong> with the <strong>Vue CLI</strong>. This will be done using <strong>yarn</strong> in 3 easy steps.</p><p><strong>Note: </strong><em>In case you don’t have yarn installed on your machine, you can install it with</em><strong> npm </strong>by running the<strong> npm i yarn</strong> command.</p><h3>Step 1: Install The Vue CLI</h3><p>We do this by running the command below:</p><pre>yarn install -g vue-cli</pre><p>With this, we have installed <strong>Vue</strong> globally on our machine.</p><h3>Step 2: Create a New Vue Project</h3><p>To complete this step we run the command below:</p><pre>vue create first-vue-app</pre><p>This will show the options below in the terminal.</p><pre>Vue CLI v4.5.6 Please pick a preset: (Use arrow keys) <br>&gt; default (babel, eslint) <br>Manually select features</pre><p>To keep things at a basic level, we can select the default option.</p><h3>Step 3: Run Vue App</h3><p>To run the application, we need to move into the project directory which is <strong>first-vue-app </strong>with the command below:</p><pre>cd first-vue-app yarn serve</pre><p>Now, the project will become accessible at <a href="http://localhost:8080/"><strong><em>http://localhost:8080/</em></strong></a><strong><em> </em></strong>by default in your browser!</p><h2>Conclusion</h2><p>So that is pretty much everything that is needed to set up an <strong>Angular,</strong> <strong>React</strong> or <strong>Vue</strong> application. If you have any issue during the installation process, please feel free to drop a comment, I will be sure to respond to it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/angular-vs-react-vs-vue-getting-started/"><em>https://thecodeangle.com</em></a><em> on September 13, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52e8cad74ba8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weekly-webtips/angular-vs-react-vs-vue-getting-started-52e8cad74ba8">Angular vs React vs Vue — Getting Started</a> was originally published in <a href="https://medium.com/weekly-webtips">Webtips</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The A-Zs of Web Development]]></title>
            <link>https://codeburst.io/the-a-z-of-web-development-9b97808df1b5?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b97808df1b5</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sat, 22 Aug 2020 02:54:57 GMT</pubDate>
            <atom:updated>2020-12-06T00:16:18.523Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CzlZ3zxf8V-qRre4.jpg" /></figure><blockquote>Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime.</blockquote><blockquote>― Muhammad Waseem</blockquote><h3>Introduction</h3><p>As we all know, web development is a vast and wide field that encompasses a range of career paths. Often this can be overwhelming for newcomers to the industry as they are tasked with trying to figure out which path is right for them. For example, careers abound in many fields including mobile app development, UI and UX design, game development, software testing, database administration, system analysis, and SEO (to name but a few). The goal of this article is not to dive into the details of each career option but rather to introduce newbies to some of the various technical terms that are common in the world of web development.</p><h3>AJAX</h3><p>AJAX is a tool used by web developers to build interactive web applications and enables developers to send and receive data without refreshing a web page. AJAX relies on HTML and CSS to render a markup, and JavaScript to get data asynchronously from the server.</p><h3>Accessibility</h3><p>Accessibility is the practice of making a website or application accessible to everyone, especially people with disabilities. The benefits of making a website accessible to everyone cannot be over-emphasized. Tim Berners-Lee, the W3C Director and inventor of the World Wide Web, highlights this point in his statement that “the power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”</p><p>Accessibility is important for both the developers and users of an application and can be the difference between a product being seen as high or low quality in the market.</p><h3>API</h3><p>API is a set of instructions that allows data to be shared between different software components, through making requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZ9mFC-nm0o81RMEgLLBSw.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@padrinan?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Miguel Á. Padriñán</a> from <a href="https://www.pexels.com/photo/web-text-1591060/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>Browser</h3><p>This is a very familiar term. Simply put, a browser is a software application that enables users to access data on the internet. Some of the most popular browsers today include Google Chrome, Mozilla Firefox, and the newly updated Microsoft edge. Each of these browsers is being powered by an engine. For instance, Google Chrome is powered by V8, and Firefox is powered by Spider Monkey.</p><h3>CSS</h3><p><strong>CSS</strong> stands for <strong>C</strong>ascading <strong>S</strong>tyle <strong>S</strong>heet. It is a stylesheet language that is used to describe how the documents of a page, written in a markup language(HTML), is being presented. Initially released on December 17, 1996, CSS is among the essential languages of the open web. The specifications for CSS are maintained by the World Wide Web (W3C).</p><h3>CDN</h3><p>This simply means a <strong>C</strong>ontent <strong>D</strong>elivery Network. A CDN is a network of servers distributed across various geographical locations of the world. The goal of using a CDN<strong> </strong>is to have a good user experience in terms of speed and preventing a website from crashing in the event of a high traffic surge.</p><h3>CMS</h3><p>CMS stands for <strong>C</strong>ontent <strong>M</strong>anagement <strong>S</strong>ystem. This is a software application that provides a digital solution for building, managing, and modification of a website’s content. CMS makes this all possible without any need for technical knowledge of writing code from scratch. Some of the most popular content management systems out there include WordPress, Drupal, Shopify, Joomla, and Magneto. WordPress has the largest market share and powers more than 37.7% of all websites on the internet!</p><h3>Domain Name</h3><p>According to Wikipedia, a domain name is an identification string that defines a realm of administrative autonomy, authority, or control within the internet. Breaking this definition down further, a domain name simply means the physical address of a website. According to <a href="https://www.verisign.com/"><strong>Verisign</strong></a>, a global provider of Domain name registry services, there was an estimation of 334.6 million registered domain names across all TLDs at the end of the second quarter of 2016. Typically, A domain name can only be up to 63 characters long (including letters, numbers, or combination) in addition to the four characters used to identify the domain extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*554jvJa70pPhbIVTcQ0Zag.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@tranmautritam?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Tranmautritam</a> from <a href="https://www.pexels.com/photo/information-sign-on-shelf-251225/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>Deployment</h3><p>Deployment refers to all the processes involved in making software available for use. The deployment process involves different types of environments ranging from the local environment to the development environment and then the staging environment. The number of deployment environments needed to be set up in the shipping of a software depends on the structure of a project.</p><h3>DevOps</h3><p>Also known as Development (Dev) and Operations (Ops), this is the combination of a set of tools, people, and products aimed at delivering software at a faster pace. DevOps enhances continuous integration to provide a quality product to the end-users. Some well known DevOps<strong> </strong>tools used in this process include Docker, Github, Jenkins, and Slack.</p><h3>EcmaScript</h3><p>ECMAScript is a general-purpose programming language that can be used to build both client-side and server-side applications. It is standardized by ECMA International, which determines what new features can be added to the language. The language is also 100% backwards compatible, meaning that any code written today will be supported in the future.</p><h3>FrameWork</h3><p>A framework is a platform used for developing software applications that comes with a pre-defined way of building web applications. The advantage of this is that the development process of an application is streamlined meaning that software developers do not need to re-invent the wheel every time they set to work. Some popular frameworks out there include Angular, Laravel, Django, and ASP.net.</p><h3>Git</h3><p>Initially released on the 7th April 2005, Git is an integral part of the Web Development process. It is a free and open-source version control system that is designed to manage both small and large scale projects. Git helps developers to track the changes made when writing a piece of code. In summary, Git provides flexibility, security, and high performance to developers.</p><h3>HTTP</h3><p><strong>H</strong>yper<strong>T</strong>ext <strong>T</strong>ransfer <strong>P</strong>rotocol is an application-layer protocol used to transmit data between the client-side and the server-side servers. This involves the browser sending a request to the server, the request getting processed by the server, and finally the server returning an HTTP<strong> </strong>response to the Browser. The first documented version of HTTP was documented in 1991.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsKBksV4VkFKeW229joZ3Q.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@startup-stock-photos?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Startup Stock Photos</a> from <a href="https://www.pexels.com/photo/schedule-planning-startup-launching-7376/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>IDE</h3><p>Standing for Integrated Development Environment, IDEs enhance the productivity of programmers by making available the various utilities required to put together an application without the need to set an application up manually. Some popular IDEs include IntelliJ, Eclipse and Visual Studio.</p><h3>JSON</h3><p>JSON stands for <strong>J</strong>ava<strong>S</strong>cript <strong>O</strong>bject <strong>N</strong>otation, a lightweight data-interchange format. Derived from JavaScript, JSON has been adopted by many programming languages and is supported by most modern Browsers, <strong>JSON</strong> helps to easily transfer data between a server and a client. JSON is an alternative to XML.</p><h3>Keyword Optimization</h3><p>This is mostly about driving traffic to a particular website and involves the process of utilizing keywords and phrases on a web page, thereby making it easier for people to find content. It should be noted that a lot of research is needed to know the right keywords to use but luckily there are premium tools available that make this process easier by providing valuable data and statistics.</p><h3>LAMP</h3><p><strong>L</strong>inux, <strong>A</strong>pache, <strong>M</strong>ySQL, <strong>P</strong>HP/ <strong>P</strong>erl/ <strong>P</strong>ython is a popular open-source web stack used for web application development and deployment. Open-source applications like WordPress and Drupal make use of the LAMP stack. This stack provides the flexibility needed to scale a product to meet its required needs.</p><h3>Library</h3><p>Similar to a framework, a library can be described as a collection of configured data and scripts that has the end goal of automating the process of writing code. In the case of a framework (where most of the processes are predefined), a library gives you a high degree of control over how the flow or architecture of the software could be designed. Examples of libraries in the world of front-end web development include jQuery, Twitter Bootstrap, Angular JS, and React JS.</p><h3>MVC</h3><p>MVC stands for <strong>M</strong>odel, <strong>V</strong>iew, and <strong>C</strong>ontroller. It is a software pattern found in almost all programming languages. The <strong>Model</strong> determines how the data is structured, the View represents the user interface, and the<strong> </strong>Controller handles the request made by the client which (typically through an <strong>HTTP</strong> request). A popular framework that makes use of MVC’s separation of concern principle out of the box is Angular (which does this by generating four separate files for a single component).</p><h3>MVP</h3><p>MVP stands for <strong>M</strong>inimum <strong>V</strong>iable <strong>P</strong>roduct and is the first step to take when it comes to product development. Taking this approach has a lot of advantages, especially for startups as it helps to cut costs and minimize risk in the event where the product fails. Companies like Facebook, Dropbox, Twitter, Aardvark all started as MVPs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hg5kzIpPfOG2phRYBqeXEg.jpeg" /></figure><h3>Node.js</h3><p>Created by Ryan Dahl and released on May 27, 2009, Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a web browser. Node.js enables developers to write JavaScript on the server, as well as the creation of dynamic web pages. It is used by big corporations like Microsoft, Netflix, Uber<strong>, </strong>Medium.</p><h3>OOP</h3><p>OOP stands for <strong>O</strong>bject-<strong>O</strong>riented<strong> P</strong>rogramming. In adopting the use of objects, OOP offers advantages such as creating software that is readable, reusable, accessible, and scalable. Programming languages that make use of OOP include JavaScript, Java, C++, C#, Python, PHP &amp; Ruby.</p><h3>Plugin</h3><p>A Plugin is a piece of software component that is added to a program in order to give it additional functionalities. Some of the places where a plugin could be added include a website or a browser. Plugins are vital in the sense that they help to enhance the functionalities, features, and performance of a program.</p><h3>Query</h3><p>A Query simply means a request made to a database to get a set of data. This can be done through a <strong>S</strong>tructured<strong> Q</strong>uery <strong>L</strong>anguage <strong>(SQL).</strong></p><h3>Regular Expression</h3><p>A <strong>R</strong>egular <strong>E</strong>xpression (also called <strong>R</strong>egex or <strong>R</strong>egexp) can be said to be a set of strings used to match a specific pattern. Regex makes it much easier to perform search operations, especially with a very large dataset. It is worthwhile noting that Regexp is not specific to a particular programming language.</p><h3>REST</h3><p>REST is an architectural pattern used for designing web services. A web service built on the principles of REST can be called a RestFul web service. REST supports different types of data formats including Plain text, HTML, XML, and JSON. A RestFul web service is built over an HTTP and can make use of terms such as GET, POST, PUT, PATCH, and DELETE to perform its function.</p><h3>SOAP</h3><p>SOAP stands for <strong>S</strong>imple<strong> O</strong>bject<strong> A</strong>ccess <strong>P</strong>rotocol and was designed in 1998 by Dave Winer. It is an XML-based protocol for accessing web services. SOAP does not support different data formats such as Plain text, HTML, or JSON. SOAP was created to ensure the easy exchange of data between programs built on different platforms in a secure manner</p><h3>SSL</h3><p>First developed by Netscape in 1995, SLL stands for <strong>S</strong>ecure <strong>S</strong>ockets <strong>L</strong>ayer and was designed to ensure privacy and protect sensitive data transferred between different systems. One of the ways to know if a website is secured with SSL is when the URL says<em> “https://”</em> and not <em>“http://”</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CN051zrJsXvWP6KwZfVfow.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@startup-stock-photos?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Startup Stock Photos</a> from <a href="https://www.pexels.com/photo/ideas-whiteboard-person-working-7369/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>TLS</h3><p>The<strong> T</strong>ransport <strong>L</strong>ayer <strong>S</strong>ecurity is the successor to SSL. It performs the same function as SSL with a very slight difference in execution.</p><h3>TDD</h3><p>TDD stands for <strong>T</strong>est<strong>-D</strong>riven<strong> D</strong>evelopment and is a software development approach that emphasizes the need to write tests before shipping code to production. The purpose of TDD is to write clean and bug-free code.</p><p>TDD typically involves the following five cycles:</p><ul><li>Develop and design a test</li><li>Run a test and confirm the Test Fails</li><li>Write the code to pass the test</li><li>Run test to confirm if the test passes</li><li>Refactor code and repeat the process</li></ul><h3>Text Editor</h3><p>A text editor is a software that web developers use to create and develop web applications. Some text editors have simple features while others have complex functionalities. Selecting which type of text editor to use depends on the application that the developer is trying to build. Most text editor comes with basic features such as copy and paste, search and replace, undo and redo, and so on. Some popular text editors include Notepad++, Visual Studio Code, Atom, and Sublime Text.</p><h3>UI &amp; UX Design</h3><p>User Interface (UI) and User Experience(UX) in web development are two separate concepts that work hand-in-hand and are crucial to the design process of a particular product.</p><p>UI focuses on the visual aspect of the design of a product. It is the aspect that a user will interact with on a product (such as a video, document, text, images, and so on). UX, on the other hand, focuses on the overall experience of a user on a website or application. That is, it tries to focus on the emotion of a user towards a product.</p><p>The combination of both UI and UX ensures that an application&#39;s user the user receives the best possible experience in terms of functionality, satisfaction, and usability; which is the desire of a successful product.</p><h3>Version Control</h3><p>Also known as source control, version control is a system that allows users to keep track of changes made in a file, document, or any form of information collection source. Version control is mainly used for tracking changes made to a piece of code. As the code used to build an application becomes more and more complex, the need for version control becomes important due to its ability to introduce a degree of organization and sanity to the process.</p><p>Version Control can be divided into two major categories: Centralized and Decentralized systems. An example of a popular version control system is <a href="https://git-scm.com/"><strong>GIT</strong></a><strong> </strong>which is free and open source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mm8kej5HChd9NIIYQrXoXg.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@divinetechygirl?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Christina Morillo</a> from <a href="https://www.pexels.com/photo/woman-sitting-while-operating-macbook-pro-1181676/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><h3>Web Standards</h3><blockquote>W3C standards define an <strong>Open Web Platform</strong> for application development that has the unprecedented potential to enable developers to build rich interactive experiences, powered by vast data stores, that are available on any device.</blockquote><blockquote><em>– </em><a href="https://www.w3.org/standards/"><strong><em>www.w3.org/standards</em></strong></a></blockquote><p>The web has come a long way to get where it is today; growing in leaps and bounds and becoming an integral part of society along the way. Due to this massive growth, it is only fitting to have independent bodies that govern the way the web works so as to prevent developers from incorrectly doing things.</p><h3>XSS</h3><p>XSS<strong>,</strong> also known as <strong>C</strong>ross-<strong>S</strong>ite <strong>S</strong>cripting, is a web security vulnerability that allows hackers or attackers to infiltrate and inject malicious scripts into a web page. This is usually done through the browser by bypassing access controls such as the same-origin policy.</p><p>Preventive measures that can be taken against XSS attacks include:</p><ul><li>Keeping software updated</li><li>Sanitizing input fields</li><li>Using a web firewall application</li><li>Adopting both Client-side and Server Side validation</li><li>Selectively disabling scripts on the browser</li></ul><h3>YAML</h3><p>YAML is the abbreviated form of “ <strong>Y</strong>AML <strong>A</strong>in’t <strong>M</strong>arkup <strong>L</strong>anguage”. Established on 11th May 2001, it is a human-friendly data serialization language that works well with other programming languages.</p><h3>ZIP</h3><p>ZIP is an archive file format that takes up less storage and can be easily transferred to other devices. The ZIP file format permits several compression algorithms and was initially released on February 14, 1989.</p><h3>Conclusion</h3><p>So there you have it, an alphabetized list of common web development terms that contains about 40 phrases. My intention when putting this article together was to help familiarize newbies with the terms they will most likely come across as they begin to steep themselves in the world of web development. Best of luck on your journey, I hope that this article was a helpful read along the way! Feel free to add more to the list in the comment section for the benefit of learning.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/the-a-z-of-web-development/"><em>https://thecodeangle.com</em></a><em> on August 22, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b97808df1b5" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/the-a-z-of-web-development-9b97808df1b5">The A-Zs of Web Development</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Registration Form with HTML & CSS #1]]></title>
            <link>https://medium.com/swlh/registration-form-with-html-css-1-585a32585b52?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/585a32585b52</guid>
            <category><![CDATA[web-de]]></category>
            <category><![CDATA[tuto]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Sat, 08 Aug 2020 00:28:27 GMT</pubDate>
            <atom:updated>2020-12-06T00:17:16.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nFEzvgLtMfeKQoRU.jpg" /></figure><blockquote>What we know matters but who we are matters more.</blockquote><blockquote>- Brené Brown</blockquote><h3>Introduction</h3><p>Today we are going to build a simple registration form. The requirements for this tutorial is just a basic knowledge of <strong>Html and CSS </strong>as well as a code editor.</p><h3>A Preview of What We Are Going To Build</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*40Q4jdKwTMMUAXmlYbOV4A.gif" /></figure><p>Let us get started.</p><h3>Code Structure</h3><p>First, in our code editor, we are going to create a new folder. We can call the folder <strong><em>form</em></strong><em>. </em>Inside that folder, we will create two files. The and the.</p><h3>HTML</h3><p>In the index.html file, we should have a bare bone structure similar to what is shown below:</p><pre>&lt;!DOCTYPE html&gt; <br>&lt;html lang=&quot;en&quot;&gt; <br>&lt;head&gt; <br>&lt;meta charset=&quot;UTF-8&quot;&gt; <br>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt; <br>&lt;title&gt;Registration Form With Html &amp; Css&lt;/title&gt; <br>&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt; <br>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt; &lt;/head&gt;</pre><pre>  &lt;body&gt; <br>  &lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><p>Next, I am going to add the tags to the HTML page.</p><pre>&lt;!DOCTYPE html&gt; <br> &lt;html lang=&quot;en&quot;&gt; <br> &lt;head&gt; <br> &lt;meta charset=&quot;UTF-8&quot;&gt; <br> &lt;meta <br>   name=&quot;viewport&quot; <br>   content=&quot;width=device-width, <br>   initial-scale=1.0&quot;&gt; <br> &lt;title&gt;Registration Form With Html &amp; Css&lt;/title&gt; <br> &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt; <br> &lt;meta <br>  name=&quot;viewport&quot; <br>  content=&quot;width=device-width, <br>  initial-  <br>  scale=1&quot;&gt; <br>&lt;/head&gt; <br>  &lt;body&gt; <br>&lt;div&gt; <br>&lt;form&gt; <br>   &lt;h4 class=&quot;text-warning text-center pt-5&quot;&gt;Registration Page&lt;/h4&gt;        </pre><pre> &lt;label&gt; <br>    &lt;input <br>       type=&quot;text&quot; <br>       class=&quot;input&quot; <br>       name=&quot;email&quot; <br>       placeholder=&quot;EMAIL&quot;/&gt; <br>   &lt;div class=&quot;line-box&quot;&gt; <br>   &lt;div class=&quot;line&quot;&gt;<br> &lt;/div&gt; <br> &lt;/div&gt; <br> &lt;/label&gt; </pre><pre> &lt;label&gt; <br>    &lt;input <br>       type=&quot;text&quot; <br>       class=&quot;input&quot; <br>       name=&quot;username&quot; <br>       placeholder=&quot;USERNAME&quot;/&gt; <br>  &lt;div class=&quot;line-box&quot;&gt; <br>  &lt;div class=&quot;line&quot;&gt;&lt;/div&gt; <br>  &lt;/div&gt; <br> &lt;/label&gt; </pre><pre> &lt;label&gt; <br>    &lt;input <br>       type=&quot;password&quot; <br>       class=&quot;input&quot; <br>       name=&quot;password&quot; <br>       placeholder=&quot;PASSWORD&quot;/&gt; <br>   &lt;div class=&quot;line-box&quot;&gt; <br>   &lt;div class=&quot;line&quot;&gt;&lt;/div&gt; <br>  &lt;/div&gt; <br> &lt;/label&gt; </pre><pre> &lt;label&gt; <br>    &lt;input <br>       type=&quot;password&quot; <br>       class=&quot;input&quot; <br>       name=&quot;confirm&quot; <br>       placeholder=&quot;CONFIRM PASSWORD&quot;/&gt; <br>  &lt;div class=&quot;line-box&quot;&gt; <br>  &lt;div class=&quot;line&quot;&gt;&lt;/div&gt; <br>  &lt;/div&gt; <br> &lt;/label&gt; <br>&lt;button type=&quot;submit&quot;&gt;submit&lt;/button&gt; <br>&lt;/form&gt; <br>&lt;/div&gt; <br>&lt;/body&gt; <br>&lt;/html&gt;</pre><p>From the code above, we started by adding a form tag. In the form tag, there are four label tags and a button tag. Each input tag is wrapped in a label.</p><p>These labels are very important because they tell the user what information to provide in the form element.</p><p>This is all we need for the Html code and our form should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8f1BV8FQjMFPc01wCJuCQ.png" /><figcaption>HTML image</figcaption></figure><p>Yes, that is ugly. Time for some CSS!</p><h3>CSS</h3><p>We start in the style.css file by adding colour to the background of the page and also styling the form tag:</p><pre>body{ <br>  background: #C5E1A5; <br>}<br> <br>form{ <br>  width: 30%; <br>  margin: 60px auto; <br>  background: #efefef; <br>  padding: 60px 120px 80px 120px; <br>  text-align: center; <br>  -webkit-box-shadow: 2px 2px 3px rgba(0,0,0,0.1); <br>  box-shadow: 2px 2px 3px rgba(0,0,0,0.1); <br>}</pre><p>The Outcome:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*10Go61vBoEXda675CUqlmQ.png" /><figcaption>page preview</figcaption></figure><p>Furthermore, we need to style the labels and input. For the label<strong>, </strong>we will be adding <strong>letter-spacing, color, margin, padding </strong>and a positional direction for the label and the texts that will be within it.</p><pre>label{ <br>  display: block; <br>  position: relative; <br>  margin: 40px 0px;<br>} <br> .label-txt{ <br>  position: absolute; <br>  top: -1.6em; <br>  padding: 10px; <br>  font-family: sans-serif; <br>  font-size: .8em; <br>  letter-spacing: 1px; <br>  color: rgb(120,120,120); <br>  transition: ease .3s;<br>} <br> .input{ <br>  width: 100%; <br>  padding: 10px; <br>  background: transparent; <br>  border: none; <br>  outline: none;<br>}</pre><p>The Outcome:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8tAOJnd8adys2uc4W7lgQ.png" /></figure><p>Finally, we will be styling the line for the input field and the button.</p><p>To get the line effect, we need to set the <em>height</em> in the <strong>.line-box</strong> class. This will make the line visible. Also, we will be adding some transition effect when the input field is active.</p><p>The design for the button class is straight forward, We added a hover this allows us to set padding to the side of the button. <strong>color</strong>, the <strong>background color</strong>, <strong>padding</strong> and <strong>border</strong>- <strong>radius</strong>. We also set the display to <strong>inline-block,</strong></p><pre>.line-box{ <br>  position: relative; <br>  width: 100%; <br>  height: 2px; <br>  background: #BCBCBC;<br>} <br>.line{ <br>  position: absolute; <br>  width: 0%; <br>  height: 2px; <br>  top: 0px; <br>  left: 50%; <br>  transform: translateX(-50%); <br>  background: #8BC34A; <br>  transition: ease .6s;<br>} <br> .input:focus + .line-box .line{ <br>  width: 100%;<br>} <br> .label-active{ <br>  top: -3em; <br>} <br> button{ <br>  display: inline-block; <br>  padding: 12px 24px; <br>  background: rgb(220,220,220); <br>  font-weight: bold; <br>  color: rgb(120,120,120); <br>  border: none; <br>  outline: none; <br>  border-radius: 3px; <br>  cursor: pointer; <br>  transition: ease .3s;<br>} <br> button:hover{ <br>  background: #8BC34A; <br>  color: #ffffff;<br>}</pre><p>Final Results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*40Q4jdKwTMMUAXmlYbOV4A.gif" /><figcaption>form gif</figcaption></figure><h3>Conclusion</h3><p>I know this is a very basic tutorial, but I hope you can learn one or two things from it.</p><p>Here is the link to the repo on <a href="https://github.com/desoga10/registration-form">Github</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/registration-form-with-html-css-1/"><em>https://thecodeangle.com</em></a><em> on August 8, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=585a32585b52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/registration-form-with-html-css-1-585a32585b52">Registration Form with HTML &amp; CSS #1</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Break Down of HTTP Status Code — The Code Angle]]></title>
            <link>https://medium.com/swlh/a-break-down-of-http-status-code-the-code-angle-ca07617b5b00?source=rss-53cf172e7f39------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca07617b5b00</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Deji Adesoga]]></dc:creator>
            <pubDate>Wed, 29 Jul 2020 01:42:42 GMT</pubDate>
            <atom:updated>2020-12-06T00:18:11.494Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Break Down of HTTP Status Code</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GQHTbcW39kQDqSVk.jpg" /></figure><p>I eat and drink at my desk, but I’m a tidy eater.</p><p>— Jamie Zawinski</p><h3>Table of Content</h3><ul><li>Introduction</li><li>Informational Response (100–199)</li><li>Successful Response (200–299)</li><li>Redirects (300 -399)</li><li>Client Error (400–499)</li><li>Server Error (500–599)</li><li>Unofficial Codes by Different Platforms</li><li>Deprecated</li><li>Conclusion</li></ul><h3>Introduction</h3><p>HTTP which stands for <strong>Hypertext Transfer Protocol </strong>helps to indicate if a response is successful or not. Status codes are guided by section <a href="https://tools.ietf.org/html/rfc2616#section-10">10 of RFC 2616</a>. Most of the time, the users do not see the codes returned from the browser, but they are returned every time the browser interacts with the server.</p><p>Status codes can help provide a better user experience for the audience using an application, in terms of displaying the right error message and success message.</p><p>There are five standard groups Status codes are divided into and they can be identified by the first digit of the code.</p><p>These status codes are up to 80 in number, but we will be discussing the ones that are most relevant and used by developers when creating an application.</p><h3>Informational Response (100–199)</h3><p><strong>100 (Continue)</strong></p><p>At this level, the client should continue with the request. It is an indication that everything is going smooth so far and the request has not yet been rejected by the server.</p><p>If the request has however been completed, then the response should be ignored.</p><p><strong>101 (Switching Protocol)</strong></p><p>At this stage, the <strong>HTTP </strong>response code indicates that the server is switching protocol as requested by a client. The server then makes an upgrade in the response header to indicate that the protocol has been switched.</p><p><strong>103 (Early Hints)</strong></p><p>This response status code is mainly used to return some response headers before the server returns an HTTP message.</p><h3>Successful Response (200–299)</h3><p><strong>200 (OK)</strong></p><p>The <strong>HTTP 200 </strong>status code indicates that the response has succeeded. That is, the communication between the client and the server has run smoothly without any bug.</p><p>The response gotten will depend on the request method used. This is summarized below:</p><ul><li><strong><em>GET — </em></strong>The resource data has been fetched.</li><li><strong><em>HEAD</em></strong><em> </em>— The headers are in the message body but without the resource data.</li><li><strong><em>POST </em></strong>— The response will contain the result of the data transmitted to the body.</li><li><strong><em>OPTIONS </em></strong>— A representation of the response option.</li><li><strong><em>TRACE </em></strong>— The message body contains the request as received by the server.</li></ul><p><strong>201 (Created)</strong></p><p>This represents the fact that the request has not only succeeded, but a resource has also been created. This status code usually comes with a <strong>POST</strong> request, since it describes the resource that is being sent to the server.</p><p><strong>202 (Accepted)</strong></p><p>This means a client has requested to create something on the server, then the request made is accepted, but is not yet completed because it is still undergoing some processing.</p><p>The made request may or may not be acted upon, as it may be disallowed during the processing.</p><p><strong>203 (Non-Authoritative Information)</strong></p><p>This indicates a successful request, but the entity-header has been modified from that of the origin server. It allows the proxy to send a warning to recipients when a change has been applied.</p><p>The use of this status code is not required and is only needed when the response would be anything other than <strong>200 (OK)</strong>.</p><p><strong>204 (No Content)</strong></p><p>This means the sent request was received, but there’s no additional data to send in the response payload. The PUT method is mostly used for a 204 response and it is cacheable by default.</p><p><strong>205 (Reset Content)</strong></p><p>Here the request is processed successfully, however, the response tells the user to reset the document view, so the request returns to the original state which it was received from the server.</p><h3>Redirects (300–399)</h3><p><strong>300 (Multiple Choice)</strong></p><p>This shows a multitude of options or resources a user can choose from and each option or resource can be identified uniquely.</p><p>This response code is rarely used as there’s no generally accepted way of choosing a specific response.</p><p><strong>301 (Moved Permanently)</strong></p><p>Here all future requests made to the resource should be redirected to a specified URL. It can be used to redirect from a page that is no longer in existence.</p><p>However, it is recommended to use this request only for <strong>GET</strong> or <strong>HEAD</strong> methods as it contains some bugs and not all user-agents align with it. This type of response is cacheable by default.</p><p><strong>302 (Found) Previously[Moved Temporarily]</strong></p><p>This response is similar to the 301 HTTP status code. The difference here is that the resource requested has been temporarily moved to a specified header.</p><p>302 has however been superseded by 303 and 307. Just like in the 301 HTTP response code, it is recommended to use this request only for <strong>GET</strong> or <strong>HEAD</strong> methods as not all user-agents align with it.</p><p><strong>303 (See Other)</strong></p><p>This HTTP status code indicates that the response for this request is being redirected to another URI. This status code applies to any HTTP method.</p><p><strong>304 (Not Modified)</strong></p><p>Here, there is no need to resend a requested resource since the user-agent already has a cached copy of the last resource. The aim is to minimize data transfer since the user-agent already has a copy of the most recent update.</p><p><strong>307 (Temporary Redirect)</strong></p><p>In this situation, the response code indicates that the requested resource has been temporarily moved to another URI. It is expected of the client to continue using the original URI to make a request.</p><p>Here the request method is guaranteed not to be changed during redirection, unlike the 302 HTTP status code.</p><p><strong>308 (Permanent Redirect)</strong></p><p>In this case, the requested resource has been assigned a new permanent URI which allows requests to run smoothly. The request method does not change during redirection, unlike the 301 HTTP status code which can be altered.</p><h3>Client Error Responses (400–499)</h3><p><strong>400 (Bad Request)</strong></p><p>This indicates that the request received cannot be processed by the server due to an error which could be due to a wrong syntax. The server expects some form of modifications to be made when next request is received, else the same error persists.</p><p><strong>401 (Unauthorized)</strong></p><p>In this case, authorization is required to gain access to a received response. This HTTP status code is similar to 403 (Forbidden). Here, however, the request is expected to have valid credentials for it to be accepted.</p><p><strong>403 (Forbidden)</strong></p><p>This HTTP status code means the user-client has a valid data but is refused access by the server. Making repeated attempts will not yield any successful response as the user, as the user is not allowed to any rights to that particular resource.</p><p><strong>404 (Not Found)</strong></p><p>This means the requested resource cannot be found by the server. This could be a result of a temporary glitch and the resource could be available if another request is made in the future. Mostly, links that lead to <strong>404 </strong>are usually called broken links.</p><p><strong>405 (Method Not Allowed)</strong></p><p>This means that a requested method is not supported for the requested resource, even when it is recognized by the server. The resource may be expecting a <strong>GET</strong> or <strong>POST</strong> method, but if it receives a <strong>DELETE</strong> or <strong>PUT</strong> method, the request made will be rejected as <strong>405</strong>.</p><p><strong>410 (Gone)</strong></p><p>As the name implies, this HTTP status code indicates that the requested resource is not available anymore. Unlike the 404 status code, the results of this response are permanent. This response is cacheable by default.</p><p><strong>418 — (I’m a Teapot)</strong></p><p>This is probably everyone’s favourite response code. It was defined in 1998 and is not expected to be defined by any HTTP server. It implies that the server has refused to brew coffee because it is permanently a teapot.</p><p><strong>429 (Too Many Requests)</strong></p><p>Here the user-client has made too many requests within a given time frame. It is, however, possible, that the request header may indicate a response of how long a client should wait before retrying the request.</p><p>It’s mainly used for rate limiting strategies, which is meant for security purposes.</p><h3>Server Error Responses(500–599)</h3><p><strong>500 (Internal Server Error)</strong></p><p>Here it means a particular request experienced an unexpected condition that made it unable to complete the request. The user is not expected to see this HTTP status code on the web page.</p><p><strong>501 ( Not Implemented )</strong></p><p>This HTTP status code indicates that the server does not support or have the requirements needed to complete a particular request. It means the server the user-client is trying to access needs to be fixed.</p><p><strong>502 ( Bad Gateway )</strong></p><p>This indicates that the server while acting as a proxy, received an invalid response from the server while making the request.</p><p><strong>503 ( Service Unavailable )</strong></p><p>This HTTP status code indicates a temporary state of affairs. It means the request made to the server cannot currently handle the action, this could mean due to maintenance or that the server is overloaded.</p><p><strong>504 ( Gateway Timeout )</strong></p><p>This status code indicates that the server was acting as a proxy, did not send the request at the expected time frame. The fix to this is expected to come from the server.</p><h3>Unofficial Codes by Different Platforms</h3><p><strong>218 — ( This is fine )</strong></p><p>This is mainly used in Apache Web Severs.</p><p><strong>419 ( Page Expired )</strong></p><p>This is used by the <strong>Laravel Framework</strong> when a CSRF Token is expired or sometimes missing.</p><p><strong>420 ( Enhance Your Calm )</strong></p><p>This is used by version 1 of the <strong>Twitter </strong>search trends API. It is similar to what 429 status code does.</p><p><strong>430 ( Request Header Fields Too Large )</strong></p><p>This s used by Shopify when there are too many URL requests within a certain time frame.</p><p><strong>450 ( Blocked by Windows Parental Controls )</strong></p><p>This used by Microsoft to indicate when parental control is turned on and blocking access to a requested resource.</p><p><strong>526 ( Invalid SSL Certificate )</strong></p><p>This is used by Cloudflare and Cloud Foundry’s Gorouter to indicate failure to validate the SSL/TLS certificate.</p><h3>Deprecated</h3><p><strong>305 ( Use Proxy )</strong></p><p>This HTTP response code should no longer be used due to security reasons, although it will still work.</p><p><strong>306 ( unused )</strong></p><p>This HTTP status is no longer used, it was used in the previous version of the HTTP/1.1 specification.</p><h3>Conclusion</h3><p>Http response code plays a vital role for both the developers and users of an application. It gives a clear understanding and direction on the current status of things on a web page. Also, it helps with search engine optimization and digital marketing.</p><p>Let’s connect on <a href="https://twitter.com/thecodeangle">Twitter</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fex6rrh%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fex6rrh&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href">https://medium.com/media/0fd0a4e9ef97653755128178c7adea2a/href</a></iframe><p><em>Originally published at </em><a href="https://thecodeangle.com/a-break-down-of-http-status-code/"><em>https://thecodeangle.com</em></a><em> on July 29, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca07617b5b00" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/a-break-down-of-http-status-code-the-code-angle-ca07617b5b00">A Break Down of HTTP Status Code — The Code Angle</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>