<?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 Vlad Antsitovich on Medium]]></title>
        <description><![CDATA[Stories by Vlad Antsitovich on Medium]]></description>
        <link>https://medium.com/@antsitvlad?source=rss-49956dad69af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*maGVdPTH6IDDKgjeSK42Mw.jpeg</url>
            <title>Stories by Vlad Antsitovich on Medium</title>
            <link>https://medium.com/@antsitvlad?source=rss-49956dad69af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:15:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@antsitvlad/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[Technical Documentation]]></title>
            <link>https://antsitvlad.medium.com/technical-documentation-14b4e51e25f9?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/14b4e51e25f9</guid>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[confluence]]></category>
            <category><![CDATA[docs]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Mon, 24 Oct 2022 08:49:37 GMT</pubDate>
            <atom:updated>2022-10-24T08:49:37.164Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*brku0wb_y6h-fA7Bv71GPg.png" /></figure><h3>What is Technical Documentation?</h3><p><strong>Documentation</strong> is any communicable material that is used to describe, explain or instruct.</p><p><strong>Technical documentation</strong> is any documentation created to help users or developers understand a piece of product’s features and functions. In theory, all the questions that you might have about the product should be clearly answered.</p><h3>Why we need Documentation?</h3><p>You may hear jokes that nobody ever reads documentation, but it exists to help end-users/readers to achieve a goal.</p><p>Documentation should be an integral part of any product or process.</p><p><strong>The main benefits of documentation:</strong></p><ul><li>Improved quality and process control.</li><li>Easier onboarding and training.</li><li>Reduces knowledge loss.</li><li>Saves time.</li><li>Increased sales.</li></ul><h3>Types of Technical Documentation</h3><p>There are certain <strong>types of documentation</strong> for specific purposes. Let’s cover common of them:</p><ul><li><strong>User Guide (Manual)</strong> — goal of such guides is to educate the users.</li><li><strong>Process Documentation</strong> — describes the development of a product.</li><li><strong>API (Application Programming Interface) Documentation</strong> — describes what services an API offers and how to use those services.</li><li><strong>Release Notes</strong> — explains what new things are incorporated, how the new feature works, or what kind of a bug is managed to fix.</li><li><strong>User Requirements Document </strong>— specifies what what the users expect from your product or service.</li></ul><p>Take a look at <a href="https://whatfix.com/blog/types-of-technical-documentation/"><strong>12 Types of Technical Documentation +Examples (2022)</strong></a></p><h3>Documentation Best Practices</h3><p>Before to start writing any documentation it’s better to plan <strong>how are you going to do this and start with the draft.</strong></p><p>To write an effective technical documentation you need to <strong>know the topic and the audience </strong>that will use it.</p><p><strong>A good technical documentation should be:</strong></p><ul><li><strong>written in simple language </strong>(avoid using jargon, terms that reader doesn’t know)</li><li><strong>use visual elements</strong> (videos, diagrams, tables and etc.),</li><li>and <strong>be</strong> <strong>readable </strong>(use formatting, code blocks)<strong> </strong>to make it easier to understand.</li></ul><p>Remember, visual is always better than plain text. Rule: <strong>Show don’t tell.</strong></p><p><strong>Document what matters first</strong> to make sure that your documentation contains all the necessary information and explains it well for readers to get the most out of your product, but remember to <strong>avoid wasteful information.</strong></p><p>Make sure that your<strong> documentation is consistent. </strong>Users should step-by-step see the way how documentation solves their problems. For example if you open any good documentation you will see left sidebar with main content that divided by topics.</p><p>The critical thing to keep in mind, is when you have teams and they have to document different projects, processes and etc., <strong>all types of documentation should live in one place</strong>, to avert the problem of finding all these documents.<strong> </strong>Choose the best tool that can fit all teams. <strong>Don’t spread your documentation over everywhere.</strong></p><p>One more important thing it’s how you will <strong>keep documentation up to date</strong>, no one loves outdated information and this may cause distrust of documentation in the future.</p><p>Also check out <a href="https://developers.google.com/tech-writing"><strong>Technical Writing Courses by Google</strong></a> to learn how to plan and author technical documents.</p><p><strong>To learn more about How to make your documentation better:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=R6zeikbTgVc">How to writing effective documentation</a>.</li><li><a href="https://youtu.be/sQP_hUNCrcE">How to Write Documentation for People that Don’t Read</a></li><li><a href="https://www.youtube.com/watch?v=Z-vZuBX0Cmk">Basics of Technical Writing for Software Documentation</a></li><li><a href="https://www.youtube.com/watch?v=fvfzwOAM-fA&amp;ab_channel=Figma">Documentation for design system</a></li><li><a href="https://developers.google.com/season-of-docs/docs/tech-writer-guide">Technical Writer Guide</a></li><li><a href="https://www.youtube.com/watch?v=1BmSAKHtnNQ">Clear and Concise Technical Writing</a></li><li><a href="https://www.youtube.com/watch?v=z3fRu9pkuXE">Writing great documentation</a></li><li><a href="https://www.youtube.com/watch?v=t4vKPhjcMZg">What nobody tells you about documentation</a></li><li><a href="https://jelvix.com/blog/software-design-document">The Anatomy of a Software Design Document</a></li><li><a href="https://www.youtube.com/watch?v=vSHAQJh7X18">Writing effective technical documentation — Online Talk</a></li><li><a href="https://www.youtube.com/watch?v=qCMshCRsvv4">Technical Writing Webinar — Technical Documentation Essentials</a></li><li><a href="https://www.youtube.com/watch?v=ulQVD34a8SY">How to Write a Technical Document</a></li><li><a href="https://www.youtube.com/watch?v=_Fr6PfFxw2Q">Essential Qualities of a Technical Writer with Ellis Pratt of Cherryleaf</a></li><li><a href="https://www.youtube.com/watch?v=Z5xyKYrv-js">Webinar on How to Create a Successful Knowledge Base</a></li><li><a href="https://whatfix.com/blog/technical-documentation/">How to Create Helpful Technical Documentation (+Best Practices)</a></li><li><a href="https://document360.com/blog/document-lifecycle/">Document Lifecycle: Ensuring Your Documentation Efficiency</a></li><li><a href="https://www.youtube.com/watch?v=kNpyC4LY5gI">Writing Better Documentation for Developers by Meredydd Luff</a></li></ul><h3>Tools for Documentation</h3><p>When it comes to documentation you really have to decide where it should live.</p><p>Technical documentation tool helps to create and manage documentation faster and easier. You can use a tool that already exists or implement your own full custom.</p><p><strong>Key features of any documentation tool:</strong></p><ul><li><strong>Easy to use.</strong> For a good documentation tool not enough just provide content, users should be happy to use it.</li><li><strong>Accessible</strong>. The right tool should allow users to share and get access to documentation within one click.</li><li><strong>Resources support.</strong> Some documentations contain not only text but also hyperlinks, images, videos and etc. it’s really important to know that tool can handle this well.</li><li><strong>Collaboration. </strong>Collaboration makes documentation easier to maintain and get feedback from users.</li></ul><p>There are a lot of tools that can be used to manage your Documentation, here are just some popular solutions, and each have own pros and cons: <a href="https://www.atlassian.com/software/confluence"><strong>Confluence</strong></a><strong>, </strong><a href="https://github.com/"><strong>GitHub</strong></a><strong>, </strong><a href="https://www.google.com/search?q=Dropbox+Paper&amp;oq=Dropbox+Paper&amp;aqs=chrome..69i57j0i512l9.131j0j7&amp;sourceid=chrome&amp;ie=UTF-8"><strong>Dropbox Paper</strong></a><strong>, </strong><a href="https://www.notion.so/product"><strong>Notion</strong></a><strong>.</strong></p><p><strong>To learn more about how to use documentation tools:</strong></p><ul><li><a href="https://confluence.atlassian.com/doc/develop-technical-documentation-in-confluence-226166494.html">Develop Technical Documentation in Confluence</a></li><li><a href="https://www.youtube.com/watch?v=s46m8H4BrrE">How GitHub uses GitHub to document GitHub</a></li><li><a href="https://www.youtube.com/watch?v=QLC7v1ocODI">GitHub is your documentation landing page</a></li><li><a href="https://docs.github.com/en/get-started/writing-on-github">Writing on GitHub</a></li><li><a href="https://www.youtube.com/watch?v=U6ueKExLzSY&amp;ab_channel=PortlandIncubatorExperiment">Read the Docs: simplified software documentation, automatic building, versioning and hosting of docs</a></li></ul><h3>Docs as Code</h3><p>Docs as Code is a practice of using the same tools and workflows as your code. This means create, manage and publish documentation similar to application.</p><p>The goal is to empower engineers to write technical documentation frequently and keep it up to date by integrating with their tools and processes.</p><p><strong>To learn more about Docs as Code:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=fvVusHA5ISw">Docs as Code: Write for Developers as a Developer</a></li><li><a href="https://www.youtube.com/watch?v=uFGCaZmA6d4&amp;ab_channel=DevRel">How we are solving internal technical documentation at Spotify</a></li><li><a href="https://www.youtube.com/watch?v=_sdm5RcpbXM">Docs as Code</a></li><li><a href="https://www.youtube.com/watch?v=CfkmPAGDl5Q">Use Gitlab to Deliver “Docs-as-Code” Technical Documentation</a></li><li><a href="https://blog.cloudflare.com/our-docs-as-code-approach/">Working in public — our docs-as-code approach</a></li><li><a href="https://www.youtube.com/watch?v=Cxuo3udElcE">Marcia Riefer Johnston &amp; Dave May — One AWS team’s move to docs as code</a></li><li><a href="https://www.youtube.com/watch?v=0pYN6Z-t1-s">Create beautiful and localized documentations and websites using MkDocs + Github</a></li><li><a href="https://www.youtube.com/watch?v=ftnVllssoI8">Building Docs like Code: Continuous Integration for Documentation</a></li></ul><h3>Resources</h3><ul><li><a href="https://document360.com/blog/">The Document360 Blog</a></li><li><a href="https://www.youtube.com/c/Document360/videos">The Document360 YouTube Channel</a></li><li><a href="https://whatfix.com/blog">The Whatfix Blog</a></li><li><a href="https://www.youtube.com/c/WritetheDocs/videos">Write the Docs YouTube Channel</a></li><li><a href="https://www.docslikecode.com/articles/">Docs Like Code Articles</a></li><li><a href="https://www.youtube.com/watch?v=s1PLS3SQHQ0&amp;ab_channel=Codecademy">How To Use Developer Documentation</a></li><li><a href="https://www.youtube.com/watch?v=t4vKPhjcMZg&amp;ab_channel=PyConAU">What nobody tells you about documentation</a></li><li><a href="https://www.youtube.com/watch?v=2qlcY9LkFik&amp;ab_channel=AltexSoft">Software Planning and Technical Documentation</a></li><li><a href="https://www.youtube.com/watch?v=sGN5lHsqAUk">Product Documentation Strategy — Kay Miles</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14b4e51e25f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dev Weekly Digest [week 39]]]></title>
            <link>https://antsitvlad.medium.com/dev-weekly-digest-week-39-d460cd06c3fc?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/d460cd06c3fc</guid>
            <category><![CDATA[dev]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Sun, 02 Oct 2022 22:03:20 GMT</pubDate>
            <atom:updated>2022-10-02T22:03:20.632Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MOu-iBXSTLEKDgHNMLFEOA.png" /></figure><h3>Productivity</h3><ul><li><a href="https://www.youtube.com/watch?v=MIJ2K_UOQ00"><strong>How To Keep Updated About New Technology</strong></a></li><li><a href="https://github.blog/2022-09-14-8-things-you-didnt-know-you-could-do-with-github-copilot/"><strong>8 things you didn’t know you could do with GitHub Copilot</strong></a></li></ul><h3>Articles</h3><ul><li><a href="https://web.dev/web-platform-09-2022/"><strong>New to the web platform in September</strong></a> by <a href="https://web.dev/authors/rachelandrew/">Rachel Andrew</a></li><li><a href="https://hacks.mozilla.org/2022/09/the-100-percent-markdown-expedition/"><strong>The 100% Markdown Expedition</strong></a> by <a href="http://schalkneethling.com/">Schalk Neethling</a></li><li><a href="https://css-tricks.com/gifs-without-the-gif-the-most-performant-image-and-video-options-right-now/"><strong>GIFs Without the .gif: The Most Performant Image and Video Options Right Now</strong></a> by <a href="https://css-tricks.com/author/olliew/">Ollie Williams</a></li><li><a href="https://youtu.be/F18oy48jkrk"><strong>The Web is Good Now</strong></a> by <a href="https://css-tricks.com/author/geoffgraham/">Chris Coyier</a></li><li><a href="https://www.smashingmagazine.com/2022/09/javascript-api-guide/"><strong>JavaScript APIs You Don’t Know About</strong></a> by <a href="https://www.smashingmagazine.com/author/juan-diego-rodriguez/">Juan Diego Rodríguez</a></li><li><a href="https://www.smashingmagazine.com/2022/09/ten-principles-consider-building-security-strategy-case-study/"><strong>Building Your Security Strategy (Case Study)</strong></a> by <a href="https://www.smashingmagazine.com/author/wix-security-team/">Wix Security Team</a></li><li><a href="https://tsh.io/blog/feature-flags-best-practices/"><strong>Feature flags best practices. Gain full control over what your app displays to users with a single click</strong></a> by Aleksander Patschek</li><li><a href="https://redis.com/blog/5-things-you-didnt-know-you-could-do-with-redis/"><strong>5 Things You Didn’t Know You Could Do With Redis</strong></a> by <a href="https://redis.com/blog/author/alex-patinoredis-com/">Alex Patino</a></li><li><a href="https://redis.com/blog/6-books-new-redis-developers-should-read/"><strong>The 6 Books New Redis Developers Should Read</strong></a> by <a href="https://redis.com/blog/author/redis-labs/">Redis</a></li><li><strong>Relational to NoSQL at Enterprise Scale: Lessons from Amazon </strong>by <br><a href="https://www.mongodb.com/blog/authors/rick-houlihan">Rick Houlihan</a></li><li><a href="https://vercel.com/blog/accessibility-strategies-for-a-dynamic-web-experience"><strong>Accessibility strategies for a dynamic web experience</strong></a><strong> </strong>by <a href="https://twitter.com/johnphamous">John Pham</a>, <a href="https://twitter.com/max_leiter">Max Leiter</a>, <a href="https://twitter.com/zlw241">Zach Ward</a> and <a href="https://twitter.com/anthonyShewDev">Anthony Shew</a></li><li><a href="https://developer.okta.com/blog/2022/08/29/react-typescript-redux"><strong>Use Redux to Manage Authenticated State in a React App</strong></a> by <a href="https://developer.okta.com/blog/authors/gabi-dombrowski/">Gabi Dombrowski</a></li><li><a href="https://launchdarkly.com/blog/testing-in-production-for-safety-and-sanity/"><strong>Testing in Production to Stay Safe and Sensible</strong></a> by <a href="https://launchdarkly.com/blog/author/heidiw/">Heidi Waterhouse</a></li><li><a href="https://www.youtube.com/watch?v=0DisUGot1EE"><strong>Practical API Security</strong></a> by Ahmed Elharouny</li><li><a href="https://www.youtube.com/watch?v=xl9R8aTOW_I"><strong>It’s viewports all the way down</strong></a> by <a href="https://www.youtube.com/c/GoogleChromeDevelopers">Google Chrome Developers</a></li><li><a href="https://www.youtube.com/watch?v=r4SHFRKDfRk"><strong>Join the super secret V8 club &amp; become a JavaScriptbender</strong></a> by Vladimir de Turckheim</li><li><a href="https://www.youtube.com/watch?v=FD3Ft4Nuf8E"><strong>Publishing in the JavaScript Ecosystem &amp; Keeping Users Happy</strong></a> by Trivikram Kamat</li></ul><h3>Courses</h3><ul><li><a href="https://web.dev/learn/accessibility/"><strong>Learn Accessibility </strong>by<strong> </strong>web.dev</a></li><li><a href="https://web.dev/learn/html/"><strong>Learn HTML</strong> by web.dev</a></li><li><a href="https://frontendmasters.com/courses/algorithms/"><strong>The Last Algorithms Course You’ll Need</strong></a><strong> </strong>by <a href="https://frontendmasters.com/teachers/the-primeagen/">ThePrimeagen</a></li><li><a href="https://frontendmasters.com/courses/intermediate-html-css/"><strong>Intermediate HTML &amp; CSS</strong></a> by <a href="https://frontendmasters.com/teachers/jen-kramer/">Jen Kramer</a></li><li><a href="https://frontendmasters.com/courses/remix/"><strong>Remix Fundamentals</strong></a> by <a href="https://frontendmasters.com/teachers/kentcdodds/">Kent C. Dodds</a></li><li><a href="https://frontendmasters.com/courses/advanced-remix/"><strong>Advanced Remix</strong></a> by <a href="https://frontendmasters.com/teachers/kentcdodds/">Kent C. Dodds</a></li><li><a href="https://egghead.io/courses/introduction-to-monorepos-with-npm-workspaces-c03f500b"><strong>Introduction to Monorepos with NPM Workspaces</strong></a> by <a href="https://egghead.io/q/resources-by-alejandro-nanez">Alejandro Ñáñez</a></li><li><a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/"><strong>A Complete Guide to Flexbox</strong></a> by <a href="https://css-tricks.com/author/chriscoyier/">Chris Coyier</a></li><li><a href="https://css-tricks.com/snippets/css/media-queries-for-standard-devices/"><strong>Media Queries for Standard Devices</strong></a> by <a href="https://css-tricks.com/author/geoffgraham/">Geoff Graham</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d460cd06c3fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Resources for Developers you must check every day!]]></title>
            <link>https://antsitvlad.medium.com/resources-for-developers-you-must-to-check-every-day-7b245da2fa4c?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b245da2fa4c</guid>
            <category><![CDATA[lean-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[resources]]></category>
            <category><![CDATA[dev]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Wed, 14 Sep 2022 19:52:44 GMT</pubDate>
            <atom:updated>2023-02-27T12:28:47.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EHSa40EGGD0lD_ZsKoM1Gw.png" /></figure><p>This post contains a lot of grate resources you should check out at least once a week to keep yourself up to date with new trends, tech and much more around development.</p><p>This post keeps up to date.</p><h3>Blogs</h3><p>It’s hard to find one place where you can find articles for all topics so sometimes it’s better to use different resources which contain specific topics.</p><ul><li><a href="https://github.blog/"><strong>GitHub Blog</strong></a><strong> — </strong>blog by GitHub team.</li><li><a href="https://web.dev/blog/"><strong>web.dev Blog</strong></a><strong> — </strong>latest news, updates, and stories for developers from web.dev team.</li><li><a href="https://hacks.mozilla.org/"><strong>Mozilla Hack</strong></a><strong> — </strong>Mozilla Hacks is written for web developers, designers and everyone who builds for the Web.</li><li><a href="https://css-tricks.com/archives/"><strong>CSS-Tricks</strong></a></li><li><a href="https://ui.dev/blog"><strong>ui.dev Blog</strong></a></li><li><a href="https://kentcdodds.com/blog"><strong>Kent C. Dodds Blog</strong></a></li><li><a href="https://www.smashingmagazine.com/articles/"><strong>Smashing Magazine</strong></a></li><li><a href="https://egghead.io/blog"><strong>egghead.io Articles</strong></a></li><li><a href="https://www.freecodecamp.org/news"><strong>freecodecamp.org Articles</strong></a></li><li><a href="https://tsh.io/blog/"><strong>The Software House Blog</strong></a></li><li><a href="https://www.codecademy.com/articles"><strong>Codecademy Articles</strong></a></li><li><a href="https://redis.com/blog/"><strong>Redis Blog</strong></a></li><li><a href="https://www.mongodb.com/blog"><strong>MongoDB Blog</strong></a></li><li><a href="https://vercel.com/blog"><strong>Vercel Blog</strong></a></li><li><a href="https://developers.facebook.com/blog/"><strong>Meta Developers Blog</strong></a></li><li><a href="https://blogs.oracle.com/developers/"><strong>Oracle Developers Blog</strong></a></li><li><a href="https://www.digitalocean.com/blog"><strong>The DigitalOcean Blog</strong></a></li><li><a href="https://auth0.com/blog/"><strong>Auth0 Blog</strong></a></li><li><a href="https://developer.okta.com/blog/"><strong>Okta Developers Blog</strong></a></li><li><a href="https://frontendmasters.com/blog"><strong>FrontendMasters Blog</strong></a><strong> — </strong>articles on JavaScript, Front-End and Beyond by FrontendMasters</li><li><a href="https://automationpanda.com/"><strong>Automation Panda Blog</strong></a></li><li><a href="https://www.ibm.com/cloud/blog"><strong>IBM Blog</strong></a></li><li><a href="https://www.atlassian.com/blog"><strong>Atlassian Blog</strong></a><strong> — </strong>unleashing the potential of all teams with tips, tools, and practices.</li><li><a href="https://circleci.com/blog/"><strong>Circleci Blog</strong></a></li><li><a href="https://www.wix.engineering/blog"><strong>Wix Engineering Blog</strong></a></li><li><a href="https://launchdarkly.com/blog/"><strong>LaunchDarkly Blog</strong></a><strong> — </strong>blog offers content on feature management, Continuous Delivery, Progressive Delivery, and much more.</li><li><a href="https://www.lucidchart.com/blog/"><strong>Lucidchart Blog</strong></a> — blog to discover the ins and outs of visual thinking.</li><li><a href="https://www.fullstory.com/blog/"><strong>FullStory Blog</strong></a><strong> — </strong>Insights, Tips &amp; Tricks, Case Studies and More from FullStory</li><li><a href="https://blog.sentry.io/"><strong>Sentry Blog</strong></a><strong> — </strong>Product, Engineering, and Marketing updates from the developers of Sentry.</li><li><a href="https://www.developerway.com/"><strong>Developerway Blog</strong></a><strong> — </strong>improve your technical skills with in-depth explanations, practical advices and useful tips and tricks.</li><li><a href="https://blog.isquaredsoftware.com/"><strong>Mark’s Dev Blog</strong></a></li><li><a href="https://remix.run/blog"><strong>Remix Blog</strong></a><strong> — </strong>thoughts about building excellent user experiences with Remix.</li><li><a href="https://ionic.io/blog"><strong>Ionic Blog</strong></a> — blog by Ionic team.</li><li><a href="https://blog.logrocket.com/"><strong>LogRocket Blog</strong></a> — for Frontend Developers and Web App Engineers from LogRocket team.</li><li><a href="https://www.deque.com/blog/"><strong>Deque Blog</strong></a><strong> — </strong>get the latest in digital accessibility from Deque Systems industry-leading thought leaders as they explore new a11y trends, best practices and product news.</li><li><a href="https://www.sarasoueidan.com/blog/"><strong>Sara Soueidan Blog</strong></a><strong> </strong>— articles on design engineering covering project case studies, thought process, front-end strategy, techniques and best practices, focused on HTML, CSS, SVG, accessiblity, and everything in between.</li><li><a href="https://piccalil.li/"><strong>Andy Bell Blog</strong></a><strong> — </strong>the founder of <a href="https://set.studio/">Set Studio</a>, a creative agency that specialises in building stunning websites that work for everyone.</li><li><a href="https://blog.sonarsource.com/"><strong>SonarSource Blog</strong></a></li><li><a href="https://www.pulumi.com/blog/"><strong>Pulumi Blog</strong></a><strong> — </strong>articles, resources, and posts on universal infrastructure as code best practices.</li><li><a href="https://www.callstack.com/blog"><strong>CallStack Blog</strong></a> — home to tech news, web and mobile development trends, stories from our work process.</li><li><a href="https://www.moonhighway.com/articles"><strong>Moon Highway</strong></a> — articles about programming.</li><li><a href="https://www.joshwcomeau.com/"><strong>Joshua Comeau</strong></a> — friendly tutorials for developers. Focus on React, CSS, Animation, and more!</li><li><a href="https://webkit.org/"><strong>WebKit</strong></a><strong> </strong>— is the <a href="https://webkit.org/project">web browser engine</a> used by Safari, Mail, App Store, and many other apps on macOS, iOS, and Linux. <a href="https://webkit.org/getting-started">Get started</a> <a href="https://webkit.org/contributing-code">contributing code</a>, or <a href="https://webkit.org/reporting-bugs">reporting bugs</a>.</li><li><a href="https://www.datadoghq.com/blog/"><strong>DataDog Blog </strong></a>— check out The Monitor, Datadog’s main blog, to learn more about new Datadog products and features, integrations, and more.</li></ul><h3>Courses and Guides</h3><p>Courses and Guides can help to learn a specific topic by providing structured and relevant content. Most courses and Guides keep updated.</p><ul><li><a href="https://developer.mozilla.org/en-US/"><strong>MDN</strong></a></li><li><a href="https://roadmap.sh/guides"><strong>roadmap.sh Guides</strong></a></li><li><a href="https://frontendmasters.com/courses/"><strong>FrontendMasters Courses</strong></a></li><li><a href="https://kentcdodds.com/courses"><strong>Kent C. Dodds Courses</strong></a></li><li><a href="https://ui.dev/"><strong>ui.dev Courses</strong></a></li><li><a href="https://egghead.io/learn"><strong>egghead.io Courses</strong></a></li><li><a href="https://www.codecademy.com/catalog"><strong>Codecademy Courses</strong></a></li><li><a href="https://www.digitalocean.com/community/tutorials"><strong>DigitalOcean Tutorials</strong></a></li><li><a href="https://www.aws.training/"><strong>AWS Training</strong></a></li><li><a href="https://trailhead.salesforce.com/"><strong>Trailhead by Salesforce</strong></a></li><li><a href="https://www.codesmith.io/"><strong>Codesmith</strong></a></li><li><a href="https://learndigital.withgoogle.com/digitalgarage/courses"><strong>Google Online Courses</strong></a></li><li><a href="https://learnsql.com/course-explorer?filter=all&amp;level=all&amp;sort=popularity&amp;dialect=standard-sql%2Csql-server%2Cpostgresql%2Cmy-sql&amp;goal=learn-sql%2Cpractice-sql"><strong>LearnSQL Courses</strong></a></li><li><a href="https://www.ibm.com/cloud/learn"><strong>IBM Learn Hub</strong></a></li><li><a href="https://web.dev/learn/"><strong>web.dev Courses</strong></a><strong> — </strong>learning paths to discover everything you need to know about building for the modern web.</li><li><a href="https://css-tricks.com/guides/"><strong>CSS-Tricks Guides</strong></a></li><li><a href="https://ui.dev/"><strong>ui.dev Courses</strong></a></li><li><a href="https://www.smashingmagazine.com/online-workshops/"><strong>Smashing Magazine Workshops</strong></a><strong> — </strong>online workshops and training to boost your skills online and learn practical, actionable insights from experts — live.</li><li><a href="https://learn.hashicorp.com/"><strong>HashiCorp</strong></a><strong> — </strong>tutorials to automate your workflows.</li><li><a href="https://www.newline.co/"><strong>newline</strong></a> — learn to build React, Angular, Vue, GraphQL, and Node.js Apps with real-world projects</li><li><a href="https://www.cbtnuggets.com/"><strong>CBT Nuggets</strong></a> — online IT training for certifications and IT skills.</li><li><a href="https://subscription.packtpub.com/"><strong>Packtpub</strong></a><strong> — </strong>access over 7,500 Programming &amp; Development eBooks and videos to advance your IT skills. Enjoy unlimited access to over 100 new titles every month on the latest technologies and trends.</li><li><a href="https://www.oreilly.com/online-learning/"><strong>O’Reilly Media</strong></a> — With O’Reilly Online Learning and Training, you learn the way you learn best.</li></ul><h3>Conferences</h3><p>A conference is a good place where people or companies share their experiences and best practices.</p><ul><li><a href="https://www.youtube.com/channel/UCTdw38Cw6jcm0atBPA39a0Q"><strong>NDC Conferences</strong></a></li><li><a href="https://www.youtube.com/c/ReactNext"><strong>ReactNext Conf</strong></a></li><li><a href="https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw"><strong>ReactRally Conf</strong></a></li><li><a href="https://www.youtube.com/c/WixTechTalks"><strong>Wix Engineering Tech Talks</strong></a></li><li><a href="https://www.youtube.com/c/JSNation"><strong>JavaScript Conferences by GitNation</strong></a></li><li><a href="https://www.youtube.com/c/HolyJS"><strong>HolyJS</strong></a></li><li><a href="https://www.youtube.com/channel/UC1hOCRBN2mnXgN5reSoO3pQ"><strong>React Conf 2021</strong></a></li><li><a href="https://www.youtube.com/c/ReactConferences"><strong>React Conferences by GitNation</strong></a></li><li><a href="https://www.youtube.com/c/JSConfEU"><strong>JSConf</strong></a></li><li><a href="https://www.youtube.com/c/UtahJS"><strong>UtahJS</strong></a></li><li><a href="https://www.youtube.com/c/Pusher_realtime/videos"><strong>Pusher</strong></a></li><li><a href="https://www.youtube.com/channel/UCz5vTaEhvh7dOHEyd1efcaQ"><strong>ReacConf</strong></a></li><li><a href="https://www.youtube.com/channel/UCVk8weS4S2kJfja72fTxh5A"><strong>freeCodeCamp Talks</strong></a></li></ul><h3>YouTube Channels</h3><p>We love YouTube! It’s a nice place to spend a few hours of your life watching some cool stuff.</p><ul><li><a href="https://www.youtube.com/@learnwithjason"><strong>Learn With Jason</strong></a><strong> — </strong>learn something new related to Web Dev in 90 minutes!</li><li><a href="https://www.youtube.com/c/Freecodecamp"><strong>freeCodeCamp.org</strong></a></li><li><a href="https://www.youtube.com/c/Honeypotio"><strong>Honeypot</strong></a></li><li><a href="https://www.youtube.com/channel/UClcdrPcu8o3vzMdCKmSOlrA/featured"><strong>Honeypot Talks</strong></a></li><li><a href="https://www.youtube.com/c/shopifydevs"><strong>ShopifyDevs</strong></a></li><li><a href="https://www.youtube.com/c/CodingTech"><strong>Coding Tech</strong></a></li><li><a href="https://www.youtube.com/c/VercelHQ"><strong>Vercel</strong></a></li><li><a href="https://www.youtube.com/c/IBMTechnology"><strong>IBM Technology</strong></a></li><li><a href="https://www.youtube.com/c/Codevolution"><strong>Codevolution</strong></a></li><li><a href="https://www.youtube.com/c/uidotdev"><strong>uidotdev</strong></a></li><li><a href="https://www.youtube.com/c/WesBos"><strong>Wes Bos</strong></a></li><li><a href="https://www.youtube.com/c/LeeRobinsonDev"><strong>Lee Robinson</strong></a></li><li><a href="https://www.youtube.com/kepowob/videos"><strong>Kevin Powell</strong></a></li><li><a href="https://www.youtube.com/c/wcandillon"><strong>William Candillon</strong></a></li><li><a href="https://www.youtube.com/c/Fireship"><strong>Fireship</strong></a></li><li><a href="https://www.youtube.com/channel/UC2Xd-TjJByJyK2w1zNwY0zQ"><strong>Beyond Fireship</strong></a></li><li><a href="https://www.youtube.com/c/BenAwad97/videos"><strong>Ben Awad</strong></a></li><li><a href="https://www.youtube.com/c/JamesQQuick"><strong>James Q Quick</strong></a></li><li><a href="https://www.youtube.com/c/leighhalliday"><strong>Leigh Halliday</strong></a></li><li><a href="https://www.youtube.com/c/ApolloGraphQL"><strong>Apollo GraphQL</strong></a></li><li><a href="https://www.youtube.com/c/LevelUpTuts/videos"><strong>LevelUpTuts</strong></a></li><li><a href="https://www.youtube.com/c/TailwindLabs"><strong>Tailwind Labs</strong></a></li><li><a href="https://www.youtube.com/channel/UCyLNhHSiEVkVwPSFKxJAfSA"><strong>Laith Academy</strong></a></li><li><a href="https://www.youtube.com/c/JackHerrington"><strong>Jack Herrington</strong></a></li><li><a href="https://www.youtube.com/c/Codesmith-School"><strong>Codesmith School</strong></a></li><li><a href="https://www.youtube.com/c/%D0%A4%D1%80%D0%BE%D0%BD%D1%82%D0%B5%D0%BD%D0%B4"><strong>Yandex Academy</strong></a></li><li><a href="https://www.youtube.com/c/TechWorldwithNana"><strong>TechWorld with Nana</strong></a></li><li><a href="https://www.youtube.com/c/AniaKub%C3%B3w/videos"><strong>Code with Ania Kubów</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b245da2fa4c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Overview — Declaring and Using Variables]]></title>
            <link>https://antsitvlad.medium.com/javascript-overview-declaring-and-using-variables-c3fa415d4198?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3fa415d4198</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Wed, 13 Jul 2022 09:21:45 GMT</pubDate>
            <atom:updated>2022-07-13T09:21:45.727Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript Overview — Declaring and Using Variables</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*El7t8dkRuUonnmhrGU5Q1w.jpeg" /></figure><h3>Scope</h3><p><strong>Scope</strong> is the set of rules that controls how references to variables are resolved. Scope is all about the <strong>visibility of variables</strong> in your code — it controls which variable can be used where. Each <strong>scope</strong> can “look out” into the scope around it. Scope is static and contains a fixed set of variables available at the moment and location you define a function.</p><blockquote>Scopes are like buckets, and variables are like marbles you put into those buckets.<strong> — You Don’t Know JS Yet</strong></blockquote><p>JavaScript knows <strong>three types of scope</strong>: <strong>Global Scope,</strong> <strong>Function Scope, Block Scope.</strong></p><p><strong>Global Scope</strong> is the scope that contains, and is visible in, all other scopes.</p><p>Until ES6, <strong>function scope</strong> was the only form of scope in JavaScript; all variable and function declarations followed function scope rules. Block scope was introduced in ES6 and is used only by the variables declared with the new variable declaration keywords let and const.</p><p><strong>Function scope</strong> in JavaScript is created inside functions. When a function is declared, a new scope block is created inside the body of that function. Variables that are declared inside the new function scope cannot be accessed from the parent scope; however, the function scope has access to variables in the parent scope.</p><blockquote><strong>Parent scope</strong> is the block of code, which the function is defined in. It is not the block of code in which the function is called.</blockquote><p>To create a variable with function scope, we must declare the variable with the <strong>var</strong> keyword.</p><p><strong>Block scope</strong> in JavaScript is created with curly braces ({}). A pair of curly braces can be placed anywhere in the code to define a new scope block. If statements, loops, functions, and any other curly brace pairs will have their own block scope. This includes floating curly brace pairs not associated with a keyword (if, for, etc).</p><h3>Hoisting</h3><p><strong>JavaScript Hoisting</strong> refers to the process whereby the interpreter movie the declaration of functions, variables, or classes to the top of their scope, prior to execution of the code.</p><p>You can think of hoisting being a feature that is based on two ‘phases’ of code execution:</p><ul><li><strong>Compile Phase</strong> (where code is also analyzed)</li><li><strong>Execution Phase</strong> (where the code is then executed)</li></ul><p>JavaScript allocates memory for all variables and functions defined in the program before execution. And JavaScript only hoists declarations, not the initializations.</p><p><strong>Declaration –&gt; Initialisation/Assignment –&gt; Usage</strong></p><p><strong>More:</strong></p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Hoisting">Hoisting MDN</a></li><li><a href="https://www.digitalocean.com/community/tutorials/understanding-hoisting-in-javascript">Understanding Hoisting in JavaScript</a></li></ul><h3>Bindings</h3><p>To catch and hold values, JavaScript provides a thing called <strong>a <em>binding</em></strong>, or <strong><em>variable</em></strong><em>.</em></p><p>let myName = “Joe”</p><p>In this sentence the keyword let indicates that we are going to define a binding. It is followed by the name of the binding and, if we want to immediately give it a value, by an = operator and an expression. This binding called (binding name)myName and uses to grab and hold of the Joe string. Bindings don’t <strong>contains</strong> values, they <strong>grab</strong> tham.</p><p>After a binding has been defined, its name can be used as an expression.</p><p>If we define a binding without giving it a value there nothing to grab so we will get the value undefined.</p><p>JavaScript systems always put a number of useful standard bindings into your environment, like: alert() , console.log()</p><p>Each binding has a <strong><em>scope</em></strong>, which is the part of the program in which the binding is visible. A variable or binding can only be used in its scope and <strong>any nested scope</strong>.</p><p>For bindings defined outside of any function or block, the scope is the whole program — you can refer to such bindings wherever you want. These are called global.</p><p>But bindings created for function parameters or declared inside a function can be referenced only in that function, so they are known as local bindings.</p><p><strong>More:</strong></p><ul><li><a href="https://eloquentjavascript.net/02_program_structure.html#h_lnOC+GBEtu">Bindings</a></li><li><a href="https://eloquentjavascript.net/03_functions.html#h_XqQR5FlX+8">Binding and scope</a></li></ul><h3>var, let and const</h3><p>Basic JavaScript uses the keyword var for variable declaration and</p><p><strong>ECMAScript 6 (ES6/ES2015)</strong> introduced the let and const keywords that support the declaration of <strong>block scope local variables</strong>. This means the variable will be confined to the scope of a block that it is defined in, such as an <strong>if statement or </strong><strong>for loop</strong> and will not be accessible outside of the opening and closing curly braces of the block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*TKyO-YM0TdOwuP9DPm3sUg.png" /></figure><p>This is contrary to var declarations which are accessible outside blocks they are defined in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*sihn7aV1ah2nj7OCdKBxPw.png" /><figcaption>var-declared variables are function-scoped</figcaption></figure><p>The difference between let and const is that a const declaration is, as the name implies, constant — a read-only reference to a value. This does not mean the value is immutable, just that the variable identifier cannot be reassigned.</p><p><strong>Note: </strong>Since a hoisted variable that’s been declared with var can be used before it is declared, we have to be careful to not use that variable before it has been assigned a value. If a variable is accessed before it has been assigned a value, it will return the value as undefined, which can cause problems, especially if variables are used in the global scope.</p><p><strong>Sources and more:</strong></p><ul><li><a href="https://www.geeksforgeeks.org/difference-between-var-let-and-const-keywords-in-javascript/">Var, </a><a href="https://www.geeksforgeeks.org/difference-between-var-let-and-const-keywords-in-javascript/">Let, and </a><a href="https://www.geeksforgeeks.org/difference-between-var-let-and-const-keywords-in-javascript/">Const — What’s the Difference?</a></li><li><a href="https://exploringjs.com/es6/ch_variables.html#_ways-of-declaring-variables">Ways of declaring variables</a></li></ul><h3>Temporal Dead Zone (TDZ)</h3><p><strong>Temporal Dead Zone (TDZ)</strong> is the term to describe the state where variables are un-reachable. They are in scope, but they aren’t declared. And we get ReferenceError. Variables declared by let or const <strong>have TDZs.</strong></p><p>Variables declared with the keywords let and const have block scope. When a variable is declared with block scope, it does NOT have the same variable hoisting as variables that are created in function scope. Block scoped variables are <strong>not hoisted to the top of the scope and therefore cannot be accessed until they are declared.</strong> This means that variables that are created with block scope are subject to the <strong>Temporal Dead Zone (TDZ)</strong>. The TDZ is the period between when a scope is entered and when a variable is declared. It ends when the variable is declared rather than assigned.</p><p><strong>If a variable is accessed inside the Temporal Dead Zone</strong>, then a runtime error will be thrown. This is important because it allows our code to be built more robustly with fewer semantic errors arising from variable declaration.</p><p>Let’s look at some example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*MSmkZrbvSMVlgi4ti8HkgQ.png" /></figure><p>If we run this code we will get ReferenceError . Why? When we declaring variable const x = 5 in block scope {} we create TDZ for x that we use in console.log(x)</p><p>You can find more examples <a href="https://exploringjs.com/es6/ch_variables.html#sec_temporal-dead-zone">here</a>.</p><h3>Global object</h3><p>Let’s look at one example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*SZgVJK6kh9fOmXaCiTSVSQ.png" /></figure><p>ES6 introduced a distinction for JavaScript global object (window in browsers, global in Node.js):</p><ul><li>All properties of the global object are global variables. In global scope, the following declarations create such properties: var declarations, Function declarations</li><li>But there are now also global variables that are not properties of the global object. In global scope, the following declarations create such variables: let and const declarations, class declarations</li></ul><p>The environments for various variables form the following chain:</p><p>Module variables → Global variables → Global object</p><h3>Function declarations and class declarations</h3><p>Function declarations:</p><ul><li>are block-scoped, like let.</li><li>create properties in the global object (while in global scope), like var.</li><li>are <strong>hoisted</strong>: independently of where a function declaration is mentioned in its scope, it is always created at the beginning of the scope.</li></ul><p>Class declarations:</p><ul><li>are block-scoped.</li><li>don’t create properties on the global object.</li><li>are not hoisted.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3fa415d4198" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All you need to know about Auth in the Web. Identity and Access Management.]]></title>
            <link>https://antsitvlad.medium.com/all-kind-of-you-need-to-know-about-identity-and-access-management-auth-in-the-web-d13f4c636bf7?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/d13f4c636bf7</guid>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[identity-management]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Fri, 10 Jun 2022 06:59:41 GMT</pubDate>
            <atom:updated>2022-06-28T09:23:22.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocH0R1erMPIUXKY7eUdHcw.png" /></figure><p>Nowadays, almost every website requires some form of Authentication and Authorization to access its features and content. And these are vast and complex topics, it’s really what can get you burn down. Protocols, tools, technologies, concepts, and so on… This article aims to demystify the main parts of it. Of course, I can’t cover everything in this article, but don’t worry, I will provide lots of helpful links.</p><h3>Life before Identity and Access Management systems</h3><p>In the world of computers, people are trying to get access to resources on another computer for example web apps. In order for a web app to work with people, it needs to know who you are. It needs to know stuff about you. So traditionally it ends up happening if they have a database with all information about the users and so now when you log in to the app it knows all information about you.</p><p>But it’s just one app and if you want another app you need to create a separate database for this app where you need to store all information about the users. And now that app can know about you.</p><p>Imagine we have more and more apps where we need to know and manage information about the users. And here is a problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRH8lmH4jpfTC5IabFYX9A.png" /><figcaption>Each website/app has independent and own database. It’s means all user credentials applies only for this site.</figcaption></figure><p>So what is the solution? As you already guess it’s Identity and Access Management system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNG0L_f4ZsYn5z9ppsDdZw.png" /></figure><p>And really cool part is now one single user only has to tell the IdM system who they are just once. With IdM we don’t need to worry about creating separate Identities for individual apps.</p><h3>Identity and Access Management (IAM)</h3><h4><strong>Identity management</strong></h4><p>The term <strong>“</strong><a href="https://www.cloudflare.com/en-gb/learning/access-management/what-is-identity/"><strong>identity</strong></a><strong>”</strong> is defined as a collection of attributes associated with a specific person or entity in a particular context. A digital identity is a key to access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*ZcAjFtzepmwgWaEEpB9QyQ.png" /></figure><p><strong>Identity management</strong> is the process of creating, maintaining, and revoking user accounts and providing the mechanisms used to authenticate users.</p><h4><strong>Access control or Access management</strong></h4><p><strong>“Access”</strong> refers to what data an “identities” can see and what actions they can perform when the system knows who they are.</p><p><strong>Access control or Access management </strong>is the process or mechanism of granting or denying use of a resource or performing an actions. And we have two main form it: <a href="https://www.okta.com/identity-101/what-is-role-based-access-control-rbac/">Role-Based Access Control</a> and <a href="https://www.okta.com/blog/2020/09/attribute-based-access-control-abac/">Attribute-Based Access Control</a>. And we need to know <a href="https://www.okta.com/identity-101/role-based-access-control-vs-attribute-based-access-control/">when to use</a> each of them.</p><p>In other words, just because a “Identity” is verified, that doesn’t mean they should be able to access whatever they want within a system or a network.</p><p><strong>There are three steps to the access control process:</strong></p><ul><li><strong>Identification</strong> — The process by which a subject identifies itself to the access control system</li><li><strong>Authentication</strong> — Verification of the subject’s identity</li><li><strong>Authorization</strong> — The decision to allow or deny access to an object</li></ul><p>The Authentication step usually happens behind the scenes.</p><p><strong>And there are three types of “Identity” when it comes to access control for a specific resource:</strong></p><ul><li><strong>Authorized</strong> — Those who have presented authenticated credentials and have been approved for access to the resource</li><li><strong>Unauthorized</strong> — Those who have presented authenticated credentials but are not approved for access to the resource</li><li><strong>Unknown</strong> — Those who have not presented authenticated credentials</li></ul><h4>What are <strong>Identity and access management?</strong></h4><p><strong>Identity and access management (IAM or IdAM for short) also known as Identity Management</strong> <strong>(IDM)</strong> is a way to tell who a user is and what they are allowed to do. It’s an Identity management and Access control combined together.</p><p>Identity and Access Management System verify user identities and control user privileges. <strong>IAMs</strong> are used to protect online resources from unauthorized access and comprise an important part of a comprehensive security model.</p><blockquote><strong>So we can think of Identity and Access Management as getting the right people the right access to the right resources at the right time.</strong></blockquote><p>While identity and access management is a simple concept, in theory, many factors need to work together for it to work well in practice. Identity and access management poses many challenges to developers of modern applications. It requires careful planning, design, and development to implement an application. And there is no one solution that can fit each use case.</p><p>Before we continue I highly recommend later to checking out this book: <a href="https://www.amazon.com/Solving-Identity-Access-Management-Applications/dp/148425094X">Solving Identity Management in Modern Applications</a></p><h4>The difference between Identity and Access Management</h4><p>The difference between identity management and access management can be simplified like this:</p><ul><li>Identity Management is all about managing the attributes related to the “Identity”, group of users, or another identity that may require access from time to time.</li><li>Access Management is all about evaluating those attributes based on existing policies and making a yes or no access decision based upon those attributes.</li></ul><h3>Terms we should know</h3><h4>Identification or Identity Proofing</h4><p><strong>Identity proofing </strong>is the process of verifying a identity: confirming that they are who they say they are. This may sound like ordinary authentication, the kind based on a username/password combination, but identity proofing actually comes into play before users get their credentials to access an application or alongside the traditional authentication process.</p><p>The ultimate goal of identity proofing is to ensure that a user’s claimed identity matches their actual identity: in other words, that their identity is real and not fictitious. That’s why identity proofing is a first-line defense against today’s attacks on the identity perimeter.</p><p>Identification is the first step of access control.</p><h4>Authentication</h4><p><strong>Authentication</strong> is the process of proving that you are who you say you are and gaining access to a resource or service based on your identity.</p><p>Authentication ensures that data is not exposed to the wrong person. To access online content that is not publicly available, a user needs to authenticate.</p><p><strong>The three primary authentication factors are:</strong></p><ul><li>Something you know — Secret knowledge, such as a password</li><li>Something you have — A token or device</li><li>Something you are — Unique physical characteristics of a person, such as those that can be detected by a retinal or iris scan, fingerprint scan, or voice analysis”</li></ul><p><strong>Most common Authentication methods:</strong></p><ul><li><a href="https://auth0.com/blog/username-password-authentication/">Username/Email and Password</a></li><li><a href="https://www.cloudflare.com/en-gb/learning/access-management/what-is-multi-factor-authentication/">Multi-factor authentication (MFA)</a></li><li><a href="https://www.okta.com/identity-101/what-is-token-based-authentication/">Token authentication</a></li><li><a href="https://www.ssh.com/academy/ssh/public-key-authentication">Public key certificate</a></li><li><a href="https://www.onelogin.com/learn/biometric-authentication">Biometric authentication</a></li><li><a href="https://www.onelogin.com/learn/how-single-sign-on-works">Single sign-on (SSO)</a> or <a href="https://www.okta.com/identity-101/what-is-federated-identity/">Federated Authentication</a></li></ul><p>I also recommend checking out <a href="https://auth0.com/resources/ebooks/authentication-survival-guide">Authentication Survival Guide</a> (book)</p><h4>Authorization</h4><p><strong>Authorization</strong> refers to the process of verifying what a user has access to. We use authorization to manage user access (allowing or blocking user actions).</p><p><a href="https://www.okta.com/identity-101/authentication-vs-authorization/">Authorization vs. authentication: How are they different?</a></p><p>Also, check out <a href="https://auth0.com/blog/forbidden-unauthorized-http-status-codes/">How to use HTTP status code in the authorization context?</a></p><h4>Identity Provider (IDP)</h4><p>An identity provider (IdP) is a service that stores and manages digital identities. It’s a server in a foreign domain that can provide identity information to other domains.</p><p><a href="https://www.cloudflare.com/learning/access-management/what-is-an-identity-provider/">Why are IdPs necessary?</a></p><h4>Service Provider (SP)</h4><p>It’s an application/website user try to access.</p><h4>Session/Cookie-based authentication</h4><p>A session stores information about the user, such as a unique ID, time of login and expirations, and so on.</p><p>By default, when a user leaves a website or closes their browser, their session ends. To keep users from having to log in every time they return, applications can extend sessions by storing session information in a cookie. Sessions end when a user logs out or when session lifetime limits are reached. Resetting a user’s password, email, or phone number also causes the session to expire.</p><p><strong>Typical Session-based authentication flow looks like:</strong></p><ol><li>User submits login credentials (email/username and password)</li><li>Server verifies the credentials against the Database</li><li>Server creates a temporary user Session</li><li>Server sends a cookie with a Session ID</li><li>On each request user sends the cookie with each request (that how cookies works)</li><li>On each request server validates the cookie in request against the session store &amp; grand access</li><li>When a user logs out, the server destroys the Session and cleans the cookie for the user.</li></ol><p>Sookie-based authentication is stateful. This means that an authentication record or session must be kept both server and client-side. The server needs to keep track of active sessions in a database, while on the front-end a cookie is created that holds a session identifier, thus the name cookie based authentication.</p><p>Session-based authentication is no longer the best practice. The problem of cookie based authentication is caused by the mechanism of how cookies work. Cons of a cookie based authentication are as blow:</p><ol><li>Stateful. Need to store session in a database on server. It’s not good for API.<strong> </strong>APIs provide one-time resources for authenticated end-users and don’t need to keep track of user sessions. Cookies don’t work perfectly in this case, since they track and verify active sessions.</li><li>CORS. Cookies + CORS don’t play well across different domains.</li><li>CSRF. You need to prevent your API from CSRF attack.</li><li>Mobile platform. Cookies is for web browser. You need to do extra work for mobile native platform which is not easy to implement.</li></ol><p>Check out: <a href="https://auth0.com/blog/application-session-management-best-practices/">How to maintain application sessions in different scenarios?</a></p><h4>Token-based authentication</h4><p><a href="https://www.cloudflare.com/en-gb/learning/access-management/token-based-authentication/">Token-based authentication</a> is a protocol which allows users to verify their identity, and in return receive a unique access token.</p><p><strong>Typical Token-based authentication flow looks like:</strong></p><ol><li>User submits login credentials (email/username and password)</li><li>Server verifies the credentials against the Database</li><li>Server generates temporary tokens and embeds user data into them (these tokens are called <strong>Access Token </strong>and<strong> Refresh Token. </strong>The Access Token will have less expiry time (60 minutes) and Refresh Token will have long expiry (10 days).</li><li>Server responds back with these tokens</li><li>User stores these tokens on client-side</li><li>User sends Access Token along with each request</li><li>On each request server validates the Access Token &amp; grand access (if the access token expired the client requests a new Access Token by sending Refresh Token to the server, and the server validates the Refresh token and if it’s valid issues a new access token (and, optionally, a new refresh token). Example of Refresh Token flow check <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-1.5">Refresh Token in OAuth 2.0 Authorization Framework</a></li><li>When user logs out, token is cleared from client storage.</li></ol><p>Token-based authentication is stateless. The server does not keep a record of which users are logged in or which JWTs have been issued. Instead, every request to the server is accompanied by a token which the server uses to verify the authenticity of the request. The token is generally sent as an addition Authorization header in form of Bearer {JWT}, but can additionally be sent in the body of a POST request or even as a query parameter.</p><p>Check out <a href="https://auth0.com/blog/stateless-auth-for-stateful-minds/">The Benefits of Going Stateless</a></p><p>Typically, single-page apps (such as React, Vue, and AngularJS + Node), native mobile apps (such as iOS and Android), and web APIs benefit most from token-based authentication. Traditional, server-side web applications have traditionally used cookie-based authentication.</p><h4>Session or Token Authentication</h4><p>Determining which authentication method to use is a critical factor in developing mobile apps or single-page web applications. While the need to scale with an authentication method that’s mobile-ready will draw many developers to using tokens, the simplicity of cookies may appeal to others. Ultimately, questions regarding cookie vs token authentication methods will be determined by the type of application or web platform being built.</p><p>Check out <a href="https://www.youtube.com/watch?v=UBUNrFtufWo&amp;ab_channel=Fireship">Session vs Token Authentication</a>.</p><h4><strong>Access Token</strong></h4><p>Access tokens are used in token-based authentication to allow an application to access an API. It’s a string to access protected resources. It imposes no requirement on the format, structure, or process in which it’s used. But in many cases developers use <a href="https://auth0.com/docs/secure/tokens/json-web-tokens"><strong>JSON web token (JWT)</strong></a> standard for Access tokens.</p><p>Once an application has received an access token, it will include that token as a credential when making API requests. To do so, it should transmit the access token to the API as a Bearer credential in an HTTP Authorization header and it’s called Bearer Token.</p><h4>Refresh Token</h4><p><a href="https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/">Refresh Token</a> is a specialized token used to obtain or refresh expired Access Tokens. While Access Tokens are issued by authorization servers and consumed by resource servers, the Refresh Token is both issued and consumed solely by an authorization server.</p><p>A Refresh Token represents all the resources to which the resource owner granted access and can be used to obtain access tokens that target either all or just a subset of those resources.</p><h4>JWT (JSON Web Tokens)</h4><p><a href="https://auth0.com/docs/secure/tokens/json-web-tokens">JSON Web Tokens</a> are an open, industry-standard <a href="https://tools.ietf.org/html/rfc7519"><strong>RFC 7519</strong></a> method for representing claims securely between two parties. What JWT brings to the table is a simple, useful, standard container format</p><p><strong>JWT consists of 3 parts:</strong></p><ul><li><strong>Header</strong> — contains metadata about the token (type, hashing algorithm etc.)</li><li><strong>Payload</strong> — contains claims (statements about an entity — for example a name) and additional data.</li><li><strong>Signature</strong> — is the result of the encoded header, the encoded payload, signed against a secret.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJqX1OmyG3DBRPJs5o0n1g.png" /></figure><p>We typically use JWT for Authorization or secure exchange of information between parties. And we use it to verify that the sender is who they claim to be.</p><p>A better and secure way to store JWT on a Client is in HttpOnly Cookies.</p><p><a href="https://www.youtube.com/watch?v=iSStmRn05nA">RS256 and HS256</a> are the two most common algorithms to sign JWTs.</p><p>Also, check out the <a href="https://auth0.com/resources/ebooks/jwt-handbook">JWT Handbook</a> (book), and <a href="https://www.youtube.com/watch?v=DPrhem174Ws&amp;ab_channel=FullStackDevelopersIsrael">The Parts of JWT Security Nobody Talks About</a> (video), and <a href="https://www.youtube.com/watch?v=pYeekwv3vC4&amp;ab_channel=ForwardJS">Why JWTs are the worst possible solution for solving web authentication problems?</a> (video)</p><h3>Events in the Life of an Identity</h3><p>In any system, the process of establishing a person’s identity and then using this identity later involves multiple stages often referred to as the “identity lifecycle”.</p><h4>Identity and access provisioning life cycle</h4><p>The identity and access provisioning life cycle directly address the management of accounts from creation to deletion. When an account is first created, it is provisioned with appropriate privileges. During the useful lifetime of an account, these privileges are often modified and the account needs to be periodically reviewed to ensure that it has not been granted excessive privileges. When the account is no longer being used, such as when a user leaves the company, it should be disabled as soon as possible and deleted when it has been determined that it is not needed.</p><p>Let’s look at common events in the life of an Identity:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgTwrKHDV0p7nETFHMZkYQ.png" /><figcaption><strong>Resource:</strong> Solving Identity Management in Modern Applications by Yvonne Wilson and Abhishek Hingnikar</figcaption></figure><p><strong>Provisioning and Deprovisioning</strong></p><p>Provisioning is the process of making information technology (IT) systems available to users.</p><p>Deprovisioning is the process of removing user access to software and network services.</p><p><a href="https://www.onelogin.com/learn/what-is-user-provisioning-and-deprovisioning">How do provisioning and de-provisioning work?</a></p><p><strong>Authorization</strong></p><p>When an account is created, it is often necessary to specify what the account can do, in the form of privileges. We use the term authorization for the granting of privileges that govern what an account is allowed to do.</p><p><strong>Authentication</strong></p><p>To access online content that is not publicly available, a user needs to authenticate. A user provides an identifier to signify the account they wish to use and enters login credentials for the account.</p><p><strong>Access Policy Enforcement</strong></p><p>Once a user has been authenticated and associated with an account, it is necessary to enforce an access policy to ensure any actions taken by the user are allowed by the privileges they have been granted. We use the term access policy enforcement for the enforcement of access policy specified by authorization. In other words, authorization specifies what a user or entity is allowed to do, and access policy enforcement checks that a user’s requested actions are allowed by the privileges they’ve been authorized to use.</p><p><strong>Sessions</strong></p><p>Once a user has been authenticated and authorized, they will perform various actions within an application. Some applications, typically traditional web applications, and sensitive applications, only allow a user to remain active for a limited period of time before requiring the user to authenticate again. They do this by managing a session for the user. A session tracks information such as whether the user has been authenticated, and if so, typically also the authentication mechanism or strength level used, and when authentication occurred, in addition to a user identifier. This enables an application to know when the user should be prompted to reauthenticate.</p><p>The length of time a user is allowed to remain active before reauthentication is known as a session limit or session timeout. The session timeout settings will typically vary by the sensitivity of the data in the application. Session limits help protect against users who walk away from their screen without logging off and identity information that may have changed since the session was created. A session limit that forces a user to periodically reauthenticate provides a check that it is still the legitimate user at the keyboard. It can also trigger a renewal of the user’s identity information and account status.</p><p><strong>Single Sign-On (SSO)</strong></p><p>After a user accesses one application, they may wish to do something else involving another application. Single sign-on (SSO) is the ability to log in once and then access additional protected resources or applications with the same authentication requirements, without having to reenter credentials.</p><p>We will dive deeper into SSO a bit later.</p><p><strong>Stronger Authentication</strong></p><p>Step-up authentication and multi-factor authentication (MFA) both involve authenticating a user with stronger forms of authentication. Some forms of authentication, such as username-password authentication, are considered relatively weak because they involve a single factor, the password, which can be captured and easily used by others.</p><p><strong>Logout</strong></p><p>When a user is done with an application, they should terminate their session by logging out. At a minimum, the act of logging out should terminate the user’s application session. If they return to the application, they would have to authenticate again before being granted access. In situations where single sign-on is used, there may be multiple sessions to terminate, and it is a design decision as to which sessions should be terminated when the user logs out of one application.</p><p>The act of logging out is slightly different than a session timing out. In the former case, the user explicitly requests that their session be terminated. When a session times out, an application may elect to keep the session in a suspended state and reconstitute the session if the user authenticates again.</p><p><strong>Account Management and Recovery</strong></p><p>During the course of an identity’s lifetime, it may be necessary to change various attributes of the user profile for the identity. For example, a user may need to update their email address or phone number. A user may need to update their name in some circumstances or to periodically change their password or mobile device used in the authentication process. In a company, a user’s profile might be updated to reflect a new position, address, or privileges such as roles. Account management consists of features or processes which enable users and administrators to view and update user profile attributes associated with an identity.</p><p>A user may also forget their password or lose a device that is required for an authentication process. If this happens, a user needs to establish new credentials. This requires an alternate means of establishing the user’s ownership of the account before allowing them to set new credentials. Account recovery is a mechanism to validate a user is the legitimate owner of an account through some secondary means and then allow the user to establish new credentials.</p><h3>Single sign-on (SSO)</h3><p><a href="https://auth0.com/blog/what-is-and-how-does-single-sign-on-work/"><strong>Single sign-on (SSO)</strong></a><strong> is an authentication process</strong> that allows a user to access multiple applications and services within the <strong>same organization or domain</strong> using a single set of credentials.</p><p>With SSO, a user signs in at a single login screen and can then use several apps. It means once you logged in you don’t need to log in repeatedly for each application linked to the system.</p><p>SSO solves a big problem: how to manage the increasing number of users across a whole ecosystem of applications and services.</p><h4>How does SSO work?</h4><p>SSO is possible when a set of applications has delegated authentication to the same entity. It works based upon a trust relationship set up between an application, known as the Service Provider, and an Identity Provider. This trust relationship is often based upon a certificate that is exchanged between the Identity Provider and the Service Provider.</p><p>The SSO system must communicate with every external app to tell them that the user is signed in.</p><p><strong>More:</strong></p><ul><li><a href="https://www.onelogin.com/learn/how-single-sign-on-works">How Does Single Sign-On Work?</a></li><li><a href="https://www.youtube.com/watch?v=0ndQbJaw89Y&amp;ab_channel=freeCodeCamp.org">SSO for Web APIs</a></li></ul><h3>Federated Identity</h3><p>To create a better system for the web, Federated Identity was created for Single Sign On (SSO).</p><p><a href="https://www.onelogin.com/learn/federated-identity">Federated Identity</a> (also known as Federated Identity Management or Federated Authentication) allows authorized users to access <strong>multiple applications and domains </strong>using a single set of credentials. It links a user’s identity across multiple <a href="https://www.onelogin.com/learn/iam">Identity Management Systems</a> so they can access different applications securely and efficiently. When organizations implement Federated Identity solutions, their users can access web applications, partner websites, Active Directory, and other applications without logging in separately every time. It can reduce IT overhead by delegating identity management to a single provider and improve the end-user experience by requiring a single set of credentials to access multiple resources.</p><p>Federated identity systems handle several concerns:</p><ul><li><strong>Authentication</strong> — validating user credentials and establishing the identity of the user.</li><li><strong>Authorization </strong>—<strong> </strong>access restrictions (e.g., is the user allowed to access X resource?).</li><li><strong>User attributes exchange</strong> — deals with data sharing across different user management systems. For instance, fields such as <em>“real name”</em> may be present in multiple systems. A federated identity system prevents data duplication by linking the related attributes.</li><li><strong>User management</strong> — related to the administration (creation, deletion, update) of user accounts. A federated identity system usually provides the means for administrators (or users) to handle accounts across domains or subsystems.</li></ul><p>With federated identity, employees can access <strong>multiple accounts across different domains using a common set of credentials.</strong> This improves the user experience. Also, since the system is based on trust between federated organizations, it also minimizes security risks.</p><p>Federated Identity Management was developed as a set of agreements and standards that help enterprises and applications share user identities. There are several solutions for federated identity management: SAML and OpenID Connect are two of the most common ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GvLFkac3E5xNz1NsqzqqHA.png" /></figure><h4><strong>How Federated Identity works</strong></h4><ol><li>The user attempts to access a resource controlled by a server.</li><li>The user does not have the proper credentials to access the resource, so the server redirects the user to the authorization server. The authorization server is configured to let users log-in using the credentials managed by an identity provider.</li><li>The user gets redirected by the authorization server to the identity’s provider log-in screen.</li><li>The user logs-in successfully and gets redirected to the authorization server. The authorization server uses the credentials provided by the identity provider to access the credentials required by the resource server.</li><li>The user gets redirected to the resource server by the authorization server. The request now has the correct credentials required to access the resource.</li><li>The user gets access to the resource successfully.</li></ol><h4>Components of federation</h4><ul><li><strong>Identity Provider or IDP</strong><em> — </em>IDP can be federated to multiple SPs.</li><li><strong>Service Provider or SP</strong><em> — </em>SP has nothing to do with the authentication of the user. It trusts the IDP to take care of that. All the SP cares about is that the user was authenticated properly.</li><li><strong>Assertion</strong> — the message that is sent between the IDP and SP. It’s containse attributes that the SP needs to create a user session. And it’s cryptographically signed so the SP can trust that it came from the right IDP.</li></ul><h4>Federated Identity vs Single Sign-on</h4><p>FIM and <a href="https://www.onelogin.com/learn/how-single-sign-on-works">Single Sign-on (SSO)</a> enable organizations to minimize password-related risks and secure their data and improve user experiences. Both kinds of solutions require a single set of credentials to grant the user access to multiple applications. But despite this similarity, these systems operate differently.</p><p>With SSO, users can access multiple applications within the same organization or domain using a single set of credentials. SSO is strictly related to the <strong>authentication part</strong> of a federated identity system. Its only concern is establishing the identity of the user and then sharing that information with each subsystem that requires the data.</p><p>Federated Identity goes a step further. It enables users to access applications or platforms across multiple enterprise domains that are part of the federated configuration. Thus, FIM supports SSO and also extends SSO to multiple domains. Also, SSO is a function of FIM, but implementing it doesn’t necessarily allow for FIM.</p><p>In simple words, Federated Identity Authentication is an extension of SSO and enables Single Sign-On to applications across multiple domains or organizations. While SSO lets users log into different apps owned by a single organization, Federated Identity does the same thing across multiple organizations.</p><p><strong>A good example for us to understand SSO and Federated Identity can be Google.</strong></p><p>Let’s open a new browser window in Incognito or Private mode, then let’s go to Google Docs (https://docs.google.com). When you try to go to this URL in your address bar you will see that your URL automatically changed to https://accounts.google.com/signin/v2/identifier...</p><p>Google Docs require you to be authenticated to use it. So it redirects you to https://accounts.google.com which is an Identity Provider service. After you enter your credential you will be redirected back to https://docs.google.com and can use it.</p><p>Now let’s go to another Google service, for example, Google Drive (https://drive.google.com).</p><p>Wow, as you can see Google Drive already know that you are logged in and shows your profile picture in the top-right corner. Here is SSO made it possible.</p><p>And as we learned before SSO works for the same domain in our case it&#39;s google.com. docs.google.com and drive.google.com just subdomains.</p><p>But let’s go to gmail.com or youtube.com (as we can see these are absolutely different domains and they are not subdomains like docs.google.com).</p><p>Wow, we also logged in to these services too. And here is Federated Identity.</p><p>There are a set of open specifications and protocols that specify how to design an authentication and authorization system. They specify how you should manage identity, move personal data securely, and decide who can access applications and data. Let’s look at the most popular</p><h3>Security Assertion Markup Language (SAML 2.0)</h3><p>SAML is an open standard protocol that standardized way to tell external applications and services that a user is who they say they are. It provided a solution for web single-sign-on across domains and Federated Identity.</p><p>SAML makes single sign-on (SSO) technology possible by providing a way to authenticate a user once and then communicate that authentication to multiple applications. The most current version of SAML is SAML 2.0.</p><blockquote><strong>NOTE:</strong> SAML 2.0 only solves the problem of authenticating users but didn’t help with authorization.</blockquote><p>SAML is basically a session cookie in your browser that gives you access to web apps. It’s limited in the kinds of device profiles and scenarios you might want to do outside of a web browser.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FSvppXbpv-5k%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSvppXbpv-5k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FSvppXbpv-5k%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/46e4816c0ee7002a1c6f4e299e4ae6a9/href">https://medium.com/media/46e4816c0ee7002a1c6f4e299e4ae6a9/href</a></iframe><blockquote><strong>NOTE:</strong> When SAML 2.0 was launched in 2005, it made sense. However, a lot has changed since then. Now we have modern web and native application development platforms. There are Single Page Applications (SPAs) like Gmail/Google Inbox, Facebook, and Twitter. They have different behaviors than your traditional web application, because they make AJAX (background HTTP calls) to APIs. Mobile phones make API calls too, as do TVs, gaming consoles, and IoT devices. SAML SSO isn’t particularly good at any of this.</blockquote><blockquote>— <a href="https://developer.okta.com/blog/2017/06/21/what-the-heck-is-oauth">Okta Dev</a></blockquote><blockquote>ALERT: To implement SSO by using SAML you need to relay good understanding of this protocol cuz it’s can be prone to exploits if not implemented correctly.</blockquote><blockquote>Use SAML only if you have <strong>requirements</strong> or you can’t adopt OAuth and OpenID Connect!!!</blockquote><h4>Benefits of SAML Authentication</h4><ul><li><strong>Improved User Experience</strong> — Users only need to sign in one time to access multiple service providers. This allows for a faster authentication process and less expectation of the user to remember multiple login credentials for every application. In the example above, that user could have clicked on any of the other icons in their dashboard and been promptly logged in without ever having to enter more credentials!</li><li><strong>Increased Security</strong> — SAML provides a single point of authentication, which happens at a secure identity provider. Then, SAML transfers the identity information to the service providers. This form of authentication ensures that credentials are only sent to the IdP directly.</li><li><strong>Loose Coupling of Directories</strong> — SAML doesn’t require user information to be maintained and synchronized between directories.</li><li><strong>Reduced Costs for Service Providers</strong> — With SAML, you don’t have to maintain account information across multiple services. The identity provider bears this burden.</li></ul><h4>SAML Concepts and Terminology</h4><p>The SAML specifications define the following terms:</p><ul><li><strong>Subject</strong> — An entity about which security information will be exchanged. A subject usually refers to a person, but can be any entity capable of authentication, including a software program. For the use cases we’ll discuss, the subject is generally a user of an application.</li><li><strong>SAML Profile </strong>— A specification that defines how to use SAML messages for a business use case such as cross-domain single sign-on.</li><li><strong>SAML Identity Provider</strong> — A role defined for the SAML cross-domain single sign-on profile. An identity provider is a server which issues SAML assertions about an authenticated subject, in the context of cross- domain single sign-on.</li><li><strong>SAML Service Provider</strong> — Another role defined for the SAML cross-domain single sign-on profile. A service provider delegates authentication to an identity provider and relies on information about an authenticated subject in a SAML assertion issued by an identity provider in the context of cross-domain single sign-on.</li><li><strong>SAML Trust Relationship</strong> — An agreement between a SAML service provider and a SAML identity provider whereby the service provider trusts assertions issued by the identity provider.</li><li><strong>SAML Protocol Binding</strong> — A description of how SAML message elements are mapped onto standard communication protocols, such as HTTP, for transmission between service providers and identity providers. In practice, SAML request and response messages are typically sent over HTTPS using either HTTP-Redirect or HTTP-POST, using the HTTP-Redirect and HTTP-POST bindings, respectively.</li><li><strong>SAML Request</strong> — request that SP sends to IdP. <a href="https://www.samltool.com/generic_sso_req.php">Example</a></li><li><strong>SAML Response</strong> — response that IdP sends to SP. <a href="https://www.samltool.com/generic_sso_res.php">Example</a></li><li><strong>SAML Issuer — </strong>EntityID (unique identifier) of the service provider.</li><li><strong>Recipient </strong>— EntityID (unique identifier) of the service provider.</li><li><strong>ID</strong> — generated number for identification.</li><li><strong>InResponseTo </strong>— the ID of the SAML Request that this response belongs to.</li><li><strong>Assertion</strong> — An XML-based message that contains security information about a subject. It’s XML-formatted tokens that are used to transfer user identity information, such as the authentication, attribute, and entitlement information, in the messages. SAML Assertion message (XML-formatted token) tells a Service Provider that a user is signed in. SAML Assertions contain all the information necessary for a Service Provider to confirm user identity, including the source of the assertion, the time it was issued, and the conditions that make the assertion valid.</li><li><strong>SAML Assertion Consumer Service or ACS</strong> — responsible for receiving the SAML Response from the IdP. Checking the Assertion signatures and validating the document.</li><li><strong>AssertionConsumerServiceURL</strong> — the SAML URL interface of the service provider, where the Identity provider sends the authentication token.</li><li><strong>Attributes</strong> — with SAML Response there’s going to be other information about the User, like first name, last name, email and etc.</li><li><strong>Relay State</strong> — is a way for IdP to remember where a user was before authentication. It allows the SP to send along, in the SAML Request, where a user was before the user triggered an authentication, the IdP preserves that Relay State and then sends it back to the SP, the Assertion Consumer Service then can determine where that user needs to go after authentication has been completed.</li><li><strong>SAML Trust</strong> — configuration between IdP and SP. There are certain pieces of information that are shared: signing certificate, Entity ID aka Issuer. This information is shared between SP and IdP so they can have a trust that allows them to validate the communications in SAML Requests and SAML Responses.</li><li><strong>SAML Metadata</strong> — is a convenience feature that really allows self-configuration between IdP and SP. It means instead of manually grabbing a certificate, different endpoints, EntryId/Issuer information and etc. from IdP to plugin into SP manually and vice versa. The metadata allows you to just share the entire XML configuration file or share the URL to this XML configuration file and then the SP and IdP can self-configure themselves based on the information within this configuration file. It makes a lot less manual work and makes it more convenient.</li></ul><h4>How does SAML work?</h4><p>The SAML protocol has 3 entities:</p><ul><li><strong>User Agent</strong> (for ex. Browser/User)</li><li><strong>Service Provider or SP </strong>— application you try to access.</li><li><strong>Identity Provider or IdP</strong> — centralized service that verifies who you are.</li></ul><p><strong>This is what a typical flow might look like:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hPSdL21loRb1DQESFo86A.png" /></figure><p>The User Agent makes a request of the Service Provider. The Service Provider then SAML Requests authentication from the Identity Provider. The Identity Provider sends a SAML Assertion to the Service Provider, and the Service Provider can then send a SAML Response to the principal.</p><p>Think of SAML authentication as being like an identification card: a short, standardized way to show who someone is. Instead of, say, conducting a series of DNA tests to confirm someone’s identity, it is possible to just glance at their ID card.</p><p>SAML SSO works by transferring the user’s identity from one place (the Identity Provider) to another (the Service Provider). This is done through an exchange of digitally signed XML documents.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fl-6QSEqDJPo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dl-6QSEqDJPo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fl-6QSEqDJPo%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/58325dea9859f7cdd3a499fb94d92da3/href">https://medium.com/media/58325dea9859f7cdd3a499fb94d92da3/href</a></iframe><p><a href="https://www.samltool.com/online_tools.php">Here is helpful tools if you are working with SAML</a>.</p><p>Identity Provider sharing the user information and the Service Provider just trust this information. Trust between IdP and SP works in two ways.</p><p>SAML is not an easy specification. As a matter of fact, it’s five specifications in one:</p><ul><li><strong>Metadata</strong> — this simply defines the rules of who an identity provider is or service provider. Metadata is XML that follows a schema which is governed by SAML spesification.</li><li><strong>Core/Protocols</strong> — XML schemas. These schemas describe the messages that are being sent back and forth.</li><li><strong>Binding</strong> — description of how do we send messages back and forth.</li><li><strong>Profile</strong> — combinations of protocols, assertions, and bindings that are used together to create a federation and enable federated single sign-on.</li><li><strong>Conformance</strong> — tells us how to conform to all specifications above.</li></ul><p>When configuring SAML you establish a trust relationship between the Service Provider and Identify Provider. A user who wants to access a Service Provider (SP) must first authenticate into Identity Provider (IDP). After the user is successfully authenticated and authorized the Identity Provider generates a SAML Assertion. The Assertion sends to Service Provider and if Service Provider trusts Identity Provider the user allows to access the Application.</p><p><strong>More:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=j9ALEIO3BSo&amp;ab_channel=Auth0">Securing SAML SSO from XML Signature Wrapping Attacks</a></li><li><a href="https://www.youtube.com/watch?v=HtLwy55LAOw&amp;ab_channel=AishwaryaVishwakarma">Single Sign-On (SSO): Understanding Metadata File | SAML Request and Response</a></li><li><a href="https://www.identityserver.com/articles/the-dangers-of-saml-idp-initiated-sso">The Dangers of SAML IdP-Initiated SSO</a></li><li><a href="https://www.onelogin.com/learn/saml">https://www.onelogin.com/learn/saml</a></li><li><a href="https://www.onelogin.com/learn/oidc-vs-saml">https://www.onelogin.com/learn/oidc-vs-saml</a></li></ul><h3>OAuth and OpenId Connect</h3><p>OAuth 2.0 is for authorization. OpenId Connect is for authentication.</p><h4>What is OAuth?</h4><p>OAuth it’s an authorization protocol specified by the OAuth 2.0 Authorization Framework for authorization between services. OAuth works over HTTPS and authorizes devices, APIs, servers, and applications with access tokens rather than credentials.</p><p>There are two versions of OAuth: <a href="https://tools.ietf.org/html/rfc5849">OAuth 1.0a</a> and <a href="https://tools.ietf.org/html/rfc6749">OAuth 2.0</a>. Nowadays, OAuth 2.0 is the most widely used form of OAuth.</p><p>Before OAuth, sites would prompt you to enter your username and password directly into a form and they would log in to your data. <a href="https://www.oauth.com/oauth2-servers/background/">Learn more about OAuth&#39;s Background here.</a></p><p>If you’ve ever seen something like the dialog below, that’s what we’re talking about. This is an application asking if it can access data on your behalf. This is OAuth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*ANZtUxgCfktVtYZsZWoUhg.png" /></figure><h4><strong>OAuth Concepts and Terminology</strong></h4><p><strong>OAuth 2.0 defines four roles involved in an authorization request:</strong></p><ul><li><strong>Client </strong>(the application)— system that requires access to the protected resources. To access resources, the Client must hold the appropriate Access Token.</li><li><a href="https://www.oauth.com/oauth2-servers/the-resource-server/"><strong>Resource Owner</strong></a> (the user)— user or system that owns the protected resources and can grant access to them.</li><li><a href="https://www.oauth.com/oauth2-servers/the-resource-server/"><strong>Resource Server </strong></a>(the API)<a href="https://www.oauth.com/oauth2-servers/the-resource-server/"><strong> </strong></a>— a server that protects the user’s resources and receives access requests from the Client. It accepts and validates an Access Token from the Client and returns the appropriate resources to it.</li><li><a href="https://developer.okta.com/docs/concepts/auth-servers/"><strong>Authorization server</strong></a> (can be the same server as the API)— the authority that is able to grant access to resources.</li></ul><p><strong>OAuth2.0 defines two client types:</strong></p><ul><li><strong>Confidential Client — </strong>An application that runs on a protected server and can securely store confidential secrets to authenticate itself to an authorization server or use another secure authentication mechanism for that purpose.</li><li><strong>Public Client — </strong>An application that executes primarily on the user’s client device (native application) or in the client browser and cannot securely store a secret or use other means to authenticate itself to an authorization server.</li></ul><p><strong>OAuth 2.0 defines two security tokens and an intermediary authorization code:</strong></p><ul><li><strong>Authorization Code </strong>— An intermediary, opaque code returned to an application and used to obtain an access token and optionally a refresh token. Each authorization code is used once.</li><li><strong>Access Token </strong>— a string that a Client uses to make requests to the Resource Server (API). Access tokens do not have to be in any particular format. <a href="https://auth0.com/blog/id-token-access-token-what-is-the-difference/">ID Token vs Access Token</a></li><li><strong>Refresh Token</strong> — a string that a Client can use to get a new Access Token without the user’s interaction (has to be stored securely by clients). <a href="https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/">Learn more about Refresh Tokens and How to Use Them Securely.</a></li></ul><p><strong>Some more terms:</strong></p><ul><li><strong>Redirect URIs or Reply URL</strong> — is the location where the authorization server sends the user after a user successfully authorizes an application. <a href="https://www.oauth.com/oauth2-servers/redirect-uris/">More</a>.</li><li><strong>Scopes </strong>— limit an app’s access to a user’s data. It specifies exactly the reason for which access to resources may be granted. <a href="https://www.oauth.com/oauth2-servers/scope/">More</a></li></ul><p><strong>How does OAuth work?</strong></p><p>Client must acquire its own credentials, a <em>client id</em> and <em>client secret</em>, from the Authorization Server in order to identify and authenticate itself when requesting an Access Token.</p><p>Using OAuth 2.0, access requests are initiated by the Client, e.g., a mobile app, website, smart TV app, desktop application, etc. The token request, exchange, and response follow this general flow:</p><ol><li>The Client requests authorization (<em>authorization request</em>) from the Authorization server, supplying the client id and secret to as identification; it also provides the scopes and an endpoint URI (<em>redirect URI</em>) to send the Access Token or the Authorization Code to.</li><li>The Authorization server authenticates the Client and verifies that the requested scopes are permitted.</li><li>The Resource owner interacts with the Authorization server to grant access.</li><li>The Authorization server redirects back to the Client with either an Authorization Code or Access Token, depending on the grant type, as it will be explained in the next section. A Refresh Token may also be returned.</li><li>With the Access Token, the Client requests access to the resource from the Resource Server.</li></ol><p><strong>Learn more about OAuth 2.0 </strong><a href="https://oauth.net/2/"><strong>here</strong></a><strong> and </strong><a href="https://www.oauth.com/"><strong>here</strong></a><strong>.</strong></p><h4>What is OpenID Connect (OIDC)?</h4><p><a href="https://openid.net/connect/">OpenId Connect</a> is a protocol used to authenticate users of an application, and represents those users in standard way.</p><p>OpenID Connect is a simple identity layer built on top of the OAuth 2.0 protocol. We can think of OpenID Connect as an extension to OAuth 2.0 that provides clear guidance on how to achieve a functional and secure authentication system.</p><h4>ID Token</h4><p>An <strong>ID token</strong> is an artifact that proves that the user has been authenticated. It was introduced by <a href="https://openid.net/connect/">OpenID Connect</a> (OIDC), an open standard for authentication used by many identity providers such as Google, Facebook and etc.</p><p><a href="https://auth0.com/blog/id-token-access-token-what-is-the-difference/">ID Token and Access Token: What’s the Difference?</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6DxRTJN1Ffo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6DxRTJN1Ffo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6DxRTJN1Ffo%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/fe6e0dceebb6736ddf883957961eecfa/href">https://medium.com/media/fe6e0dceebb6736ddf883957961eecfa/href</a></iframe><h4>Overview of OAuth and OpenId Connect</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8aCyojTIW6U%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8aCyojTIW6U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8aCyojTIW6U%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/48ab768be17c540bc29a1d0d1ef81f31/href">https://medium.com/media/48ab768be17c540bc29a1d0d1ef81f31/href</a></iframe><p><strong>Also check out:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=0VWkQMr7r_c">OAuth 2.0 and OpenID Connect in Plain English!</a></li><li><a href="https://www.youtube.com/watch?v=rTzlF-U9Y6Y">OAuth 2.0 &amp; OpenID Connect (OIDC): Technical Overview</a></li><li><a href="https://www.youtube.com/watch?v=aU9RsE4fcRM">How to Hack OAuth</a></li><li><a href="https://www.youtube.com/watch?v=i2wK-cTD_f0">Protect Your APIs with OAuth</a></li><li><a href="https://www.youtube.com/watch?v=H6MxsFMAoP8&amp;ab_channel=OktaDev">OAuth: When Things Go Wrong</a></li></ul><h4>Conclusion</h4><p>To summarize all information we learned in this article a recommend to check out this Technical Overview series: <a href="https://www.youtube.com/watch?v=Tcvsefz5DmA&amp;ab_channel=VMwareEnd-UserComputing">Identity and Access Management</a>, <a href="https://www.youtube.com/watch?v=SvppXbpv-5k&amp;ab_channel=VMwareEnd-UserComputing">SAML 2.0</a>, <a href="https://www.youtube.com/watch?v=rTzlF-U9Y6Y&amp;ab_channel=VMwareEnd-UserComputing">OAuth 2.0 &amp; OpenID Connect (OIDC)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d13f4c636bf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Overview — Understanding Functions]]></title>
            <link>https://antsitvlad.medium.com/javascript-overview-understanding-functions-154903b39cc6?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/154903b39cc6</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Thu, 02 Jun 2022 17:27:39 GMT</pubDate>
            <atom:updated>2022-06-14T11:46:33.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript Overview — Understanding Functions</h3><p>Functions in JavaScript (also as in any other programming language) is an important concept that allows us to write a code to use it later than it was written.</p><p>Functions help us use one of fundamental software design principle —<strong> DRY (Don’t repeat yourself).</strong></p><p>In JS functions are “first class objects”. It’s means everything that objects have they have too.</p><p>Executing a function is called<strong> <em>invoking</em>, <em>calling</em>, or <em>applying</em> it.</strong></p><h4>Parameters</h4><p>Using parameters for functions we can generalize the functions to make them reusable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*WShtVM-qEorxn97wdTKyMA.png" /></figure><blockquote><strong><em>Note:</em></strong><em> Parameters to a function behave like regular bindings, but their initial values are given by the caller of the function, not the code in the function itself.</em></blockquote><p>We can define <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">default parameters</a> when declaring a function.</p><p><strong>More:</strong></p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#function_parameters">Functions in JavaScript</a></li></ul><h4>Execution Context</h4><p>When the JavaScript engine executes a script for the first time (we can think like we execute one big function that contains our code), it creates the global execution context. During this phase, the JavaScript engine performs the following tasks:</p><ul><li>Create the global object i.e., window in the web browser or global in Node.js.</li><li>Create the this object and bind it to the global object.</li><li>Setup a memory heap for storing variables and function references.</li><li>Store the function declarations in the memory heap and variables within the global execution context with the initial values as undefined.</li></ul><p><strong>For each invocation of a function from this point the JavaScript engine creates a new function execution context comprising:</strong></p><ul><li>The thread of execution (we go through the code in the function line by line)</li><li>A local memory where anything defined in the function is stored</li></ul><blockquote><strong><em>Note: </em></strong><em>At runtime </em><strong><em>only one global execution context</em></strong><em> but </em><strong><em>multiple function (local) contexts</em></strong><em>.</em></blockquote><p>We can think that “context” means as a space (box) in which to execute a code. See example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*2DwCBdQtxhTyr4HWCCtBfg.png" /></figure><h4>Call Stack</h4><p>Call Stack is part of JavaScript engine and engine uses <strong>Call Stack</strong> to manage execution contexts: the Global Execution Context and Function Execution Contexts.</p><p>Call Stack is a structure (<strong>principle of Last In, First Out</strong>) that JavaScript engine uses to keep track of function invocations. So every time you invoke a function engine places that on the Call Stack. And keep doging so including functions that you invoke recursively and once the invocation is complete engine is going to pop one function at a time and execute it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2ZH_1d8TYVg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2ZH_1d8TYVg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2ZH_1d8TYVg%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/5312c402407ebfea102be25bdb0b9b13/href">https://medium.com/media/5312c402407ebfea102be25bdb0b9b13/href</a></iframe><p><strong>It’s very important to understand this because you only get one Call Stack. So if you will keep Call Stack busy your application is busy.</strong></p><p><strong>Notes from MDN:</strong></p><ul><li>When a script calls a function, the interpreter adds it to the call stack and then starts carrying out the function.</li><li>Any functions that are called by that function are added to the call stack further up, and run where their calls are reached.</li><li>When the current function is finished, the interpreter takes it off the stack and resumes execution where it left off in the last code listing.</li><li>If the stack takes up more space than it had assigned to it, it results in a “stack overflow” error: RangeError: Maximum call stack size exceeded</li></ul><p><strong>More:</strong></p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Call_stack">Call stack in JavaScript</a></li><li><a href="https://www.youtube.com/playlist?list=PLWrQZnG8l0E4kd1T_nyuVoxQUaYEWFgcD">Understanding JavaScript Functions, Execution Context, and the Call Stack</a></li><li><a href="https://www.youtube.com/watch?v=XGwTuDcfJzs&amp;ab_channel=WomenWhoCode">Closures in Javascript: Inside the Execution Context &amp; Scope with Codesmith</a></li></ul><h4><strong>Let’s look at one example</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*J_Ej2OEvG6UZaCWggl49AA.png" /></figure><p>In our code we create function called multiply and then create a variable called twoByTwo witch is result of invocation of multiply(2, 2)</p><p>So let’s figure out what happen under the hood after we run this code.</p><p>When we run our code JavaScript Engine adds “global” function in Call Stack which creates Global Execution Context. Inside this Global Execution Context creates Local Memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i5Q9_Lm8W59_1YkL84jBsw.png" /></figure><p>Then it parse our code line-by-line and declaring variable multiply in Global Memory (<strong>NOTE:</strong> we don’t know what inside this function until we will invoke it, it also means JavaScript will not go inside and pars this function until we will invoke this function). Then it goes to the next line where we declaring variable twoByTwo and the value of this variable is result of multiply(2,2) (<strong>NOTE:</strong> Until this function executing our twoByTow don’t have any value, we don’t never notice it but it’s what really happens).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FeJXdQOI-_RIHlC-QJ8G-A.png" /></figure><p>Now JavaScript look at Scope Memory (it’s Global Memory) and trying to find multiply and it’s a function. So it will invoke it (<strong>NOTE:</strong> if our multiply refers to not a function JavaScript will throw an error: multiply is not a function).</p><p>After that our function add in Call Stack and <strong>Local Execution Context for </strong><strong>multiply(2,2) </strong>creates. Inside this context also creates Local Memory and JavaScript start parsing code inside multiply function. It’s declaring result variable inside Local Memory with value 2*2 and it’s 4 then our function return result . Here JavaScript also look at Scope Memory (it’s Local Memory) and trying to find result (<strong>NOTE:</strong> if JavaScript will not find result in Local Memory it will try to find it in Parent Scope Memory (it’s Global Memory) and if no result there JavaScript will throw an error: is not defined). In our case JavaScript find it in Local Scope and simply return it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IKuAed-T3idyyH1vHEl5Q.png" /></figure><p>Then JavaScript Engine removes<strong>multiply(2,2)</strong> from Call Stack and <strong>Local Execution Context for </strong><strong>multiply(2,2) </strong>automatically destroyed. And JavaScript can assign return value from multiply(2,2) which is 4 to twoByTow variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyxYtKGoKxD9GRnuXU0pkg.png" /></figure><p>Since it was the last line of code and nothing to do our CallStack will clear from global function and Global Execution Context destroyed too and program exit. So everything removes.</p><h4>Closure</h4><p>Every time when you invoke a function new local (function) memory creates. And when a function finishes executing, it’s local memory is deleted. (except a return value).</p><p>But what if our function can remember some data between invocations? That will let our function have associated cache/persistent memory. Let’s look at example bellow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*s2lH4Z_Ho9Keq0Frf18fhQ.png" /></figure><p>As we learned before after counter function finished execution all local memory removed, except a return value: increment. But increment function need count to work with it. So where it will take it? Here is a trick!</p><p>As soon as we declare increment under the hood JavaScript engine immediately added a hidden property [[scope]] to it.</p><p>It means <strong>function “hold”</strong> <strong>all data that function is referred</strong> <strong>to</strong> with it, we can think about it as a “backpack”. So if our increment function don’t use unusedVariable it will never add this variable in “backpack”.</p><blockquote><strong><em>Where you define a function determines what variables a function have access to when you call a function.</em></strong></blockquote><p><strong>Closure </strong>(“backpack”)<strong> </strong>is when a function remembers and continues to access variables from outside its scope, even when the function is executed in a different scope.</p><p>I’m highly recommending to watch this video: <a href="https://youtu.be/XTAzsODSCsM">Closure, Scope &amp; Execution Context by Will Sentance</a> to fully understand this topic.</p><p><strong>More:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=Nt-qa_LlUH0&amp;ab_channel=uidotdev">The Ultimate Guide to Execution Contexts, Hoisting, Scopes, and Closures in JavaScript</a></li><li><a href="https://javascript.info/closure#code-blocks">Variable scope, closure</a></li><li><a href="https://www.freecodecamp.org/news/deep-dive-into-scope-chains-and-closures-21ee18b71dd9/">Deep dive into Scope Chains and Closures</a></li></ul><h4>this</h4><p>Context is dynamic and dependent on <strong>how it is called</strong> (regardless of where it is defined or even called from).</p><p>We need to understand that context and scope are not the same. Every function invocation has both a scope and a context associated with it.</p><p>As we learned before scope pertains to the variable access of a function when it is invoked and is unique to each invocation. Context is always the value of the this keyword which is a reference to the object that “owns” the currently executing code.</p><p>this is not a fixed characteristic of a function based on the function’s definition, but rather a dynamic characteristic that’s determined each time the function is called.</p><p>In most cases, the value of this is determined by how a function is called (runtime binding). It can’t be set by assignment during execution, and it may be different each time the function is called. ES5 introduced the bind() method to set the value of a function’s this regardless of how it’s called, and ES2015 introduced arrow functions which don’t provide their own this binding (it retains the this value of the enclosing lexical context).</p><p><strong>More:</strong></p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this">What is this?</a></li><li><a href="https://www.youtube.com/watch?v=YOlr79NaAtQ&amp;ab_channel=Fireship">What is THIS in JavaScript?</a></li><li><a href="http://ryanmorr.com/understanding-scope-and-context-in-javascript/">Understanding Scope and Context in JavaScript</a></li><li><a href="https://www.youtube.com/watch?v=zE9iro4r918&amp;ab_channel=uidotdev">Understanding the “this” keyword, call, apply, and bind in JavaScript</a></li></ul><h4>Arrow Functions</h4><p>Arrow functions, or Fat arrow functions are frequently used in callback chains, promise chains, array methods, in any situation where unregistered functions would be useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*FnUKFn700hqdo10ljN64ow.png" /></figure><p>There are differences between <em>arrow functions</em> and <em>traditional functions</em>, as well as some limitations:</p><ul><li>Arrow functions don’t have their own bindings to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this">this</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/super">super</a>, and should not be used as <a href="https://developer.mozilla.org/en-US/docs/Glossary/Method">methods</a>.</li><li>Arrow functions don’t have access to the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target">new.target</a> keyword.</li><li>Arrow functions aren’t suitable for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call">call</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply">apply</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind">bind</a> methods, which generally rely on establishing a <a href="https://developer.mozilla.org/en-US/docs/Glossary/Scope">scope</a>.</li><li>Arrow functions cannot be used as <a href="https://developer.mozilla.org/en-US/docs/Glossary/Constructor">constructors</a>.</li><li>Arrow functions cannot use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield">yield</a>, within its body.</li></ul><p>When using arrow functions, we must be careful of the <strong>scope</strong> that these functions are called in. Arrow functions follow normal scoping rules in JavaScript, with the exception of the this scope. Recall that in basic JavaScript, each function is assigned a scope, that is, the this<strong> </strong>scope<strong>.</strong></p><p>Arrow functions are not assigned a this scope. They inherit their parent’s this scope and cannot have a new this scope bound to them. This means that, as expected, arrow functions have access to the scope of the parent function, and subsequently, the variables in that scope, but the scope of this cannot be changed in an arrow function.</p><p>Using the .apply(), .call(), or .bind() function modifiers will NOT change the scope of an arrow function’s this property. If you are in a situation where you must bind this to another scope, then you must use a normal JavaScript function.</p><p><strong>More:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=dB1KA-yz65s&amp;ab_channel=uidotdev">Arrow Functions in JavaScript</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=154903b39cc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps 101: All (kind of) you need to know about DevOps]]></title>
            <link>https://antsitvlad.medium.com/devops-101-all-kind-of-you-need-to-know-about-devops-5bfca8656987?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bfca8656987</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Fri, 27 May 2022 06:31:32 GMT</pubDate>
            <atom:updated>2022-11-14T11:27:07.619Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are a developer DevOps is something that you cannot avoid. It is a really big part of the software development process and understanding it can help you to bring your care up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*DluPjzT_eTUFdzHCI7JBZA.gif" /></figure><p>DevOps is not something to add complication to your life rather it’s something to make your life a lot easier.</p><blockquote><strong>Alert:</strong> It’s not article about how to became a DevOps Engineer, it is about how to make you more confident in this. And I really hope you can find this article really helpful.</blockquote><p>But if you want to become a DevOps Engineer here is <a href="https://roadmap.sh/devops"><strong>Step by step guide</strong></a> for you.</p><p>I recommend to check out this <a href="https://www.youtube.com/watch?v=j5Zsa_eOXeY&amp;ab_channel=freeCodeCamp.org"><strong>DevOps comprehensive course for beginners</strong></a> where you can cover a lot of key terms and technologies.</p><p>Also check out <a href="https://www.youtube.com/watch?v=G_nVMUtaqCk">From Zero to DevOps Engineer — DevOps Roadmap for YOUR specific background</a></p><p>And if you want to learn more check out <a href="https://www.atlassian.com/devops"><strong>Atlassian article</strong></a><strong> </strong>and<strong> </strong><a href="https://www.redhat.com/en/topics/devops"><strong>RedHat topic</strong></a>.</p><h3>Introduction to DevOps</h3><h4>What is DevOps?</h4><p><strong>DevOps</strong> is a combination of software developers (dev) and operations (ops).</p><p>Check out <a href="https://www.youtube.com/watch?v=UbtB4sMaaNM&amp;ab_channel=IBMTechnology"><strong>What is DevOps?</strong></a> explanation video.</p><p>So basically DevOps is a set of <a href="https://www.atlassian.com/devops/what-is-devops/devops-best-practices">practices</a>, <a href="https://www.atlassian.com/devops/devops-tools/choose-devops-tools">tools</a>, and a <a href="https://www.atlassian.com/devops/what-is-devops/devops-culture">cultural philosophy</a> that automate and integrate the processes between software development and IT teams.</p><p>DevOps is all about the unification and automation of processes, and DevOps engineers are instrumental in combining code, application maintenance, and application management.</p><p>Check out <a href="https://spacelift.io/blog/devops-best-practices"><strong>DevOps Best Practices and Anti-Patterns</strong></a><strong> </strong>article by Spacelift.</p><p>I would also recommend to take a look at <a href="https://www.youtube.com/watch?v=52ht63dMQ1g">DevOps is dead. Embrace platform engineering</a> talk.</p><h4>What is DevSecOps?</h4><p>DevSecOps stands for development, security, and operations.</p><p>DevSecOps means thinking about application and infrastructure security from the start. It also means <a href="https://www.redhat.com/en/topics/automation">automating</a> some security gates to keep the DevOps workflow from slowing down.</p><p>Check out <a href="https://www.youtube.com/watch?v=J73MELGF6u0&amp;ab_channel=IBMTechnology"><strong>What is DevSecOps?</strong></a><strong> </strong>explanation video.</p><h4>What is Site Reliability Engineering (SRE)?</h4><p>Check out <a href="https://www.youtube.com/watch?v=ztIIcXNzMN4&amp;ab_channel=IBMTechnology"><strong>What is Site Reliability Engineering (SRE)?</strong></a> explanation video.</p><p>To understand the difference between DevOps and SRE check out <a href="https://www.youtube.com/watch?v=KCzNd3StIoU&amp;ab_channel=IBMTechnology"><strong>DevOps vs. SRE</strong></a><strong> </strong>explanation video.</p><h4>Configuration Management</h4><p>Configuration Management — is defining, controlling, releasing, changing, documenting, and reporting the configuration of items in a system. As a result Configuration Management is an important DevOps process.</p><p>Without proper Configuration Management we cannot properly build, test, maintain or support a system.</p><h4>DevOps Tools</h4><p><a href="https://www.atlassian.com/devops/devops-tools"><strong>Here is a great article about DevOps Tools</strong></a> you should definitely check out.</p><h4><strong>DevOps Best Practices</strong></h4><ul><li><a href="https://www.cloudbees.com/blog/devops-best-practices">DevOps Best Practices: Opinionated Software That Drives a Successful DevOps Culture</a>.</li></ul><h3>CI/CD</h3><p>CI/CD introduces ongoing automation and continuous monitoring throughout the <a href="https://www.redhat.com/en/topics/devops/what-is-application-lifecycle-management-alm">lifecycle of apps</a>, from integration and testing phases to delivery and <a href="https://www.redhat.com/en/topics/automation/what-is-deployment-automation">deployment</a>.</p><h4>CI (Continuous Integration)</h4><p>The CI always refers to continuous integration, which is an automation process for developers. Successful CI means new code changes to an app are regularly built, tested, and merged to a shared repository.</p><p>Check out <a href="https://www.youtube.com/watch?v=1er2cjUq1UI&amp;ab_channel=IBMTechnology"><strong>What is Continuous Integration?</strong></a> explanation video.</p><h4>CD (Continuous Delivery and Continuous Deployment)</h4><p>The CD refers to continuous delivery and/or continuous deployment, which are related concepts that sometimes get used interchangeably. Both are about automating further stages of the pipeline, but they’re sometimes used separately to illustrate just how much automation is happening</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*W0y5oVcKcS8jiNQbKR1bUQ.png" /><figcaption><strong>Source: </strong><a href="https://www.redhat.com/en/topics/devops/what-is-ci-cd">https://www.redhat.com/en/topics/devops/what-is-ci-cd</a></figcaption></figure><p>Check out <a href="https://www.youtube.com/watch?v=2TTU5BB-k9U&amp;ab_channel=IBMTechnology"><strong>What is Continuous Delivery?</strong></a> explanation video.</p><p>Also check out <a href="https://www.youtube.com/watch?v=LNLKZ4Rvk8w&amp;ab_channel=IBMTechnology"><strong>Continuous Deployment vs. Continuous Delivery</strong></a> explanation video.</p><h4>Continuous Testing</h4><p>Check out <a href="https://www.youtube.com/watch?v=RYQbmjLgubM&amp;ab_channel=IBMTechnology"><strong>What is Continuous Testing?</strong></a> explanation video.</p><h4>CI/CD pipeline</h4><p>A <strong>CI/CD pipeline</strong> is a series of steps that must be performed in order to deliver a new version of software. CI/CD pipelines are a practice focused on improving software delivery throughout the software development life cycle via automation.</p><p>Check out more about <a href="https://circleci.com/blog/what-is-a-ci-cd-pipeline/"><strong>CI/CD pipeline</strong></a>.</p><p>Also check out <a href="https://www.youtube.com/watch?v=sDMBdcquxl4"><strong>Practical Tips &amp; Tricks for CI/CD Success</strong></a><strong> </strong>video.</p><h3>CI/CD Tools</h3><p>CI/CD tools can help a team automate their development, deployment, and testing. Some tools specifically handle the integration (CI) side, some <a href="https://www.redhat.com/en/topics/management">manage</a> development and deployment (CD), while others specialize in continuous testing or related functions.</p><p>There is a lot of CI/CD platforms, but in this article I will only cover <a href="https://github.com/features/actions">GitHub Actions</a>.</p><h4>GitHub Actions</h4><p>GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD.</p><p>Check out <a href="https://github.blog/2022-02-02-build-ci-cd-pipeline-github-actions-four-steps/">How to build a CI/CD pipeline with GitHub Actions in four simple steps</a> video.</p><h3>Deployment Strategies</h3><p>Deployment strategies define how you want to deliver your software.</p><p>There are various types of deployment strategies but here we will look only 2 most popular: <a href="https://docs.aws.amazon.com/whitepapers/latest/introduction-devops-aws/blue-green-deployments.html"><strong>Blue/Green Deployment</strong></a><strong> </strong>and<strong> </strong><a href="https://docs.aws.amazon.com/whitepapers/latest/introduction-devops-aws/canary-deployments.html"><strong>Canary Deployment</strong></a>.</p><p>Also check out <a href="https://cloud.google.com/architecture/application-deployment-and-testing-strategies"><strong>Application deployment and testing strategies</strong></a> and <a href="https://docs.oracle.com/en/solutions/plan-mad-strats-devops/understand-depoyment-architectures.html"><strong>Understand Deployment Strategies</strong></a><strong> </strong>articles.</p><h3>Infrastructure as Code (IaC)</h3><p>Infrastructure as Code (IaC) is the managing and provisioning of infrastructure through code instead of through manual processes.</p><p>With IaC, configuration files are created that contain your infrastructure specifications, which makes it easier to edit and distribute configurations.</p><p>Check out <a href="https://www.youtube.com/watch?v=KxxRl6VEBxI&amp;ab_channel=CBTNuggets"><strong>What Does Infrastructure as Code Mean?</strong></a><strong> </strong>explanation video.</p><h3>Hypervisor</h3><p>A hypervisor is computer software or hardware that enables you to host multiple virtual machines. Each virtual machine is able to run its own programs. A hypervisor allows you to access several virtual machines that are all working optimally on a single piece of computer hardware.</p><p>Check out <a href="https://www.youtube.com/watch?v=LMAEbB2a50M&amp;ab_channel=IBMTechnology"><strong>What is Hypervisor?</strong></a> explanation video.</p><h3>Virtual Machines</h3><p>Check out <a href="https://www.youtube.com/watch?v=FZR0rG3HKIk&amp;ab_channel=IBMTechnology"><strong>Virtualization</strong></a> and <a href="https://www.youtube.com/watch?v=euhss5g6YKE&amp;ab_channel=IBMDeveloper"><strong>What is a virtual machine?</strong></a> explanation videos.</p><h3>Containerization</h3><p>Containerization is the packaging together of software code with all it’s necessary components like libraries, frameworks, and other dependencies so that they are isolated in their own “<a href="https://www.redhat.com/en/topics/containers/whats-a-linux-container">container</a>.”</p><p>Check out <a href="https://www.youtube.com/watch?v=0qotVMX-J5s&amp;ab_channel=IBMTechnology"><strong>Containerization</strong></a> explanation video.</p><h3>Virtual Machines vs Containers</h3><p>They are both can solve the same problem but they approach it differently.</p><p>VMs are the larger of the two, typically measured by the gigabyte and containing their own OS, which allows them to perform multiple resource-intensive functions at once. Docker Containers is much smaller and faster than Virtual Machines.</p><p>Check out <a href="https://www.youtube.com/watch?v=cjXI-yxqGTI&amp;ab_channel=IBMTechnology"><strong>Virtual Machines vs Containers</strong></a> explanation video.</p><p>Of course, we have Pros and Cons to using Containers and VMs, but we will not dive into that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yuITJeZPeyyCTQdmUSgJbQ.png" /><figcaption><a href="https://www.docker.com/resources/what-container/#/package_software">https://www.docker.com/resources/what-container</a></figcaption></figure><h3>Docker</h3><p>Docker helps us to solve the “it works on my machine” problem.</p><p>It’s common problem where your application can work on your environment/machine but other developers can’t run it because they get strange errors. For example, they forgot to install some tool or add a file that they need. This is why Docker was created.</p><p><strong>Docker</strong> is a platform that is built on top of Linux concepts for building, running and shipping applications. It allows us to use consistently develop, test, and run our applications at each stage. It’s like we use the same environment/machine for each stage of our development, testing, and shipping.</p><p><strong>Docker terms we need to know:</strong></p><ul><li><strong>Docker Image</strong> is what we use to create your running container. It’s just a template that we use to create and run Docker Container.</li><li><strong>Dockerfile </strong>is a file that includes instructions on how to build a Docker Image.</li><li><strong>Docker Container</strong> is an isolated running an instance of your Docker Image environment that allows you to package your application and its dependencies in an easy-to-share way. It is portable, isolated, and lightweight. You can use Docker Image to instantiate as many containers as you want. You can think about Docker Container as like a box that contains everything your application needs to run.</li></ul><p><strong>How to use Docker?</strong></p><p>Here few steps we need to start using Docker:</p><ol><li><a href="https://docs.docker.com/get-docker/">Install Docker</a></li><li>Run Docker Container from the Docker Image (you can use you own Docker Image or get it from <a href="https://hub.docker.com/">DockerHub</a>)</li></ol><blockquote><strong><em>Note: </em></strong><em>To “Dockerize” your application just simply add the file with the name: </em><em>Dockerfile. This Docker file should include all instructions that your application needs. So instead of directly running your application like </em><em>npm run dev we tell the Docker to run it and set up everything we need.</em></blockquote><p>I recommend checking out <a href="https://www.youtube.com/watch?v=3c-iBn73dDE">Docker Tutorial for Beginners [FULL COURSE in 3 Hours]</a></p><h4><strong>Dockerfile</strong></h4><p><a href="https://docs.docker.com/engine/reference/builder/#run">RUN</a> is an image build step, the state of the container after a RUN command will be committed to the container image. A Dockerfile can have many RUN steps that layer on top of one another to build the image.</p><p><a href="https://docs.docker.com/engine/reference/builder/#cmd">CMD</a> is the command the container executes by default when you launch the built image. A Dockerfile will only use the final CMD defined. The CMD can be overridden when starting a container with docker run $image $other_command.</p><p><strong>Check out useful </strong><a href="https://docs.docker.com/engine/reference/commandline/docker/"><strong>docker commands</strong></a><strong>.</strong></p><h3>Docker Networking</h3><p>One of the reasons Docker containers and services are so powerful is that you can connect them together. Check out <a href="https://docs.docker.com/network/"><strong>Docker Networking</strong></a><strong>.</strong></p><h3>Docker Compose</h3><p>Compose is a tool for defining and running multi-container Docker applications. Each of the containers run in isolation but can interact with each other when required.</p><p><a href="https://docs.docker.com/get-started/overview/"><strong>docker</strong></a> manages single containers</p><p><a href="https://docs.docker.com/get-started/08_using_compose"><strong>docker-compose</strong></a> manages multiple container applications</p><p><strong>Learn more about Docker: </strong><a href="https://youtu.be/FzwIs2jMESM"><strong>[1]</strong></a><strong>, </strong><a href="https://youtu.be/_m9JYAvFB8s"><strong>[2]</strong></a><strong>, </strong><a href="https://frontendmasters.com/workshops/complete-intro-containers/"><strong>[3]</strong></a><strong>, </strong><a href="https://youtu.be/9zUHg7xjIqQ"><strong>[4]</strong></a><strong>, </strong><a href="https://youtu.be/vlS5EiapiII"><strong>[5]</strong></a><strong>, </strong><a href="https://vsupalov.com/docker-image-layers/"><strong>[6]</strong></a><strong>, </strong><a href="https://vsupalov.com/docker-cache/"><strong>[7]</strong></a><strong>, </strong><a href="https://www.youtube.com/watch?v=8vXoMqWgbQQ"><strong>[8]</strong></a><strong>, </strong><a href="https://youtu.be/JofsaZ3H1qM"><strong>[9]</strong></a><strong>, </strong><a href="https://youtu.be/_sdm5RcpbXM"><strong>[10]</strong></a><strong>, </strong><a href="https://www.youtube.com/watch?v=QeQ2MH5f_BE"><strong>[11]</strong></a><strong>, </strong><a href="https://youtu.be/3c-iBn73dDE"><strong>[12]</strong></a><strong>.</strong></p><h3>Automation and Orchestration</h3><p><strong>Automation</strong> is about doing a task automatically instead of do it manually.</p><p><strong>Orchestration</strong> is basically just a bunch of automation tasks all put together into one big ecosystem or system.</p><h3>Kubernetes (k8s)</h3><p><a href="https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/">Kubernetes</a> is an open-source orchestration system for automating the deployment, scaling, and management of containerized applications.</p><p>Kubernetes provides an API to control how and where those containers will run.</p><p>Check out <a href="https://www.youtube.com/watch?v=VnvRFRk_51k&amp;ab_channel=TechWorldwithNana"><strong>What is Kubernetes?</strong></a><strong> </strong>and<strong> </strong><a href="https://www.youtube.com/watch?v=q45weN6l-gA&amp;ab_channel=Codementor"><strong>Kubernetes 101</strong></a> explanation videos.</p><p>I highly recommend checking out Kubernetes: The Documentary. Here is <a href="https://youtu.be/BE77h7dmoQU">Part 1</a> and <a href="https://youtu.be/318elIq37PE">Part 2</a></p><p>And here is a good <a href="https://www.youtube.com/watch?v=d6WC5n9G_sM">Kubernetes Crash Course for Absolute Beginners</a>.</p><p>To learn more about Kubernetes check out more resources: <a href="https://youtu.be/XltFOyGanYE"><strong>[1]</strong></a><strong>,</strong> <a href="https://youtu.be/oBf5lrmquYI"><strong>[2]</strong></a><strong>, </strong><a href="https://www.youtube.com/watch?v=w7ZDeNFD_Co&amp;ab_channel=NGINX%2CInc"><strong>[3]</strong></a><strong>, </strong><a href="https://youtu.be/kTp5xUtcalw"><strong>[4]</strong></a></p><h3>Kubernetes vs. Docker</h3><p>The conversation around Kubernetes vs. Docker is often framed as either-or: should I use Kubernetes or Docker? This is like comparing apples to apple pie, and it’s a common misconception that you must choose one or the other.</p><p>Check out <a href="https://www.youtube.com/watch?v=2vMEQ5zs1ko&amp;ab_channel=IBMTechnology"><strong>Kubernetes vs. Docker</strong></a> explanation video.</p><h3>Helm</h3><p>Helm is the best way to find, share, and use software built for Kubernetes. Helm helps you manage Kubernetes applications.</p><p>Check out <a href="https://www.youtube.com/watch?v=fy8SHvNZGeE&amp;ab_channel=IBMTechnology"><strong>Helm</strong></a> explanation video.</p><p><a href="https://cloudacademy.com/course/introduction-to-helm-1034/course-introduction/">If you want to learn more about Helm here is a good course for you.</a></p><h3>Terraform</h3><p>Terraform is an open-source Infrastructure as Code (IAC) tool that can provision resources in the cloud.</p><p>Check out <a href="https://www.youtube.com/watch?v=HmxkYNv1ksg&amp;ab_channel=IBMTechnology"><strong>Terraform</strong></a> explanation video.</p><p>If you want to learn more about how to use Terraform here is <a href="https://www.youtube.com/watch?v=7xngnjfIlK4&amp;ab_channel=DevOpsDirective">Complete Terraform Course — From BEGINNER to PRO!</a></p><h3>GitOps</h3><p>GitOps is an evolution of <a href="https://www.atlassian.com/microservices/cloud-computing/infrastructure-as-code">Infrastructure as Code (IaC)</a> and a <a href="https://www.atlassian.com/devops/what-is-devops/devops-best-practices">DevOps best practice</a> that leverages Git as the single source of truth. It’s operational framework that takes DevOps best practices used for application development such as version control, collaboration, compliance, and CI/CD tooling, and applies them to infrastructure automation. It is used to automate the process of provisioning infrastructure.</p><p><strong>GitOps</strong> = IaC + <a href="https://docs.gitlab.com/ee/api/merge_requests.html">MRs</a>/<a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests">PRs</a> + CI/CD</p><p>IaC is a version control system agnostic. GitOps, on the other hand, uses only Git.</p><p>Check out <a href="https://www.youtube.com/watch?v=wdoLEA7U8_M&amp;ab_channel=freeCodeCampTalks"><strong>What is GitOps?</strong></a> explanation video.</p><blockquote>Wow, you may be overwhelmed right now but doesn’t it cool? As I said before DevOps is a really big topic and now you know a good piece of it. Thanks for reading this article and see you later!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bfca8656987" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why businesses are choosing Cross-Platform Solutions like React Native for mobile development?]]></title>
            <link>https://antsitvlad.medium.com/why-businesses-are-choosing-cross-platform-solutions-like-react-native-for-mobile-development-4d4bcf0177e4?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d4bcf0177e4</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[crossplatform-mobile-app]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Mon, 16 May 2022 14:54:45 GMT</pubDate>
            <atom:updated>2022-05-16T14:54:45.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aplYx7vd8FUW7CC0Hs0MZA.png" /></figure><p>In the modern world, businesses need to develop applications for mobile devices to reach more audiences. Each user can have a different phone model and there are tens of thousands of different models on the planet, but there is something that unites all phones — <strong>their platforms</strong>. That’s why it’s important to develop applications for all possible mobile platforms. The most popular platforms are iOS and Android.</p><p>Before you will start developing mobile applications for your business you need to know what technologies you can use and the pros and cons, there is no silver bullet for you.</p><blockquote>You need to understand that each technology has its own pros and cons.</blockquote><h3>Native Solutions</h3><p>By choosing native solutions (Swift or Objective-C for iOS, Java for Android) we need to develop the same-looks apps for each platform and it’s cost <strong>a lot of money and resources</strong>. And this approach introduces pitfalls like:</p><ul><li><strong>Development Velocity</strong> — each feature for each platform needs to develop from scratch one team can do it fast and the second can block you if your business needs to implement it for both platforms at the same time or with a short-period delay.</li><li><strong>Hiring</strong> — as I mentioned you need two different teams and it means you need to hire engineers for each team (platform). And here also can be a problem, if 2 teams have the same resource (for example 5 engineers on iOS and 5 on Android) depending on the needs of your business, one of the teams will feel a lack of resources to deliver the feature at the time, because each individual feature will take different time for each team and this behavior may change from time to time (iOS team needs more sources today but tomorrow the Android team).</li><li><strong>Maintenance</strong> — since we have two codebases we need to maintain both at the same time, for example, it means if on any platform we have a bug we also need to make sure that it will not appear on another platform so we need to check two codebases at the same time. Also, code can’t be reused between iOS and Android teams.</li></ul><blockquote>Native solutions cost a lot of money and resources.</blockquote><h3>Why are we choosing Cross-Platform Solutions?</h3><p>The main point of choosing a Cross-Platform Solution like React Native when we need the same application for each different platform (iOS and Android) is <strong>time and money (resources).</strong></p><p>For many businesses, it can be a real deal. So why need to spend a lot of resources if Cross-Platform Solution can fit our business?</p><blockquote>Before start working with Cross-Platform Solution you really need to know is it can fit for you.</blockquote><h3>What are Cross-Platform Solutions?</h3><p>Cross-Platform Solutions allows building applications for different platforms using the same codebase.</p><p>With cross-platform mobile solutions, you can develop applications that feel and looks like native apps.</p><p>Cross-Platform Solutions becomes more and more popular. Let’s figure out why.</p><h3><strong>What Cross-Platform Solutions gives us?</strong></h3><h4>Save Time Money</h4><p>For many businesses, it’s a really big advantage. You can develop MVP, add features, and close business needs without losing a big piece of your budget and time.</p><h4>One team, one codebase</h4><p>You need only one team (of course you can split it into sub-teams) to develop an application for each platform and only one codebase which you maintain.</p><h4>Implement new features</h4><p>We can reuse our code instead of developing new codes for every platform. This saves time as well.</p><h4>Same Design</h4><p>User Interface or UI is an important thing to consider for any app or software. Cross-platform solutions allow you easier to sync your design between different platforms.</p><p><strong>We talked about the Pros of Cross-Platform Solutions, but does it have any cons?</strong></p><p>The answer: Of course, like any other solution. It was great world if we just have one technology where everything is good and it has no problems.</p><h4>Performance Issues</h4><p>Cross-Platform Solutions in most cases are slower than native ones. So you need keep an eye on this.</p><h4>Flexibility</h4><p>Cross-Platform Solutions add limitations and we need to know them.</p><h4>Security risks</h4><p>This is the place to debate because each solution has it. Since Cross-Platform Solutions are open-source you need to know security risks. Also, track all libraries and third-part solutions that you use with it.</p><p>One of the most popular Cross-Platform Mobile Solution is React Native. In this article the main focus on React Native, the alternative for you can be <a href="https://flutter.dev/"><strong>Flutter</strong></a>, also but there a lot of other.</p><h3>What is React Native</h3><p>React Native is a JavaScript library for building user interfaces for native apps. It often uses to build mobile apps. But you can build Windows, TV, MacOS apps.</p><p>If your team already know React it’s a good point to look at this solution.</p><p>Big community also play a big role in it. You can find a lot of pre-make solutions for your application that also speed up your development process.</p><p>But… you should really understand and know the Pros and Cons of this (as other) technology to invest in it. There are many resources where you can find advantages and disadvantages, no matter what Cross-Platform solution you will use. <a href="https://www.netguru.com/glossary/react-native">Here is just one of them.</a></p><h3>Who’s using React Native?</h3><p>A lot of big and small businesses are using React Native for their apps. You can find the list of <a href="https://reactnative.dev/showcase"><strong>Showcases</strong></a> here.</p><p>One of successful cases where big compony fully migrate from native code to React Native is <a href="https://blog.coinbase.com/announcing-coinbases-successful-transition-to-react-native-af4c591df971"><strong>Coinbase</strong></a>.</p><p><a href="https://shopify.engineering/react-native-future-mobile-shopify"><strong>Shopify</strong></a> also decided to build all of its new mobile apps using React Native.</p><p>Of course one of <a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a"><strong>the negative and most popular case working with React Native was in Airbnb</strong></a><strong>. </strong>But it doesn’t mean React Native is bad, it means it’s not for each businesses.</p><h3>Conclusion</h3><p>So now you know the advantages and disadvantages of Cross-Platform Solutions. And the answer to use them or not is it depends on your business needs. It is only on your side to try Cross-Platform Solutions or choose native technology. For a lot of companies Cross-Platform Solutions can be a real deal, also for others not.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d4bcf0177e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Overview — Objects and Memory]]></title>
            <link>https://antsitvlad.medium.com/javascript-overview-part-3-objects-and-memory-daa1632728fe?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/daa1632728fe</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Wed, 04 May 2022 18:42:06 GMT</pubDate>
            <atom:updated>2022-06-02T17:33:56.346Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes you can hear “Everything in Javascript an object”. <strong>Not everything is an object in JavaScript. </strong>But everything that is not a primitive value can be considered as an object.</p><p>As I mentioned in <a href="https://antsitvlad.medium.com/javascript-overview-part-2-values-and-data-types-f1b1d446a59e">the previous part</a><strong> objects are</strong> <strong>non-primitive/reference</strong> <strong>data types. </strong>And they behave differently then primitives.</p><p>And before we can continue we need to understand how JavaScript stores values in memory.</p><h4>Memory: Stack and Heap</h4><p>In JavaScript memory life cycle consist of 3 parts:</p><ol><li>Allocate the memory you need</li><li>Use the allocated memory (read, write)</li><li>Release the allocated memory when it is not needed anymore</li></ol><p>In JavaScript 3rd part is implicit and this role is for the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management#garbage_collection"><strong>Garbage collector</strong></a>.</p><p>We need to understand how JavaScript Engine allocate the memory and and that’s where Stack (it’s not a Call Stack, Stack is just a data strucrure) and Heap show up.</p><p><strong>Stack </strong>is where engine static data. Static data is data where the engine knows the size at compile time. In JavaScript, this includes <strong>primitive values</strong> (<em>strings</em>, <em>numbers</em>, <em>booleans</em>, <em>undefined</em>, and <em>null</em>) and <strong>references</strong>, which point to objects and functions.</p><p>These data have one thing in common. The size of these data is fixed and JavaScript knows this size at compile time. This also means that JavaScript knows how much memory it should allocate, and allocates that amount. This type of memory allocation is called “static memory allocation”. And it happens right before the code is executed.</p><p>There is one important thing about static data and memory. There is a limit to how large these primitive values can be. This is also true for the stack itself. That too has limits. How high these limits are depends on specific browser and engine.</p><p><strong>Heap </strong>is a space for storing dynamic data where JavaScript stores objects (references values) like arrays, objects, functions and etc. This type of memory allocation is called “dynamic memory allocation”.</p><p><strong>Let’s look at code example below:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33a4d59f40e7cf132aaf393cb616f4de/href">https://medium.com/media/33a4d59f40e7cf132aaf393cb616f4de/href</a></iframe><p>And here how it looks in memory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tAho8L7j8bX3rBtEnFn2DA.png" /></figure><h4>References</h4><p><strong>Object values or non-primitive values</strong> (arrays, objects, functions, etc.) <strong>are treated as references</strong>. References are the idea that two or more variables are pointing at the same value.</p><p>All variables first point to the Memory Stack. When you create a primitive value JavaScript Engine store it in Memory Stack, but when you create an object (non-primitive value) the Memory Stack contains a reference to the object in the Memory Heap.</p><h4>Mutation</h4><p>Mutation means a change in the form or nature of the original data.</p><p>Reference types (Objects, Arrays, etc.) in JavaScript are mutable, it means affecting existing instance and not creating a copy of them.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81d84c1d65ff60a734fb9f8d32601347/href">https://medium.com/media/81d84c1d65ff60a734fb9f8d32601347/href</a></iframe><p>As we sow before, Memory Stack just hold the [Pointer] to the Memory Heap and few [Pointers] can be linked to one object in Memory Heap.</p><p>In example above our someFlat, joe.flat and nate.flat are 3 different [Pointer]&#39;s but the linked to the same object in Memory Heap.</p><p>The reason why our changes also applied to all someFlat, joe.flat and nate.flat too and it’s because they are just the same object just with different references/pointers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGlSx0_OwhifNLZhAB_HMg.png" /></figure><p>The mutation is a bad programming practice. If your code is mutable, you might change or break something without knowing. But sometimes we need them.</p><p><strong>More:</strong></p><ul><li><a href="https://www.freecodecamp.org/news/primitive-vs-reference-data-types-in-javascript/#:~:text=Reference%20data%20types%2C%20unlike%20primitive,all%20other%20types%20of%20objects.">Primitive vs Reference Data Types in JavaScript</a></li><li><a href="https://medium.com/@fknussel/arrays-objects-and-mutations-6b23348b54aa">Arrays, Objects and Mutations</a></li><li><a href="https://eloquentjavascript.net/06_object.html">The Secret Life of Objects</a></li><li><a href="https://felixgerschau.com/javascript-memory-management/">JavaScript’s Memory Management Explained</a></li></ul><h4>Copying objects</h4><p>In JavaScript no now easy way to create a copy of an object. Trying to create a copy of an object stored in a variable by referencing it will not create real copy. It will not copy the object itself. It will copy only reference to that object. We sow it before.</p><p><strong>We have few ways how we can copy objects in JavaScript and all of them have limitations and you need to know about them:</strong></p><ol><li>Use the spread (...) syntax (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax">docs</a>)</li><li>Use the Object.assign() method (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign">docs</a>)</li><li>Use the JSON.stringify() and JSON.parse() methods (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse">docs</a>)</li><li>Use the structuredClone() method (<a href="https://developer.mozilla.org/en-US/docs/Web/API/structuredClone">docs</a>)</li></ol><p><strong>The problem with </strong>JSON.stringify</p><p>We need to know that some values are not JSON-safe, like: undefined, symbols, and function.</p><p>The JSON.stringify(..) utility will automatically omit undefined, function, and symbol values when it comes across them.</p><p>If such a value is found in an array, that value is replaced by null (so that the array position information isn’t altered). If found as a property of an object, that property will simply be excluded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-LDafBBrc8065bzWm5DS1w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daa1632728fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Overview Part 2 — Values and data types]]></title>
            <link>https://antsitvlad.medium.com/javascript-overview-part-2-values-and-data-types-f1b1d446a59e?source=rss-49956dad69af------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1b1d446a59e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Vlad Antsitovich]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 06:12:40 GMT</pubDate>
            <atom:updated>2022-10-02T18:31:09.445Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript Overview — Values and data types</h3><p><a href="https://antsitvlad.medium.com/javascript-overview-part-1-introduction-c4c352a8db29"><strong>In the previous part</strong></a>, we learned some history about JavaScript and covered one of the most important concepts: not everything you see in JavaScript code is JavaScript.</p><p>In this part, I will start to cover small parts of JavaScript and one of them is “the primitive values” that we use as the building blocks for any program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LuNojORyUsCRbF7BGThjQ.png" /></figure><p>You may heard “In JS everything is an object”. It is a big misconception because most of the values in JS can behave as an object.</p><p>JavaScript has <strong>8 built-in types</strong>. The set of types in the JavaScript language consists of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#primitive_values"><strong><em>primitive values</em></strong></a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#objects"><strong><em>objects</em></strong></a>.</p><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#primitive_values"><strong>Primitive values</strong></a> (atomic pieces of data): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#boolean_type">Boolean type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#null_type">Null type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type">Undefined type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#number_type">Number type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type">BigInt type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type">String type</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#symbol_type">Symbol type</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#objects"><strong>Objects</strong></a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*DNB0X2oH-dMmp8EVjDmGhg.png" /><figcaption><strong>JavaScript Types</strong></figcaption></figure><p>In JavaScript, variables don’t have types — values have types. Variables can hold any value, at any time.</p><p>All primitive values are immutable, meaning that you cannot mutate their values. When we reassign a variable, giving it a new value, we are not changing the value itself; we are only changing which value the variable refers to. It’s important to understand.</p><h3>Numbers</h3><p>There are three special values in JavaScript that are considered numbers but don’t behave like normal numbers.</p><p>The first two are <strong>Infinity</strong> and <strong>-Infinity</strong>, which represent the positive and negative infinities.”</p><p>The third is <strong>NaN</strong> and it’s stands for “not a number,” even though it is a value of the number type.</p><p>Also the most common issue with JavaScript numbers is:</p><p>0.1 + 0.2; // 0.30000000000000004</p><p>0.1 + 0.2 === 0.3 // will be always false</p><p>So we should be really careful when we work with JavaScript numbers.</p><h3>null and undefined</h3><p>The difference in meaning between undefined and null is an accident of JavaScript’s design.</p><p>Everything tracked by JavaScript is bound. In fact, the definition of undefined means JavaScript cannot find a bound identifier.</p><p>You can think undefined means a variable has been declared but has not yet been assigned a value <strong>(BUT IT’s NOT ALWAYS the TRUE)</strong> and null is an assignment value.</p><h3>typeof and instanceof</h3><p>The typeof operator tests whether value belong to <strong>one of 7 basic types: </strong><strong>number, </strong><strong>string, </strong><strong>boolean, </strong><strong>object, </strong><strong>symbol, </strong><strong>function or </strong><strong>undefined. </strong>Where the “object&quot; belong to all objects (except functions, which are objects but have their own value in typeof operator), and also null value and <strong>arrays</strong> (for null it’s a bug, but this bug is so old, so it’s become a standard). It doesn’t rely on constructors and can be used even if a value is undefined. But it’s doesn’t give any details about objects. So if you needed it, go to instanceof.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQo7W8Go_coBXvj6lZctpw.png" /></figure><p>The instanceof operator is used to determine whether or not a type is of a particular constructor function.</p><h3>Falsy values</h3><p>JavaScript is a <strong>“loosely typed” language</strong>, which means that whenever an operator or statement is expecting a particular data-type, JavaScript will automatically convert the data to that type.</p><p>A falsy value is a value that is considered false when encountered in a <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">Boolean</a> context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGyIQIrItRy6nE-ysPWYUA.png" /><figcaption>MDN (<a href="https://developer.mozilla.org/en-US/docs/Glossary/Falsy">https://developer.mozilla.org/en-US/docs/Glossary/Falsy</a>)</figcaption></figure><h3>Type Conversion aka Type Coercion</h3><p>When an operator is applied to the “wrong” type of value, JavaScript will quietly convert that value to the type it needs, using a set of rules that often aren’t what you want or expect. This is called <strong>type coercion</strong>.</p><p><a href="https://developer.mozilla.org/en-US/docs/Glossary/Type_Conversion"><strong><em>Type conversion</em></strong></a> is similar to <em>type coercion</em> because they both convert values from one data type to another with one key difference — <strong><em>type coercion</em></strong> is implicit whereas <em>type conversion</em> can be either implicit <em>or</em> explicit.</p><p>We recommend using the three-character comparison (===) operators instead of two-character (==) to prevent unexpected type conversions, because === just do value comparison and dosen’t do any coversions. But the === operator does have some nuance and it’s better to know <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#a_model_for_understanding_equality_comparisons"><strong>them</strong></a>.</p><p><strong>Learn more type coercion:</strong></p><ul><li><a href="https://javascript.info/type-conversions">Type Conversion: javascript.info</a></li><li><a href="https://www.sitepoint.com/automatic-type-conversion/">Automatic Type Conversion In The Real World</a></li></ul><h3>Boxing and Native constructors</h3><p>How do primitive types in Javascript have methods and properties?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bn118DwvRihFevbu3igSQ.png" /></figure><p>Object wrappers serve a very important purpose. Primitive values don’t have properties or methods, so to access .length or .toString() you need an object wrapper around the value. Thankfully, JS will automatically box (wrap) the primitive value to fulfill such accesses.</p><p>In general, there’s basically no reason to use the object form directly. It’s better to just let the boxing happen implicitly where necessary. In other words, never do things like new String(“abc”), new Number(42), etc. — always prefer using the literal primitive values “abc” and 42.</p><p>There are even gotchas with using the object wrappers directly that you should be aware of if you do choose to ever use them.</p><p>For example, consider Boolean wrapped values:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PHDJXb6ActMaldTTN_4QQA.png" /></figure><p>The problem is that you’ve created an object wrapper around the false value, but objects themselves are “truthy”, so using the object behaves oppositely to using the underlying false value itself, which is quite contrary to normal expectation.</p><p>If you have an object wrapper and you want to get the underlying primitive value out, you can use the valueOf() method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXS65JzWOJl6DG_yS3fBpw.png" /></figure><p>Let’s look at another example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZxfXXTZ5wLfflbROhvUOyw.png" /></figure><blockquote><em>Note: by using the build-in natives constructor function we can do not use </em><em>new keyword, they have a “safe” wrapper for this, but </em><em>new Date is an exception.</em></blockquote><p>null and undefined don’t have box wrapper.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1b1d446a59e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>