<?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: Vlad Fedosov</title>
    <description>The latest articles on DEV Community by Vlad Fedosov (@stylet).</description>
    <link>https://dev.to/stylet</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%2F193686%2Ffc30833a-45a9-4782-8105-e887ffb1c8f7.jpeg</url>
      <title>DEV Community: Vlad Fedosov</title>
      <link>https://dev.to/stylet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stylet"/>
    <language>en</language>
    <item>
      <title>How to build your first Micro Frontend with SSR in minutes</title>
      <dc:creator>Vlad Fedosov</dc:creator>
      <pubDate>Mon, 27 Apr 2020 11:19:50 +0000</pubDate>
      <link>https://dev.to/stylet/how-to-build-your-first-micro-frontend-with-ssr-in-minutes-3jko</link>
      <guid>https://dev.to/stylet/how-to-build-your-first-micro-frontend-with-ssr-in-minutes-3jko</guid>
      <description>&lt;p&gt;The current trend is to build a feature-rich and powerful browser application, aka single page app, which sits on top of a micro service architecture. Over time the frontend layer, often developed by a separate team, grows and gets more difficult to maintain. That’s what we call a &lt;a href="https://www.youtube.com/watch?v=pU1gXA0rfwc"&gt;Frontend Monolith&lt;/a&gt;. We faced all the related challenges at Namecheap a few years ago. And so we decided to move further with &lt;a href="https://martinfowler.com/articles/micro-frontends.html"&gt;Micro Frontends&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4EXxGn_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3200/0%2AbYAemxgp0Yh-m3i2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4EXxGn_J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3200/0%2AbYAemxgp0Yh-m3i2" alt="Michael Geers @micro-frontends.org"&gt;&lt;/a&gt;&lt;em&gt;Michael Geers @micro-frontends.org&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Currently we run micro frontends in production for 2 years already using 3 different frameworks (Vue.js, React &amp;amp; Angular), actually the main page of the &lt;a href="https://www.namecheap.com/"&gt;namecheap.com&lt;/a&gt; is composed from a few applications. The approach that we use now is very similar to the one that Zalando uses in &lt;a href="https://github.com/zalando/tailor"&gt;Tailor&lt;/a&gt;. I wouldn’t be explaining now all the pros &amp;amp; cons of our current approach as it is not the goal of this article 🙂 What matters is that recently we decided to take a step forward &amp;amp; come up with a much flexible &amp;amp; performant approach.&lt;/p&gt;

&lt;p&gt;And so we built &lt;a href="https://github.com/namecheap/ilc"&gt;Isomorphic Layout Composer (ILC)&lt;/a&gt; — complete solution for Micro Frontends composition into SPA with SSR support. Don’t forget to check out GitHub to see all it’s features and let’s move to the main goal of this article — creation &amp;amp; launch of your first micro frontend.&lt;/p&gt;

&lt;h2&gt;
  
  
  We need React app with SSR first
&lt;/h2&gt;

&lt;p&gt;As you might already guess, to build new micro frontend we need to have regular application first. Hopefully I already did all the dirty work for you dear reader.&lt;/p&gt;

&lt;p&gt;So you can go and grab it here &lt;a href="https://github.com/StyleT/ilc-learning-react"&gt;github.com/StyleT/ilc-learning-react&lt;/a&gt;. Or you can use &lt;a href="https://codesandbox.io/s/github/StyleT/ilc-learning-react"&gt;codesandbox.io/s/github/StyleT/ilc-learning-react&lt;/a&gt; to have it running for you in the cloud. I would recommend to use &lt;a href="https://codesandbox.io/s/github/StyleT/ilc-learning-react"&gt;codesandbox.io&lt;/a&gt; to eliminate all the local environment related issues that may appear as we move forward.&lt;/p&gt;

&lt;p&gt;As soon as you started the app — try to play few tic-tac-toe matches 😎&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Adapting the app to ILC
&lt;/h2&gt;

&lt;p&gt;To make the application work correctly with ILC we need to make it compliant with &lt;a href="https://github.com/namecheap/ilc/blob/cdf6afaa73c3dd7358036ebb0fae3cf0b0ec391f/docs/ilc_app_interface.md"&gt;ILC to App interface&lt;/a&gt;. Fortunately that’s pretty easy, go through the source code and resolve &lt;strong&gt;all&lt;/strong&gt; the //TODO: comments I placed for you there.&lt;/p&gt;

&lt;p&gt;As soon as you’re finished with this — restart the app &amp;amp; try to open /microfrontend route. You should get 200 OK response code &amp;amp; some SSR markup.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: in case of any troubles — try to switch to the “step_1-ILC_integration” branch in the repo — it has all the changes already done for you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Configuring ILC to handle new app
&lt;/h2&gt;

&lt;p&gt;In this step we’re gonna use our public demo website and “&lt;a href="https://github.com/namecheap/ilc/blob/cdf6afaa73c3dd7358036ebb0fae3cf0b0ec391f/docs/develop_at_production.md"&gt;Develop right at “production”&lt;/a&gt;” ILC feature to complete the task. We will do it for the sake of simplicity only. However you can achieve pretty the same results using ILC that you run locally.&lt;/p&gt;

&lt;p&gt;To make your new fancy micro frontend work we need to determine your &lt;strong&gt;publicPath&lt;/strong&gt; &amp;amp; &lt;strong&gt;ssrPath&lt;/strong&gt; first.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you’re using codesandbox.io &lt;em&gt;(recommended approach)&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your publicPath will be somewhat like &lt;a href="https://abcde.sse.codesandbox.io/public/"&gt;https://abcde.sse.codesandbox.io/public/&lt;/a&gt;. Check the address bar of your virtual browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And your ssrPath will be &lt;a href="https://abcde.sse.codesandbox.io/microfrontend"&gt;https://abcde.sse.codesandbox.io/microfrontend&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  If you’re running app locally
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your publicPath will be &lt;em&gt;&lt;a href="http://127.0.0.1:5000/public/"&gt;http://127.0.0.1:5000/public/&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And your ssrPath will be &lt;em&gt;&lt;a href="http://XXX.XXX.XXX.XXX:5000/microfrontend"&gt;http://XXX.XXX.XXX.XXX:5000/microfrontend&lt;/a&gt;&lt;/em&gt; where you need to replace XXX with the real public IP address of your machine. &lt;br&gt;
You can use services like &lt;a href="https://ngrok.com/"&gt;https://ngrok.com/&lt;/a&gt; to get one if your Internet provider keeps you behind NAT.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As soon as you’ve figured out all the details — let’s change the ILC config for us. To do so you need to open &lt;a href="http://demo.microfrontends.online/nosuchpath"&gt;demo.microfrontends.online/nosuchpath&lt;/a&gt; and execute the following code in browser console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;publicPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://abcde.sse.codesandbox.io/public/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;ssrPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://abcde.sse.codesandbox.io/microfrontend&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;overrideConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;apps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@portal/myapp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;spaBundle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;publicPath&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;client.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;cssBundle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;publicPath&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;style.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;ssr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ssrPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="na"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;publicPath&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;primary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;routeId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;555&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;route&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/nosuchpath&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;slots&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;appName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@portal/myapp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`ILC-overrideConfig=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;overrideConfig&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;; path=/;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Refresh the page after code execution. If you did everything correctly — you should be able to see your app running inside a public ILC demo website.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If it doesn’t work for you — ensure that ssrPath is accessible not only from your machine (use &lt;a href="https://reqbin.com/"&gt;https://reqbin.com/&lt;/a&gt;) and JS/CSS links are actually working from your machine.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;Now try to go between different pages using top bar. See that not only server side rendering works but also client one. Disable JS to see how page looks like w/o it.&lt;/p&gt;

&lt;p&gt;If it works well together with other apps — my congratulations dear reader 🎉 You just built your first micro-frontend.&lt;/p&gt;

&lt;p&gt;If it doesn’t work for you — please leave a comment below or PM me so I can try to help you &amp;amp; enhance this article as result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;We just turned the simplest React application into a Micro Frontend and I hope it went smoothly for you. As you can see with a proper toolchain it is not as hard as you might think.&lt;/p&gt;

&lt;p&gt;It’s also worth saying that this article doesn’t cover a lot of the peculiarities of this process but if it will receive enough feedback from the community — I’ll write more about how you can practically build &amp;amp; launch more complex micro frontends in reasonable time.&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Maximizing Your Professional Value, from Junior to Leader</title>
      <dc:creator>Vlad Fedosov</dc:creator>
      <pubDate>Thu, 26 Sep 2019 17:04:06 +0000</pubDate>
      <link>https://dev.to/stylet/maximizing-your-professional-value-from-junior-to-leader-1ldd</link>
      <guid>https://dev.to/stylet/maximizing-your-professional-value-from-junior-to-leader-1ldd</guid>
      <description>&lt;p&gt;As I was progressing in my career, from being a beginner in web development to leadership positions in a global company, it was always hard to understand what kind of skills I needed to develop in order to move forward.&lt;/p&gt;

&lt;p&gt;Same goes for the moments when I was interviewing candidates for various positions within my teams. How to understand that he/she has a proper balance of technical skills and soft skills as well as proper mindset?&lt;/p&gt;

&lt;p&gt;Should you try to catch up with all modern technologies within your profession, or be focused on one specific area and be excellent in it?&lt;/p&gt;

&lt;p&gt;So let’s try to answer those questions and create a simple career development model that you can use as a guiding point as you move forward.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I appreciate that the seniority levels and job titles used below may not align 100% with your organization’s structure. Simply use them as reference points for your career and progress.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Basic model
&lt;/h2&gt;

&lt;p&gt;To give you a clearer picture, let’s use the widely spread and simple model of the T-shaped skillset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--efVagK3f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0iiy8y5sdqpi7jx8wg9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--efVagK3f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0iiy8y5sdqpi7jx8wg9n.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So every professional has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some fundamental knowledge that is related to the professional area. Without this it would be extremely hard to build up your career. For example, to become a Machine Learning engineer you should have strong math skills.&lt;/li&gt;
&lt;li&gt;Basic skills across overlapping disciplines. For example, for Frontend Web Developer it would be Design, UX, Backend development, Project management, etc. This kind of knowledge helps you to communicate effectively with your colleagues.&lt;/li&gt;
&lt;li&gt;Soft skills in areas like leadership, emotional intelligence, self-control, mentorship, social intelligence, etc. You need this to be able to communicate your ideas and work results clearly, build trust with your teammates, manager and subordinates, handle your and your team’s failures and build non-formal relationships which are extremely important.&lt;/li&gt;
&lt;li&gt;And of course, you have deep knowledge if one or a few specific areas. This is usually the reason why you were hired. And this is your most powerful weapon to conquer the market.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep in mind, this is an “average” representation of the career path. But we’re all not average, right? So make corrections according to your strengths and weak points as we go.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Junior Engineer
&lt;/h2&gt;

&lt;p&gt;So you were lucky enough to get hired as “Junior [your tech] Engineer” after several years of intense learning. Very likely your T-shaped skillset looks somewhat like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7-WNCzAj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/iwe29y5pdtus41qylr3d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7-WNCzAj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/iwe29y5pdtus41qylr3d.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a graduate of university/courses, you have some basic understanding of the fundamental disciplines. Your soft skills are good but if it’s your first job you still don’t have and understanding of the “corporate” culture and how to behave in certain situations.&lt;/p&gt;

&lt;p&gt;Your main skill is at the level that you can do something not really complex under supervision. And this is the main characteristic of the Junior engineer I would say.&lt;/p&gt;

&lt;h2&gt;
  
  
  Middle Engineer
&lt;/h2&gt;

&lt;p&gt;As you grow within your company, and get more experience in commercial development, you shift your diagram to something similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5x5V2feQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/oqpvmxx78k0lcw5yzevg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5x5V2feQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/oqpvmxx78k0lcw5yzevg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Usually, it’s possible to almost double your main skill set in the first 1–2 years, get some understanding of the work your colleagues (with different specialties) are doing and to enhance your soft skills.&lt;/p&gt;

&lt;p&gt;Now you can do almost everything under the supervision of a more experienced colleague. Check if you can say this about yourself… Be honest! 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Senior Engineer
&lt;/h2&gt;

&lt;p&gt;This step is much harder to do compared to the previous one. As you really need to make a shift in all of the areas. If you succeeded — it should look similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--776-fe0W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w5opgp1ued5j1s9l1fig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--776-fe0W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/w5opgp1ued5j1s9l1fig.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Same as above, you really need to develop your main skill, as it will be a foundation for your future career and give you the ability to be secure in the competitive market.&lt;/p&gt;

&lt;p&gt;Here you also usually need to develop fundamental disciplines a bit, as they are necessary to solve the most complex tasks and write effective code. So it’s time to dust off those books about Computer Science, networking, algorithms, etc…&lt;/p&gt;

&lt;p&gt;Your new description: this guy can do everything w/o supervision (and can supervise others) if there are requirements available.&lt;/p&gt;

&lt;p&gt;It’s also worth mentioning that this is the right time to start practicing mentorship. It will help you to strengthen your communication skills as well as polish your main skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team/Tech Leader
&lt;/h2&gt;

&lt;p&gt;At some point you will be asked to kick off a new project and gather a team, or become a leader in your current group. Or you may move to another company and obtain a higher position. And the trick is this is only the beginning of the story 😀.&lt;/p&gt;

&lt;p&gt;Now you usually need to learn a lot of new things really quickly. And “surprisingly” after all this mess with learning and adaptation period your skills will look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YJBm0keS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/li0safmgc57cuz7v8gyk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YJBm0keS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/li0safmgc57cuz7v8gyk.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No progress in your main discipline, at all!. In fact, you may even lose some sharpness there, but let’s be optimistic :)&lt;/p&gt;

&lt;p&gt;In this new role, you really need to progress in your soft skills as you now need to take care not only of yourself but also about the whole team. Your main goal is to ensure that the team works in the most effective way possible. So you are not obliged to work within the team, but you must work on the team. This includes things like optimization of internal processes, facilitation of task discussion and planning, helping team members with their self-development, etc…&lt;/p&gt;

&lt;p&gt;You can even stop coding (which may not be a good idea as you will lose your skill completely) if your team performs well.&lt;/p&gt;

&lt;p&gt;And try to lead by example and constantly grow your team members.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architect / Head of the department
&lt;/h2&gt;

&lt;p&gt;At this stage, you usually need to make a decision about your future career. Are you a more technical guy that wants to keep coding forever? Or do you want to become a manager and pursue positions like Director of Engineering, CTO, CEO?&lt;/p&gt;

&lt;h3&gt;
  
  
  Architect
&lt;/h3&gt;

&lt;p&gt;At this position you will be actively interacting with stakeholders in order to envision, model and provide initial designs that can be built by the team. As well as validate more low level decisions made by the team. So you need to improve your fundamental knowledge in order to be able to make objective decisions that are based on facts and knowledge rather than experience and feelings.&lt;/p&gt;

&lt;p&gt;Also, I would say that architecture is not only about technical systems design but also about people. You always need to account for the people you work with, and as a result the resources you have (ex: it’s usually a bad idea to suggest usage of Rust language if you have Go developers team). And even if you have a chance to build a brand new team, you should be able to form proper position profiles and hire the right people.&lt;/p&gt;

&lt;p&gt;So you should really progress in your understanding of the overlapping disciplines and the ways different specialists collaborate with each other in order to design a system that can be built by the people you have (or will be able to hire) in optimal time. And yes, sometimes it’s ok to sacrifice technical excellence in order to make solutions “doable” for your team.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aWj8KYY0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ef1gxsoo4145iohaxl8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aWj8KYY0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ef1gxsoo4145iohaxl8z.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Head of department
&lt;/h3&gt;

&lt;p&gt;If you selected the “alternative” way for your career, I have a surprise for you 😄 This is how your skills will look soon:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zjq2LLuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wy9st4hx5yiy5lqrwvax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zjq2LLuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wy9st4hx5yiy5lqrwvax.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this new role, you really need to progress in your soft skill set as you won’t be doing a lot (if any) hands-on work now. You will be delivering results with the help of your team(s) and you should be able to keep them in shape, help to solve issues, improve the skills of the individuals, find the right people, etc…&lt;/p&gt;

&lt;p&gt;Consequently, you’re going to lose some of the deep knowledge you had before as your knowledge will become outdated and your mind will adapt to a new type of work.&lt;/p&gt;

&lt;p&gt;A lot of articles already cover this topic so I don’t want to repeat everything here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;As you progress in your career path, the qualities needed to obtain the next position can be really different from what you currently have, as well as responsibilities. So I would generally recommend reading not only literature that is related to your current role, but also things that your boss and colleagues from overlapping areas read.&lt;/p&gt;

&lt;p&gt;As for the race to catch all hype technologies — I would recommend staying up to date with all the new tools and products in the field of your deep knowledge, and familiarize yourself with the technologies that have come out or come close to the “&lt;a href="https://en.wikipedia.org/wiki/Hype_cycle"&gt;plateau of productivity&lt;/a&gt;” in overlapping disciplines. This will allow you to stay on trend while still being focused.&lt;/p&gt;

&lt;p&gt;I wish you all the best in your self-development process and career success.&lt;/p&gt;

&lt;p&gt;Leave your comments and remarks below. It is always exciting to hear opinions or stories about alternative experiences from colleagues 😉&lt;/p&gt;

&lt;p&gt;Also I want to say a big thank you to &lt;a href="https://www.namecheap.com/about/"&gt;Namecheap, Inc&lt;/a&gt; for help with this article.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Web Components Landscape in 2019</title>
      <dc:creator>Vlad Fedosov</dc:creator>
      <pubDate>Thu, 11 Jul 2019 10:14:20 +0000</pubDate>
      <link>https://dev.to/stylet/web-components-landscape-in-2019-5go3</link>
      <guid>https://dev.to/stylet/web-components-landscape-in-2019-5go3</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F620%2F1%2Aq5vs3KU_zk0E7x5Ju4FXNg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F620%2F1%2Aq5vs3KU_zk0E7x5Ju4FXNg.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recently I was working on a research of the Web Components technology for my company (&lt;a href="https://www.namecheap.com/" rel="noopener noreferrer"&gt;Namecheap, Inc&lt;/a&gt;) and found that it’s relatively hard to get an understanding of the overall state of the things as for now. So this article attempts to resolve this problem and provide you with a starting point to your journey.&lt;/p&gt;

&lt;h3&gt;
  
  
  Main concerns
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Browser support&lt;/li&gt;
&lt;li&gt;Frameworks compatibility&lt;/li&gt;
&lt;li&gt;SSR + SEO / Bots&lt;/li&gt;
&lt;li&gt;Styling&lt;/li&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;Versioning&lt;/li&gt;
&lt;li&gt;Delivery&lt;/li&gt;
&lt;li&gt;Available tools&lt;/li&gt;
&lt;li&gt;Web Components vs Frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Browser support
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;TL;DR&lt;/em&gt;: IE 10–11 and Edge (Chakra based) are &lt;strong&gt;out of the game&lt;/strong&gt; as they do not support Shadow DOM. This makes use of the Web Components almost impractical due to the complexity of the polyfills.&lt;/p&gt;

&lt;p&gt;All other browsers (Chrome, FF, Safari, considering 2 latest versions) work just fine with all major techs we need. Let’s looks at the table:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Frameworks compatibility
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;All major frameworks&lt;/strong&gt; that exist nowadays &lt;a href="https://custom-elements-everywhere.com/" rel="noopener noreferrer"&gt;fully support&lt;/a&gt; Web Components. But let’s look closely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React/Preact — there are &lt;a href="https://custom-elements-everywhere.com/libraries/react/results/results.html" rel="noopener noreferrer"&gt;some issues&lt;/a&gt; with advanced integration :( And you &lt;a href="https://reactjs.org/docs/web-components.html#using-web-components-in-react" rel="noopener noreferrer"&gt;may need&lt;/a&gt; to build React wrappers for WCs (&lt;a href="https://github.com/adobe/react-webcomponent" rel="noopener noreferrer"&gt;can be automated&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Vue.js — works &lt;a href="https://alligator.io/vuejs/vue-integrate-web-components/" rel="noopener noreferrer"&gt;out of the box&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Angular — works &lt;a href="https://stenciljs.com/docs/angular" rel="noopener noreferrer"&gt;out of the box&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SSR (Server-side rendering) + SEO / Bots
&lt;/h3&gt;

&lt;p&gt;It’s theoretically possible to fully render WC at server side (and it &lt;a href="https://github.com/skatejs/skatejs/tree/master/packages/ssr" rel="noopener noreferrer"&gt;even works&lt;/a&gt; for simple ones), but… There is no stable implementation yet, as well as &lt;a href="https://www.youtube.com/watch?v=yT-EsESAmgA" rel="noopener noreferrer"&gt;way to represent&lt;/a&gt; Shadow DOM in HTML 😟 Community is &lt;a href="https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Declarative-Shadow-DOM.md" rel="noopener noreferrer"&gt;actively working&lt;/a&gt; on a solution.&lt;/p&gt;

&lt;p&gt;So what should we do then…? 🤯&lt;/p&gt;

&lt;p&gt;The answer is simple – &lt;strong&gt;you can live without it&lt;/strong&gt; (for Web Components). Of course this approach has some limitations but we have what we have… Let me explain the idea.&lt;/p&gt;

&lt;p&gt;To render Web Components at client side only and do not sacrifice SEO / Bots compatibility you need to keep your content in Light DOM and use ARIA attributes. &lt;strong&gt;Treat your Web Components as native HTML elements.&lt;/strong&gt; You can agree that you don’t need to render Shadow DOM for example for &amp;lt;select&amp;gt; element to see it’s content. If components are well designed, crawlers do not need a flattened tree to get text contents.&lt;/p&gt;

&lt;p&gt;Let’s look at the Tab component markup as an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;my-tab-group role="tablist" aria-label="My test tabs"&amp;gt;
  &amp;lt;my-tab role="tab" slot="tab"&amp;gt; Title for tab 1 &amp;lt;/my-tab&amp;gt;
  &amp;lt;my-tab-panel role="tabpanel" slot="panel"&amp;gt;Content 1 &amp;lt;/my-tab-panel&amp;gt;
  &amp;lt;my-tab role="tab" slot="tab"&amp;gt;Title for tab 2 &amp;lt;/my-tab&amp;gt;
  &amp;lt;my-tab-panel role="tabpanel" slot="panel"&amp;gt;Content 2 &amp;lt;/my-tab-panel&amp;gt;
  &amp;lt;my-tab role="tab" slot="tab"&amp;gt;Title for tab 3&amp;lt;/my-tab&amp;gt;
  &amp;lt;my-tab-panel role="tabpanel" slot="panel"&amp;gt;Content 3 &amp;lt;/my-tab-panel&amp;gt;
&amp;lt;/my-tab-group&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see from this example you as a Bot don’t need access to the Shadow DOM to understand the content present on a page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Styling
&lt;/h3&gt;

&lt;p&gt;Because in our components we use Shadow DOM for their internal markup and slots for the content — writing CSS may become a challenging task at the beginning. Let’s go through the concepts we have here.&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/stylet/embed/GbzKRg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  CSS Isolation
&lt;/h4&gt;

&lt;p&gt;Shadow DOM &lt;a href="https://stackoverflow.com/questions/49709676/light-dom-style-leaking-into-shadow-dom" rel="noopener noreferrer"&gt;&lt;strong&gt;almost&lt;/strong&gt; completely&lt;/a&gt; isolates its content from page CSS. In our example we have &amp;lt;p&amp;gt; tag (that resides under Shadow DOM) content in green because &lt;a href="https://take.ms/KbJ6Q" rel="noopener noreferrer"&gt;color property was inherited&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to include CSS into Shadow DOM
&lt;/h4&gt;

&lt;p&gt;Nowadays the simplest way to deliver CSS for Web Components is to &lt;strong&gt;embed them inline&lt;/strong&gt; into Web Component template. If you include them via &amp;lt;link&amp;gt; tag — you will see &lt;strong&gt;Flash of unstyled content&lt;/strong&gt; during page load as in the example above (look at the “(I’m Shared CSS)” label).&lt;/p&gt;

&lt;p&gt;However this limitation can be overcome by rather hiding all Shadow DOM content before linked CSS will be loaded or by additionally including component external CSS to the main page code (of course it should be scoped somehow in this case).&lt;/p&gt;

&lt;p&gt;I’m looking forward to see &lt;a href="https://developers.google.com/web/updates/2019/02/constructable-stylesheets" rel="noopener noreferrer"&gt;Constructable Stylesheets&lt;/a&gt; being available in all major browsers. This would give us more control over CSS.&lt;/p&gt;

&lt;h4&gt;
  
  
  Context dependent styles
&lt;/h4&gt;

&lt;p&gt;Often our components have different view modes depending on the passed arguments. Classic example is &amp;lt;select multiple&amp;gt;. When you pass multiple argument to “select” component — it fully changes its appearance. To achieve similar behaviour Web Platform offers :host() pseudo-class (don’t mix it with :host one).&lt;/p&gt;

&lt;p&gt;Unfortunately this feature isn’t supported in Safari and iOS so we can’t really use it. As a workaround we can use power of JS to manually project host attributes and classes into root element within Shadow DOM to get an ability to write regular CSS.&lt;/p&gt;

&lt;h4&gt;
  
  
  Styling slotted content
&lt;/h4&gt;

&lt;p&gt;Stylesheets that were added to the Shadow DOM may be also applied to the &amp;lt;slot&amp;gt; content. To do this we have ::slotted() CSS pseudo-element. However its browser support still non perfect. Look at the example above, Safari won’t handle ::slotted(p)::before selector correctly.&lt;/p&gt;

&lt;p&gt;As a workaround here we can inject styles that are responsible for slot content styling into the page CSS. So the following selector ::slotted(p)::before written for &amp;lt;my-component&amp;gt; will be transformed into my-component p::before. Of course it breaks concept of the Shadow DOM a little bit but I don’t see another way out for now.&lt;/p&gt;

&lt;h4&gt;
  
  
  Recommendation
&lt;/h4&gt;

&lt;p&gt;At this stage I would recommend to keep CSS, as you likely have it now, in a separate file, include it into the page via &amp;lt;link&amp;gt; tag and every Shadow DOM you’ll have. Currently I use the following code to keep it rolling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyComponent extends HTMLElement {
  constructor() {
    super();

    this.attachShadow({ mode: 'open' });
    this.__injectGlobalCSS();
  };

  __injectGlobalCSS() {
    const globalCssInclude = _document_.querySelector(
      'head &amp;gt; [data-global-css="true"]'
    );

    if (globalCssInclude === null) {
      console.warn(`Can't find global CSS for component ${this.tagName}! Trying to render w/o it...`);
      return;
    }

    this.shadowRoot.appendChild(globalCssInclude.cloneNode(true));
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Accessibility
&lt;/h3&gt;

&lt;p&gt;When users of assistive technology, like a screen reader, navigate a web page, it’s vitally important that the semantic meaning of the various controls is communicated. But how this can be achieved with Web Components considering that HTML tags will be custom and so will not have any semantic meaning?&lt;/p&gt;

&lt;p&gt;Fortunately there is a solution, to bring semantic back to your custom elements you just need to follow &lt;a href="https://www.w3.org/TR/wai-aria-practices-1.1/" rel="noopener noreferrer"&gt;WAI-AIRA&lt;/a&gt; specification. So if you already take care about accessibility — &lt;strong&gt; no much changes here&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s look at the accessible slider component built with Web Components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;custom-slider min="0" max="10" value="3" role="slider"
 tabindex="0" aria-valuemin="0" aria-valuemax="10"
 aria-valuenow="3" aria-valuetext="3"
 aria-label="Movie rating"&amp;gt;&amp;lt;/custom-slider&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see more examples of the fully accessible Web Components you can also refer to the &lt;a href="https://developers.google.com/web/fundamentals/web-components/examples/" rel="noopener noreferrer"&gt;following samples from Google&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Versioning
&lt;/h3&gt;

&lt;p&gt;Currently all Web Components must be &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define" rel="noopener noreferrer"&gt;registered in global registry&lt;/a&gt;. So you can’t have 2 versions of the same component on a single page. This follows approach that Browser use for the DOM, you have single version of it at a time. Simple.&lt;/p&gt;

&lt;p&gt;But if you use &lt;a href="https://micro-frontends.org/" rel="noopener noreferrer"&gt;Microservices approach at the Frontend&lt;/a&gt; or just have multiple apps running side-by-side on the same page — it may become an issue for you.&lt;/p&gt;

&lt;p&gt;Let’s look at the options we have here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Never do breaking changes&lt;/em&gt;. This is the principle that Browsers use. And while it’s possible to do it and it may even be the best option to start with, it’s obvious that it contradicts to the principle “fail fast, fail safe” and doesn’t facilitate innovations.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Tag based versioning&lt;/em&gt;. So instead of having &amp;lt;x-button&amp;gt; you would have &amp;lt;x-button-v1&amp;gt; to accommodate further major versions. So if “Fragment 1” requires &lt;a href="mailto:button@1.1.5"&gt;button@1.1.5&lt;/a&gt; and “Fragment 2” requires &lt;a href="mailto:button@1.2.1"&gt;button@1.2.1&lt;/a&gt; — &lt;a href="mailto:button@1.2.1"&gt;button@1.2.1&lt;/a&gt; only will be used. And if “Fragment 1” needs v1.1.5 and “Fragment 2” needs v2.0.0— both components will be registered.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Fragment based scoping&lt;/em&gt;. So instead of having &amp;lt;x-button&amp;gt; you would have &amp;lt;x-button-myfragment&amp;gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Delivery to Microservice based Frontend
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;You can skip it if you have single app at the client side. More info about Microservice based Frontend &lt;a href="https://micro-frontends.org/" rel="noopener noreferrer"&gt;can be found here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I would generally recommend to centrally manage bundle that reside outside of the Fragment and loads code of necessary components. Potentially Fragments may declare needed components and we can generate needed bundle on the fly.&lt;/p&gt;

&lt;p&gt;Actual registration of the Web Component within Browser registry may happen globally or if picked up the last approach for versioning — at the Fragment level.&lt;/p&gt;

&lt;h3&gt;
  
  
  Available tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Libraries you can use to author your Web Components (sorted by my preference, top to bottom):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://lit-element.polymer-project.org/" rel="noopener noreferrer"&gt;LitElement&lt;/a&gt; – written by the guys from &lt;a href="mailto:Polymer@Google"&gt;Polymer@Google&lt;/a&gt;. &lt;strong&gt;Optimal choice&lt;/strong&gt;  IMO.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://stenciljs.com/" rel="noopener noreferrer"&gt;Stencil&lt;/a&gt; – Web Components compiler plus base classes. Built by Ionic team. It has its own build system. Meaning components generated by Stencil can be consumed in any project, but components cannot live in the same project as the application consuming them.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://skatejs.netlify.com/" rel="noopener noreferrer"&gt;SkateJS&lt;/a&gt; – tiny wrapper around native APIs that allows to use various renderers. Built by &lt;a href="https://medium.com/u/15cc8b14327c" rel="noopener noreferrer"&gt;Trey Shugart&lt;/a&gt; who gave us &lt;a href="https://medium.com/@treshugart/%C3%A5server-side-rendering-web-components-e5df705f3f48" rel="noopener noreferrer"&gt;WC SSR PoC&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://svelte.dev/docs#svelte_compile" rel="noopener noreferrer"&gt;Svetle 3&lt;/a&gt; — it’s more a framework rather than library to simplify Web Components creation.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://riot.js.org/" rel="noopener noreferrer"&gt;Riot.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://slimjs.com/#/getting-started" rel="noopener noreferrer"&gt;Slim.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://x-tag.github.io/" rel="noopener noreferrer"&gt;X-Tag&lt;/a&gt; — latest version still in beta&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.htmlelements.com" rel="noopener noreferrer"&gt;Smart HTML Elements&lt;/a&gt; – paid, framework agnostic library&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But hey, do I &lt;strong&gt;really need some tool&lt;/strong&gt; to comfortably write Web Components? And the &lt;strong&gt;answer is no&lt;/strong&gt; , you can write them using Vanilla JS. And it will work for most of the (simple) components you will have.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Components vs Frameworks
&lt;/h3&gt;

&lt;p&gt;To be short: they’re different. Don’t try to replace good old frameworks like Vue.js or React with Web Components.&lt;/p&gt;

&lt;p&gt;I would say at this stage Web Component are really useful only if you need to have an instrument that allows you to write framework agnostic code for basic UI components from which you will construct pages with the help of your favourite framework.&lt;/p&gt;

&lt;p&gt;Another use case may if you write sharable UI components library (like Bootstrap or MDC) and want to keep it framework independent. Example of the Material Design Components in &lt;a href="https://github.com/material-components/material-components-web" rel="noopener noreferrer"&gt;pre-WC era&lt;/a&gt; and &lt;a href="https://github.com/material-components/material-components-web-components" rel="noopener noreferrer"&gt;with WC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As time goes frameworks may start to use Custom Elements and Shadow DOM internally but I wouldn’t expect to see it in the nearest 1–2 years.&lt;/p&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;p&gt;If you see any gaps or mistakes in the material provided above pls post them in the comments or send me an &lt;a href="//mailto:vlad.fedosov@gmail.com"&gt;email&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In case of the positive feedback from the community I hope to continue this topic and provide more in depth materials about nuances of the Web Components usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other articles to read
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/bennypowers/lets-build-web-components-part-8-mythbusters-edition-3la#myth-web-components-cant-accept-complex-data"&gt;Web Components: Mythbusters Edition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots" rel="noopener noreferrer"&gt;Using templates &amp;amp; slots&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/web-components/" rel="noopener noreferrer"&gt;Complex guide &amp;amp; best practices from Google&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/56023322/are-duplicate-ids-allowed-in-separate-shadow-roots" rel="noopener noreferrer"&gt;Duplicate IDs cross Shadow DOM trees&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://robdodson.me/the-future-of-accessibility-for-custom-elements/" rel="noopener noreferrer"&gt;The future of accessibility for custom elements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/richharris/why-i-don-t-use-web-components-2cia"&gt;Why I don’t use web components&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/ionic/why-we-use-web-components-2c1i"&gt;Ionic team: Why We Use Web Components&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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