<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kartik Arora</title>
    <description>The latest articles on DEV Community by Kartik Arora (@karx_brb).</description>
    <link>https://dev.to/karx_brb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F148177%2F3f09e22c-3d67-4fc6-bc7c-0d044324ea59.jpg</url>
      <title>DEV Community: Kartik Arora</title>
      <link>https://dev.to/karx_brb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karx_brb"/>
    <language>en</language>
    <item>
      <title>HTML Canvas | It's beautiful</title>
      <dc:creator>Kartik Arora</dc:creator>
      <pubDate>Thu, 22 Aug 2019 18:12:35 +0000</pubDate>
      <link>https://dev.to/karx_brb/html-canvas-it-s-beautiful-4hha</link>
      <guid>https://dev.to/karx_brb/html-canvas-it-s-beautiful-4hha</guid>
      <description>&lt;h1&gt;
  
  
  HTML Canvas - Why so under utilized?
&lt;/h1&gt;

&lt;p&gt;To answer this question, we must really understand the current state of HTML Canvas.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is HTML Canvas?
&lt;/h1&gt;

&lt;p&gt;If you have ever tried 'drawing' on a web page, the first thing that the search engine gives you is HTML Canvas.&lt;br&gt;
Well that is the 2019 definition of HTML canvas.&lt;br&gt;
Definition as in MDN:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Canvas API provides a means for drawing graphics via JavaScript and the HTML \'&amp;lt;canvas&amp;gt;\'  element. Among other things, it can be used for animation, game  graphics, data visualization, photo manipulation, and real-time video  processing.&lt;br&gt;
The Canvas API largely focuses on 2D graphics. The WebGL API, which also uses the \'&amp;lt;canvas&amp;gt;\' element, draws hardware-accelerated 2D and 3D graphic&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Why have you not used HTML Canvas?
&lt;/h2&gt;

&lt;p&gt;Well because developers did not recommend it. Well mostly.&lt;br&gt;
The ROI almost was not worth it, but not for game devs.&lt;/p&gt;

&lt;p&gt;If you have ever worked on games on the web, then you are amogst those few who have actually seen the Canvas APIs. Lets get started with it already then.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting Started.
&lt;/h2&gt;

&lt;p&gt;The first thing that I noticed was that it was possible to set the width &amp;amp; height of the canvas exclusively using any one of CSS, JS, or HTML (we will discuss why this bifurcation). &lt;br&gt;
I chose to give them these using CSS. 100vw, 100vh. Simple&lt;br&gt;
Then, drew a line. Drew a ball. &lt;br&gt;
The pixel density seemed very low. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enter: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio"&gt;window.devicePixelRatio&lt;/a&gt;&lt;br&gt;
So lets setup an function setupCanvas to encapuslate all of this.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setupCanvas(canvasDomRef) {
        // Get the device pixel ratio, falling back to 1.
        const canvas = document.querySelector(canvasDomRef);
        var dpr = window.devicePixelRatio || 1;
        // Get the size of the canvas in CSS pixels.
        var rect = canvas.getBoundingClientRect();
        // Give the canvas pixel dimensions of their CSS
        // size * the device pixel ratio.
        canvas.width = rect.width * dpr;
        canvas.height = rect.height * dpr;
        this.width = canvas.width;
        this.height = canvas.height;
        this.ctx = canvas.getContext('2d');
        // Scale all drawing operations by the dpr, so you
        // don't have to worry about the difference.
        this.ctx.scale(dpr, dpr);
        return this.ctx;
      }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Also, its 2019. No fun having a static image there.&lt;br&gt;
We will paint!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enter: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame"&gt;requestAnimationFrame&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;for using request animation frame, the easist way is to do something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...

function draw() {
    // this is where we will put our logic for eachcycle

    requestAnimationFrame(draw);
}

draw()

...

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;let complete this getting started session with this structure, of what I will use to play with Canvas.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
├── project                 
│   ├── kaaro.html          # the html file with &amp;lt;canvas&amp;gt;
│   ├── kaaro.css           # Styles anyone?
│   └── kaaro.js            # Our main JS file - with draw() function
├── utils                    
│   └── kCanvas.js          # Reusable Canvas like our setupCanvas function
└── ...                     # Anything else.. or maybe I guess this file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Getting Comfortable
&lt;/h2&gt;

&lt;p&gt;I feel all documentations should have a 'Getting Comfortable' heading, which can be optional.&lt;br&gt;
For this, we build a small game. A block breaker game (pr breakout game) is recommended to be precise.&lt;/p&gt;

&lt;p&gt;I followed along this MDN Tutorial here: &lt;a href="https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript"&gt;https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript&lt;/a&gt;&lt;br&gt;
Would highly recommended.&lt;br&gt;
My version when I was done with this is under attempt2. I hope to work on it more.&lt;/p&gt;

&lt;p&gt;Sidenote: By now maybe its time to address this page: &lt;a href="https://developer.mozilla.org/en-US/docs/Web"&gt;https://developer.mozilla.org/en-US/docs/Web&lt;/a&gt;&lt;br&gt;
This page is bible. Call this an assumptions, call this openions, or call this toolstack. This page is bible.&lt;/p&gt;
&lt;h2&gt;
  
  
  Our Mascot: Langton's Ant
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Langton%27s_ant"&gt;Langton's Ant&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will use Langtos's Ant to be the mascot we use to understand, and learn about Canavs. (a Ant stuck in our own personal 2D universe)&lt;/p&gt;

&lt;p&gt;If you go on the wiki, it is a rabbit hole, but one that you would be happy to indulge in. Interestingly, I bet you will find one or more links there that you might deeply connect to (like the ones that shape who you are :P) for reasons beyond the scope of this Article. For me it was Minecraft.&lt;/p&gt;

&lt;p&gt;For those, who smartly refrained from entering that rabbit hole, ahh, I will try an summerize for our context.&lt;/p&gt;

&lt;p&gt;We have a huge grid, our html canvas, the Ant's universe. &lt;br&gt;
We define a starting possition for this "Ant", and then we have a set of rules for how this ant behaves in this world.&lt;br&gt;
Each grid position are colored, either black or white.&lt;/p&gt;

&lt;p&gt;Rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If Ant is at White position. It will color it Black, turn 90° right, move 1 unit.&lt;/li&gt;
&lt;li&gt;If Ant is at Black position. It will color it White, turn 90° left,  move 1 unit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These simple rules lead to amazing behavior which we now will simulate on our universe, the HTML Canvas.&lt;/p&gt;
&lt;h2&gt;
  
  
  Simulation 1
&lt;/h2&gt;

&lt;p&gt;Attempt3 - part of the repo&lt;/p&gt;

&lt;p&gt;Let start by creating a canvas using our utils,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { kCanvas } from "../utils/mycanvas.js";

var kC = new kCanvas("#myCanvas");

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next lets create a class for our Langtons ant to keep things formal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class LangtonAntGrid {

    constructor() {

    }

    init(x = 20, y =20) {       
        this.grid = [];
        this.max_x = x;
        this.max_y = y;
        this.currentPosition = Object.assign({}, {
            x: this.max_x/2,
            y: this.max_y/2,
            color: 0,
            heading: 0
        });
        for (let i=0; i&amp;lt;x; i++) {
            this.grid[i] = [];
            for (let j=0; j&amp;lt;y; j++) {
                this.grid[i][j] = Object.assign({}, {
                    color: 0
                });
            }
        }
    }
    updateGrid() {
        const currentStatus = Object.assign({}, this.currentPosition);

        console.log(currentStatus);
        // first update current box
        this.currentPosition.color = (this.currentPosition.color + 1)%2;
        this.grid[this.currentPosition.x][this.currentPosition.y].color = this.currentPosition.color;
        this.drawPosition(this.currentPosition);


        //move to next Box
        if (currentStatus.color === 0) {
            this.currentPosition.heading = (this.currentPosition.heading + 1)%4;
            console.log('right');
        } else if (currentStatus.color === 1) {
            this.currentPosition.heading = (this.currentPosition.heading + 3)%4;
            console.log('left');
        }

        switch(this.currentPosition.heading) {
            case 0: this.currentPosition.y--;
                break;
            case 1: this.currentPosition.x++;
                break;
            case 2: this.currentPosition.y++;
                break;
            case 3: this.currentPosition.x--;
                break;
        }
        this.currentPosition.color = this.grid[this.currentPosition.x][this.currentPosition.y].color;
        console.log(this.currentPosition);

    }

    getLog() {
        console.log(this.grid);
    }
    drawPosition(position) {
        kC.drawBlock(position.x, position.y, position.color);    
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now to run it, lets create an instance and call this using our requestAnimationFrame loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
var antGrid = new LangtonAntGrid();
antGrid.init(500,500);

kC.drawGrid(500,500, false);


function draw() {

    antGrid.updateGrid();

    requestAnimationFrame(draw);
}

draw();

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you are following along, now would have been the time, when you really get to simplicity and universal nature of the Ant.&lt;/p&gt;

&lt;p&gt;Try playing around with the rules the ant can have. &lt;br&gt;
It can have more than 2 rules, more than 2 colors, and if you really up for it, more than 2 dimentions.&lt;br&gt;
Updating the constructor() to introduce 2 properties and update the updateGrid() function to use these 2 properties, to make more rules possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class LangtonAntGrid {

    constructor() {
        this.numberOfStates = 4;
        this.stateTransitions = ['R', 'L', 'L ', 'R'];
    }
    ...
    ...
    updateGrid() {
        const currentStatus = Object.assign({}, this.currentPosition);

        this.currentPosition.color = (this.currentPosition.color + 1)%(this.numberOfStates);
        this.grid[this.currentPosition.x][this.currentPosition.y].color = this.currentPosition.color;
        this.drawPosition(this.currentPosition);


        //move to next Box
        if(this.stateTransitions[currentStatus.color] === 'L') {
        // if (currentStatus.color === 0) {
            this.currentPosition.heading = (this.currentPosition.heading + 1)%4;
            // console.log('right');
        } else if (this.stateTransitions[currentStatus.color] === 'R') {
            this.currentPosition.heading = (this.currentPosition.heading + 3)%4;
            // console.log('left');
        }

        switch(this.currentPosition.heading) {
            case 0: this.currentPosition.y--;
                break;
            case 1: this.currentPosition.x++;
                break;
            case 2: this.currentPosition.y++;
                break;
            case 3: this.currentPosition.x--;
                break;
        }
        this.currentPosition.color = this.grid[this.currentPosition.x][this.currentPosition.y].color;

    }
    ...
    ...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We will work on building more generic 'Turmite', but for now lets focus on our newly born Ant and more specifically on the backgound, our universe, the Canvas.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enter: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation"&gt;CanvasRenderingContext2D.globalCompositeOperation&lt;/a&gt;&lt;br&gt;
This can be used to determine the blending mode of colors. &lt;br&gt;
introduce this line anywhere after ctx variable is loaded&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kC.ctx.globalCompositeOperation = '&amp;lt;your choice!&amp;gt;';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;My favoirite: mutiply&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set type as multiply, The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. &lt;/li&gt;
&lt;li&gt;choose all the colors for the Ants color as the same.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We see progressive darkenings of the path more taken!&lt;/p&gt;

&lt;p&gt;Note: I run a local server and then serve the js file. I use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http-server .\. --cors=*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The source code for the same is available here: &lt;a href="https://github.com/karx/kCanvas/"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project status as of last update - August 2019
&lt;/h2&gt;

&lt;p&gt;I wanted to see how this logic behaves in 3 dimentions, so created the same using &lt;a href="https://aframe.io/"&gt;A-Frame&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;You can view the Lagton's Ant in VR here: &lt;a href="https://kaaro.akriya.co.in/kCanvas/langton3d/kaaro.html"&gt;Langton's Ant in VR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the 4 directions, we have&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    new LangtonTermite(1,0,-10,5, ['L', 'L', 'R' , 'R'], 4),
    new LangtonTermite(30,0,20,1, ['L', 'L', 'R' , ], 3),
    new LangtonTermite(-40,0,20,1, ['L', 'R', 'R' , ], 3),
    new LangtonTermite(1,0,50,5, ['L', 'R' ], 2),
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;here each ant takes the following arguments respectively &lt;code&gt;start_x&lt;/code&gt;, &lt;code&gt;start_y&lt;/code&gt;, &lt;code&gt;start_z&lt;/code&gt;, &lt;code&gt;orientation (default: 5)&lt;/code&gt;, &lt;code&gt;transition (default: ['L', 'R'])&lt;/code&gt; , &lt;code&gt;numberOfStates (default: 2)&lt;/code&gt;&lt;br&gt;
Source Code: &lt;a href="https://github.com/karx/kCanvas/blob/master/langton3d/"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like and share the post, it helps movitate.&lt;/p&gt;

</description>
      <category>html</category>
      <category>canvas</category>
      <category>javascript</category>
      <category>web</category>
    </item>
    <item>
      <title>Web Components - Let's build em'all</title>
      <dc:creator>Kartik Arora</dc:creator>
      <pubDate>Tue, 04 Jun 2019 12:12:33 +0000</pubDate>
      <link>https://dev.to/karx_brb/web-components-let-s-build-em-all-3eb0</link>
      <guid>https://dev.to/karx_brb/web-components-let-s-build-em-all-3eb0</guid>
      <description>&lt;h1&gt;
  
  
  Web Components - For Micro-frontends and Re-usable components
&lt;/h1&gt;

&lt;p&gt;Let's build em all!&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Web Components?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href="https://www.webcomponents.org/introduction"&gt;https://www.webcomponents.org/introduction&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components"&gt;https://developer.mozilla.org/en-US/docs/Web/Web_Components&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;(Web) Components are the building blocks of modern web applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href="https://developers.google.com/web/fundamentals/web-components/"&gt;https://developers.google.com/web/fundamentals/web-components/&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://medium.freecodecamp.org/use-web-components-to-create-gradient-transitions-f9aad648824a"&gt;Another Blog With Drawing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Web Components are the result of an effort by the web community to have common specs for these 'building blocks of the web'&lt;br&gt;
There are two broad categories in which this can be used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For building &lt;strong&gt;Micro-frontends&lt;/strong&gt; - These are small but contains detailed business logic&lt;/li&gt;
&lt;li&gt;For building &lt;strong&gt;Re-usable Components&lt;/strong&gt; - These rarely contain any business logic. Highly targeted and re-usable components&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Basic Concepts
&lt;/h2&gt;

&lt;p&gt;To understand and discuss the 3 technologies that are used to make Web components a thing, we need to first see what happens usually when an HTML page is rendered.&lt;/p&gt;

&lt;p&gt;...once the server approves your request, the server sends the website files in chunks - called data packets.&lt;br&gt;
These packets are then assembled by your browser into a complete website and display it to us.&lt;/p&gt;

&lt;p&gt;These chunks are basically out HTML, CSS, and JavaScript, though other technologies are also available.&lt;br&gt;
The browser steps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Process HTML markup and build the DOM tree.&lt;/li&gt;
&lt;li&gt;Process CSS markup and build the CSSOM tree.&lt;/li&gt;
&lt;li&gt;Combine the DOM and CSSOM into a render tree.&lt;/li&gt;
&lt;li&gt;Run layout on the render tree to compute geometry of each node.&lt;/li&gt;
&lt;li&gt;Paint the individual nodes to the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JavaScript is a dynamic language that runs in a browser and allows us to alter just about every aspect of how the page behaves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript can query and modify the DOM and the CSSOM.&lt;/li&gt;
&lt;li&gt;JavaScript execution blocks on the CSSOM.&lt;/li&gt;
&lt;li&gt;JavaScript blocks DOM construction unless explicitly declared as async.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: This page is usually what I refer to as the base: &lt;a href="https://developer.mozilla.org/en-US/docs/Web"&gt;Web Technologies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would recommend every developer, associated with Web development, to revisit this page every 3 months, else the dark side WINS!&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes up Web components
&lt;/h2&gt;

&lt;p&gt;So the suit that makes web components possible is&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Custom Elements - JavaScript APIs to define custom elements and tell it to the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ShadowDOM - so that Scripting and Styling without fear of collisions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML templates - &amp;lt;template&amp;gt; and &amp;lt;slot&amp;gt; elements&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;To create a Components, broadly here are the steps we would take&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Class - put your logic&lt;/li&gt;
&lt;li&gt;Tell the browser about this new Custom Element&lt;/li&gt;
&lt;li&gt;Optional: attach Shadow DOM&lt;/li&gt;
&lt;li&gt;Optional: define a template and then attach&lt;/li&gt;
&lt;li&gt;Use the new Component!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To build we have a lot of options, thanks to the uber-vibrant JavaScript community,&lt;br&gt;
Our options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using native JavaScript. Best source Web components by &lt;a href="https://developers.google.com/web/fundamentals/web-components/"&gt;Google Developer docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.polymer-project.org/"&gt;Polymer - Google's web components framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://angular.io/guide/elements"&gt;Angular Elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/hybridsjs/hybrids"&gt;Hybrids&lt;/a&gt; is a UI library for creating Web Components with simple and functional API&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://lit-element.polymer-project.org/"&gt;LitElement&lt;/a&gt; - A simple base class for creating fast, lightweight web components&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://slimjs.com/#/getting-started"&gt;Slim.js&lt;/a&gt; is a lightweight web component authoring library&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Time to build
&lt;/h2&gt;

&lt;p&gt;In this session, we will build one using - Pokemon!!!&lt;br&gt;
&lt;a href="https://github.com/karx/webcomponents/tree/master/Pokemon"&gt;Shared codebase on github for kaaro-pokemon webcomponent&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Good reads/links:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://custom-elements-everywhere.com/"&gt;Custom elements everywhere&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://andyogo.github.io/custom-element-reactions-diagram/"&gt;Custome Element Reaction Diagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://w3c.github.io/webcomponents/spec/custom/"&gt;w3 specs custom elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/w3c/webcomponents/issues"&gt;Github Issue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/updates/2019/02/model-viewer"&gt;Google model viewer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://home.cern/science/computing/birth-web/short-history-web"&gt;history of web&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://slides.com/kartikarora-1/web-componentss"&gt;Link to slides @MozillaPunjab LPU on 24th March &lt;/a&gt;&lt;br&gt;
&lt;a href="http://github.com/karx/webcomponents"&gt;Link to GitHub repo used&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>html</category>
      <category>frontend</category>
      <category>web</category>
    </item>
  </channel>
</rss>
