<?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: Entando </title>
    <description>The latest articles on DEV Community by Entando  (@entando).</description>
    <link>https://dev.to/entando</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%2Forganization%2Fprofile_image%2F4651%2F50ddac7a-bdd5-4e58-af38-1abfb1ad034d.jpg</url>
      <title>DEV Community: Entando </title>
      <link>https://dev.to/entando</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/entando"/>
    <language>en</language>
    <item>
      <title>Composable Apps security practices with Entando on Kubernetes, featuring Ippon expert</title>
      <dc:creator>Anthony Viard</dc:creator>
      <pubDate>Fri, 27 Jan 2023 14:23:36 +0000</pubDate>
      <link>https://dev.to/entando/composable-apps-security-practices-with-entando-on-kubernetes-featuring-ippon-expert-59ie</link>
      <guid>https://dev.to/entando/composable-apps-security-practices-with-entando-on-kubernetes-featuring-ippon-expert-59ie</guid>
      <description>&lt;p&gt;Building composable apps means, without a doubt, understanding how it manages security and reliability. Composable apps offer a lot of advantages to streamline applications, provided by the modularity and reusability of Packaged Business Capabilities. Individual modules and PBCs help isolate problems and security design, separate frontend and backend concerns and allow patching at the component level. At the company level, and with a good hub policy, it turns into “patch once, secure all” because you can easily leverage security fixes if they are applied to centralized modules in a store that all your applications rely on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxe5vsik1urbj9jmh3gx0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxe5vsik1urbj9jmh3gx0.png" alt="Image description" width="800" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, security strategies should not be applied at the code or module level only. The infrastructure has to be fully resilient and secure. No one can imagine using a car with seat belts within an insecure chassis. It doesn't make sense. Security is everyone’s business.&lt;/p&gt;

&lt;p&gt;Fortunately, solutions exist to help us design at all levels with security as one of the top priorities.&lt;/p&gt;

&lt;p&gt;"Shift security left". It is more than a buzzword, It is good advice according to Lucas Ward in a recent article called &lt;a href="https://blog.ippon.tech/hardening-kubernetes-and-what-that-entails-with-entando/" rel="noopener noreferrer"&gt;Hardening Kubernetes and What That Entails With Entando&lt;/a&gt;&lt;span&gt;.&lt;/span&gt; There, Ward describes how building applications with Kubernetes is challenging.&lt;/p&gt;

&lt;p&gt;I agree, building a fully secured application with Kubernetes is a real adventure. If there is something we can't live without, it is security. Whatever business domain we work in, security should be at the center of the design and production processes.&lt;/p&gt;

&lt;p&gt;Delaying its implementation is risky; executing it is time consuming.&lt;/p&gt;

&lt;p&gt;As Ward spells out, we can rely on frameworks to bring a smooth and dependable way to secure applications, especially with Kubernetes. He says that using a platform such as Entando provides simplicity and a solid base with best practices you can count on to promote security from the ground up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kp9j572o9nd9xzg72mb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9kp9j572o9nd9xzg72mb.png" alt="Image description" width="761" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From solid structures and base setup with code generation to a well documented CI/CD process, and opinionated build pipelines, Ward asserts that "using Entando as your platform of choice covers a lot of ground in the Development, Build, and Infrastructure scape."&lt;/p&gt;

&lt;p&gt;Saying more without spoiling it is just impossible, just read it! This is my only advice.&lt;/p&gt;

</description>
      <category>cryptocurrency</category>
      <category>bitcoin</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Explore Docker-based bundles with JHipster and Entando 7.1</title>
      <dc:creator>Anthony Viard</dc:creator>
      <pubDate>Tue, 10 Jan 2023 10:08:27 +0000</pubDate>
      <link>https://dev.to/entando/explore-docker-based-bundles-with-jhipster-and-entando-71-1b84</link>
      <guid>https://dev.to/entando/explore-docker-based-bundles-with-jhipster-and-entando-71-1b84</guid>
      <description>&lt;p&gt;At Entando we define a bundle as a package that contains one or more components. A bundle can be a single component, component collection, PBC, or  solution template, based on the level of granularity. Any bundle built with Entando is an Entando Bundle.&lt;/p&gt;

&lt;p&gt;Entando 7.1 introduces a major new change for bundles with a Docker-based structure. This article explores all the things you need to know about that feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  A shift from Git-based bundles
&lt;/h2&gt;

&lt;p&gt;If you’ve already built or used bundles with Entando, you should know that before v7.1, the bundles were Git-based. That means the source code (called project) and the built artifact (the deployable bundle) were stored under two different Git repositories.&lt;/p&gt;

&lt;p&gt;Traditionally, the source code repository is used by the Creators team for coding and building components with development tooling. The coding flow is similar to what we find in any development team, pushing and merging branches to share and review the code within the team.&lt;/p&gt;

&lt;p&gt;The second repository stores the result of the compiling process, the artifact, that Curators can register in a hub, and Composers can install on their Application Composition Platform.&lt;/p&gt;

&lt;p&gt;The Docker-based bundle is a total shift from that point. The source repository is still present but, all the artifacts are now sent to a Docker registry using Docker images.&lt;/p&gt;

&lt;h2&gt;
  
  
  A structure modification
&lt;/h2&gt;

&lt;p&gt;The publishing process was improved with the tool change, so we took the opportunity to streamline the bundle structure itself.&lt;/p&gt;

&lt;p&gt;We have a more readable and consistent bunch of folders with the Docker-based bundles.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tr&gt;
   &lt;td&gt;
&lt;strong&gt;Git-based&lt;/strong&gt;
   &lt;/td&gt;
   &lt;td&gt;
&lt;strong&gt;Docker-based&lt;/strong&gt;
   &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;
&lt;em&gt;bundle/descriptor.yaml&lt;/em&gt;
&lt;p&gt;
The main bundle descriptor
   &lt;/p&gt;
&lt;/td&gt;
   &lt;td&gt;
&lt;em&gt;entando.json&lt;/em&gt;
&lt;p&gt;
The main Entando file that contains components definition and metadata
   &lt;/p&gt;
&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;
&lt;em&gt;ui/&lt;/em&gt;
&lt;p&gt;
The micro frontends sources folder
   &lt;/p&gt;
&lt;/td&gt;
   &lt;td&gt;
&lt;em&gt;microfrontends/&lt;/em&gt;
&lt;p&gt;
Centralized micro frontends folder
   &lt;/p&gt;
&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;src/
&lt;p&gt;
The backend sources folder
   &lt;/p&gt;
&lt;/td&gt;
   &lt;td&gt;
&lt;em&gt;microservices/&lt;/em&gt;
&lt;p&gt;
The microservices folder, one per component
   &lt;/p&gt;
&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;
&lt;em&gt;src/main/docker&lt;/em&gt;
&lt;p&gt;
The auxiliary service folder such as Docker compose files and Keycloack configuration for local usages 
   &lt;/p&gt;
&lt;/td&gt;
   &lt;td&gt;
&lt;em&gt;svc/&lt;/em&gt;
&lt;p&gt;
The auxiliary service folder such as Dockercompose files and Keycloack configuration for local usage 
   &lt;/p&gt;
&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;
&lt;em&gt;*.sh&lt;/em&gt;
&lt;p&gt;
Shell script used by the CLI to compile and build the bundle
   &lt;/p&gt;
&lt;/td&gt;
   &lt;td&gt;
   &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;
   &lt;/td&gt;
   &lt;td&gt;
&lt;em&gt;platform/&lt;/em&gt;
&lt;p&gt;
The folder for any Entando related component such as pages, content, page templates… One sub-folder per component type
   &lt;/p&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you like to make a deep comparison between these implementations, our documentation provides a table &lt;a href="https://developer.entando.com/v7.1/docs/curate/bundle-comparison.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This means that the cli and commands are now following that structure and you can easily run them to create a new one.&lt;/p&gt;

&lt;p&gt;Let’s start a new project to discover this&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a new 7.1 bundle with the ent CLI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before moving forward, you have to ensure that your Entando CLI is up to date. If not, please run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;curl &lt;span class="nt"&gt;-sfL&lt;/span&gt; https://get.entando.org/cli&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--update&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzycu0g7mnphlqe4hcs2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzycu0g7mnphlqe4hcs2j.png" alt="Image description" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t forget to activate it with the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/.entando/activate"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Initialize the project
&lt;/h3&gt;

&lt;p&gt;From your favorite folder, run the following command to initialize the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ent bundle init my-bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Please note you can replace “my-bundle” according to your project name.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A new folder is created with this project name; open it as a project with your favorite IDE to check the new structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cqatuypfimzejk3rsx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9cqatuypfimzejk3rsx.png" alt="Image description" width="800" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can check the entando.json file content, and the metadata:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"microservices"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"microfrontends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"svc"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-bundle"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.0.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-bundle description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bundle"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add a microservice
&lt;/h3&gt;

&lt;p&gt;In the project folder, run the following command to add a new microservice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ent bundle ms add sample-ms &lt;span class="nt"&gt;--stack&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;spring-boot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We specify the stack because of the dedicated metadata we may need with some stack types.  This command creates a new folder, sample-ms, in microservices and adds an entry in the entando.json.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"microservices"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sample-ms"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="nl"&gt;"stack"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"spring-boot"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="nl"&gt;"healthCheckPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/health"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"microfrontends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"svc"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-bundle"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.0.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-bundle description"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bundle"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note this new folder is empty and you have to add your own code. We provide an easy way to start; let’s do it with JHipster.&lt;/p&gt;

&lt;p&gt;Call JHipster with the following commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;microservices/sample-ms
ent jhipster &lt;span class="nt"&gt;--blueprints&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;entando
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, select only the default values.&lt;/p&gt;

&lt;p&gt;When the generation is done, the sample-ms folder contains all the files provided by JHipster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Customize the bundle for JHipster
&lt;/h3&gt;

&lt;p&gt;You just need to tweak a couple of things to make it work properly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Edit the &lt;code&gt;entando.json&lt;/code&gt; and update &lt;code&gt;microservices/sample-ms&lt;/code&gt; to set the &lt;code&gt;healthCheckPath&lt;/code&gt; and &lt;code&gt;dbms&lt;/code&gt; properties:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nl"&gt;"healthCheckPath"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"/management/health"&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"dbms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"postgresql"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Move the Blueprint-provided auxiliary service definitions into the svc directory in the bundle project:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;microservices/sample-ms/src/main/docker/&lt;span class="k"&gt;*&lt;/span&gt; svc/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This enables the ent CLI to start Keycloak:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ent bundle svc &lt;span class="nb"&gt;enable &lt;/span&gt;keycloak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For advanced use cases, you can add MFEs with &lt;a href="https://developer.entando.com/v7.1/tutorials/create/ms/generate-microservices-and-micro-frontends.html#generate-the-components" rel="noopener noreferrer"&gt;this tutorial&lt;/a&gt;. Please note that for microservices, you have to execute some extra steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discover the new publishing process
&lt;/h2&gt;

&lt;p&gt;This new bundle structure comes with a simpler publishing process provided by new streamlined CLI commands.&lt;/p&gt;

&lt;p&gt;You can find a graphic of the different steps below. It describes the overall process and helps you to understand the details involved in every step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmfjs9mmnrhh6sdi88b7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmfjs9mmnrhh6sdi88b7q.png" alt="Image description" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's follow it for our new 7.1 bundle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Build
&lt;/h3&gt;

&lt;p&gt;From the root project folder, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ent bundle pack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note, you need to have Maven &lt;a href="https://maven.apache.org/install.html" rel="noopener noreferrer"&gt;installed&lt;/a&gt; for this to execute. You also need Docker installed; you can check the installation procedure &lt;a href="https://docs.docker.com/get-docker/" rel="noopener noreferrer"&gt;here&lt;/a&gt; regarding your environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5uurcnn91volsdp18xd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5uurcnn91volsdp18xd.png" alt="Image description" width="402" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can run the &lt;code&gt;docker image ls&lt;/code&gt; command to see your available images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2fllebr6hfvohmotby5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2fllebr6hfvohmotby5e.png" alt="Image description" width="800" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Publish
&lt;/h3&gt;

&lt;p&gt;Once it’s finished, run the next command to publish the bundle to a Docker repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ent bundle publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this step, you need to be logged into the Docker hub, ensure you have an account or create a new one on this website: &lt;a href="https://hub.docker.com" rel="noopener noreferrer"&gt;https://hub.docker.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_Please note, you can decide to publish the images to another registry by providing the URL with the &lt;code&gt;--registry&lt;/code&gt; parameter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwmnqjsavezzlf9siirr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwmnqjsavezzlf9siirr.jpg" alt="Image description" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk64bmnd6vc3rp9q70w6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk64bmnd6vc3rp9q70w6.png" alt="Image description" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy
&lt;/h3&gt;

&lt;p&gt;This step is the same as the previous Entando version, even if the commands have been modified to keep the consistency. Here, you need to have an available running instance of Entando. Visit &lt;a href="https://developer.entando.com" rel="noopener noreferrer"&gt;https://developer.entando.com&lt;/a&gt; to install a local one.&lt;/p&gt;

&lt;p&gt;Please note that you need your ent CLI profile to be connected to your Entando instance. If you followed the previous steps and installed a local multipass VM, you might have to run this command:&lt;code&gt;ent attach-vm entando&lt;/code&gt; where “entando” is the virtual machine name.&lt;/p&gt;

&lt;p&gt;Otherwise, it is possible to attach a kubeconfig file with this: &lt;code&gt;ent attach-kubeconfig {kubeconfig-file}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;From your bundle root folder, run the following command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08d5bi4tjfcpfo1333xm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08d5bi4tjfcpfo1333xm.png" alt="Image description" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the deploying process is finished, you can navigate to your Local Hub by clicking on the “Hub” menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo0ffjy23t87r8hnctmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo0ffjy23t87r8hnctmz.png" alt="Image description" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, you should see your bundle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7z51mj5eb0dgqoh4qh30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7z51mj5eb0dgqoh4qh30.png" alt="Image description" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;

&lt;p&gt;As you can see, the bundle is available in your Local Hub but not installed yet. That means nothing is running on your cluster from that bundle and the components are not available for composition.&lt;/p&gt;

&lt;p&gt;To install them, you can use the UI and click on the install button in the Local Hub or, you can run the following command from your bundle root folder: &lt;code&gt;ent bundle install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mg9fbb3367wpwippdhz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mg9fbb3367wpwippdhz.png" alt="Image description" width="800" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The micro frontends are now available in the App Builder to compose new pages. the microservices as pods and you can check them with &lt;code&gt;ent kubectl get pods -n entando.&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we discovered a few new features provided by Entando 7.1. The bundle structure has been rebuilt; they are now docker-based and the publishing process has been optimized with the ent CLI commands. The JHipster blueprint has been optimized to match this new paradigm.&lt;/p&gt;

&lt;p&gt;You can find explanations of these features during our &lt;a href="https://youtu.be/GoxX-N15ZGk" rel="noopener noreferrer"&gt;7.1 live with Sohini&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Did you know the bundle we just created can be used like a template to create a new one? Maybe not, because it’s also a new feature on 7.1 and this is the topic of the next blog post in this series. Stay tuned.&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Entando 7.1 Release Overview</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Tue, 08 Nov 2022 09:48:48 +0000</pubDate>
      <link>https://dev.to/entando/entando-71-release-overview-2dl3</link>
      <guid>https://dev.to/entando/entando-71-release-overview-2dl3</guid>
      <description>&lt;p&gt;Entando Application Composition Platform Version 7.1 is now available to support enterprises who are modernizing applications to accelerate development, reduce runtime costs, and streamline maintenance through the use of a composable application architecture.   Entando brings developer joy to the creation, curation, and composition of modular enterprise applications.   &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqut24tdgbf3sbk0e7yf4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqut24tdgbf3sbk0e7yf4.png" alt="Image description" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Even before the 21st century, enterprises have been advancing infrastructure and strategies to solve business problems.  From the development of web applications on-prem, to their subsequent move to the cloud, and now, modularization in the cloud, each move has accelerated development, lowered cost and streamlined maintenance.  &lt;/p&gt;

&lt;p&gt;This new phase of modularity focused on decoupling (or breaking up) both the backend code and the monolithic frontend by bundling microservices and micro frontends into &lt;a href="https://youtu.be/RkGBpLQ-070" rel="noopener noreferrer"&gt;Packaged Business Capabilities (PBCs)&lt;/a&gt;. These PBCs could be shared across development teams and projects within an Enterprise Hub and assembled into applications via a low-code Application Builder, all within a unified Application Composition Platform.  &lt;/p&gt;

&lt;p&gt;The updates available in Entando Application Composition Platform v7.1 are focused on the pro-code creators. It provides many new capabilities to support the development of modern composable applications, which include: &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;New:  Entando Platform Capability (EPC)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To accelerate application development, Entando 7.1 now supports a pluggable framework to allow Creators and Composers to easily expand the functionality of the Entando App Builder, add external services. Like the PBC, an EPC is a packaged capability and it adds functionality to the platform like menu options or an API management page. An EPC can be a headless CMS like Strapi, that is bundled, stored on Entando Cloud Hub, and implemented in the App Builder.&lt;/p&gt;

&lt;p&gt;A sample configuration is shown below: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdf1dd24l2vcjulf6e9q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdf1dd24l2vcjulf6e9q.png" alt="Image description" width="800" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The headless system (e.g., Strapi) uses the Entando App Builder as a templating mechanism to create and manage pages, content layout, and content versioning. &lt;/p&gt;

&lt;p&gt;1) An EPC can be deployed to the Entando Hub (or Entando Cloud Hub, the publically accessible version of the hub), &lt;/p&gt;

&lt;p&gt;2) Composers can access and install EPCs into the Entando App Builder, adding a new menu item to the builder, which &lt;/p&gt;

&lt;p&gt;3) when accessed, opens the headless interface, where content can be managed and you can return to the App Builder at any time.&lt;/p&gt;

&lt;p&gt;4) Users can access the external system’s APIs and resources, deploying them into applications using the page designer. Many types of EPCs can be built for Entando 7.1, including Headless CMS (Strapi.io is coming soon),  Workflow, AI/ML, API Mgmt, and more.  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;New: Pro-code bundle Templates&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;v7.1 introduces Pro-code Bundle Templates to enable developers, system integrators, and enterprises to create new Packaged Business Capabilities by reusing existing micro frontends and microservices allowing consistency and acceleration from a core PBC library.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;New: Service Discovery&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With v7.1, communication between micro frontends and microservices is decoupled and service discovery is made simpler with the API claims mechanism orchestrated by the ent CLI. It eliminates the need to define and manage API endpoints, both in local development and within a running instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Updated: Create Tooling&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;v7.1 mainly focuses on developers. The local development process was improved and now developers can easily initialize a bundle from scratch or download one from a hub. They can add components and populate the bundle descriptor with micro frontends, microservices, and platform components with the ent CLI. They can run, build, and install with only a few commands. Bundles that have worked on 7.0 will work on 7.1 as well. More details can be found here: &lt;a href="https://developer.entando.com/v7.1/docs/getting-started/ent-bundle.html#entando-7-1-bundle-development" rel="noopener noreferrer"&gt;https://developer.entando.com/v7.1/docs/getting-started/ent-bundle.html#entando-7-1-bundle-development&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Updated: Docker Image Specification&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Previously, developers used Git repositories to manage both code sources and bundle versioning. Now bundle packaging and publishing has moved to Docker which handle the image specifications. With this, one can still manage code sources on their preferred Git provider but each release will be done through an image registry.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Updated: Entando Command Line Interface (CLI)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We have enhanced the &lt;strong&gt;Entando CLI&lt;/strong&gt; for Mac and Windows. The CLI can now create new bundles from templates downloaded from the Hub, providing a wider range of commands to perform various actions. Some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Docker Image of the Bundle&lt;/li&gt;
&lt;li&gt;Docker-based bundle management commands&lt;/li&gt;
&lt;li&gt;Easily Publish a bundle inside Docker Hub&lt;/li&gt;
&lt;li&gt;API management&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Updated: Entando Hub&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Entando Hub was introduced in v7.0 and provides a repository for PBCs, solution templates, components, and/or component collections. Enterprises, Development Teams, System Integrators and others can implement an Entando Hub as a central repository from which the Entando App Builder can discover and quickly access entries. Entando Hub updates include: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker bundle name generation update&lt;/li&gt;
&lt;li&gt;Added security check on bundleGroupVersion details page&lt;/li&gt;
&lt;li&gt;Update install instructions to use ent ecr deploy&lt;/li&gt;
&lt;li&gt;Refined AppBuilder BundleGroups retrieval to sort if no pageSize provided.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;To learn more about Entando 7.1, or to get started with Composable Applications, see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A complete look at the 7.1 &lt;a href="https://developer.entando.com/next/docs/releases/#summary" rel="noopener noreferrer"&gt;release notes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs - &lt;a href="https://developer.entando.com/v7.1/docs/" rel="noopener noreferrer"&gt;https://developer.entando.com/v7.1/docs/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Tutorials - &lt;a href="https://developer.entando.com/v7.1/docs/" rel="noopener noreferrer"&gt;https://developer.entando.com/v7.1/docs/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Base install guide (manual, not the one liner until official launch): &lt;a href="https://developer.entando.com/v7.1/docs/getting-started/#install-kubernetes" rel="noopener noreferrer"&gt;https://developer.entando.com/v7.1/docs/getting-started/#install-kubernetes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Platform install guides: &lt;a href="https://developer.entando.com/v7.1/tutorials/#operations" rel="noopener noreferrer"&gt;https://developer.entando.com/v7.1/tutorials/#operations&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Watch a video with industry experts

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=fWbLQDZBEio" rel="noopener noreferrer"&gt;With Massimo Pezzini, formerly VP Distinguished Analyst 
with Gartner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=_pAILlnkLck" rel="noopener noreferrer"&gt;With Luca Mezzalira, Serverless Solutions Specialists 
at Amazon Web Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=Lo5rfCNLCvo" rel="noopener noreferrer"&gt;With James Governor Red Monk Analyst and Co-founder&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;a href="https://discover.entando.com/en-us/what-is-an-application-composition-platform" rel="noopener noreferrer"&gt;Download the “What is an Application Composition Platform" whitepaper&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="https://entando.com/page/en/demo" rel="noopener noreferrer"&gt;Book a guided demo&lt;/a&gt;&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>release</category>
      <category>opensource</category>
      <category>cloud</category>
      <category>docker</category>
    </item>
    <item>
      <title>Using Vue.js to create a Micro Frontend</title>
      <dc:creator>Anthony Viard</dc:creator>
      <pubDate>Mon, 27 Jun 2022 13:15:56 +0000</pubDate>
      <link>https://dev.to/entando/using-vuejs-to-create-a-micro-frontend-4815</link>
      <guid>https://dev.to/entando/using-vuejs-to-create-a-micro-frontend-4815</guid>
      <description>&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This article has been written with the help of the ModSquad Community. The related live session is available here:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VDj6LVRwsEM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hi, fellow developers!&lt;/p&gt;

&lt;p&gt;After learning how to create micro frontends with Angular and React, we’re jumping into another world with Vue.js. Remember, we’re trying to create a micro frontend using the web component specifications for each of the following frameworks: Angular, React, and Vue.js.&lt;/p&gt;

&lt;p&gt;Does Vue provide the best developer experience when creating a micro frontend social card? Let’s try it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the Vue.js app
&lt;/h2&gt;

&lt;p&gt;First, ensure that you have installed Node with npm (you can use Yarn instead) and Vue CLI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @vue/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can create the application by running the following command in your target folder. I suggest using the default option &lt;code&gt;Default ([Vue 3] babel, eslint)&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vue create vue-social-card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That should create a folder named &lt;code&gt;vue-social-card&lt;/code&gt; that contains a fresh Vue.js project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqijl14hqttgdbml3dk9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqijl14hqttgdbml3dk9.png" alt="Image description" width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please note that by default the application is configured to include certain features, such as npm scripts to start your app and eslint to help you code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discover your application
&lt;/h2&gt;

&lt;p&gt;Before making any changes and creating a micro frontend, let’s run the application locally using the command &lt;code&gt;npm run serve&lt;/code&gt;. Your application should then be available at the following URL: &lt;a href="http://localhost:8080/" rel="noopener noreferrer"&gt;http://localhost:8080/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbh5ct6adqb5qr7rv21p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcbh5ct6adqb5qr7rv21p.png" alt="Image description" width="800" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the social card component
&lt;/h2&gt;

&lt;p&gt;Vue.js helps you organize yourcode with components. That means we need to create a file to contain all the card code. You can delete the default file called &lt;code&gt;HelloWorld.vue&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once you’ve created a new file named &lt;code&gt;SocialCard.vue&lt;/code&gt; in the components folder, copy the following code into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&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="na"&gt;card&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;{{ card.name }}&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;{{ card.description }}&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;:src=&lt;/span&gt;&lt;span class="s"&gt;"card.image"&lt;/span&gt; &lt;span class="na"&gt;:alt=&lt;/span&gt;&lt;span class="s"&gt;"card.image_alt"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;320px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;450px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;62&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;68&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;margin-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;0.2s&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1.01&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
 &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.19&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our component is just a simple piece of HTML/CSS code that requires an entry object named &lt;code&gt;card&lt;/code&gt; and defines the following properties: &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;image&lt;/code&gt; and &lt;code&gt;image_alt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As it is, your application might be broken due to an error in the &lt;code&gt;app.vue&lt;/code&gt; file. It’s time to update it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update App.vue
&lt;/h2&gt;

&lt;p&gt;The reason your app doesn’t work is that the main component still includes the default component. To fix it, replace the file contents with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;SocialCard&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@/components/SocialCard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;SocialCard&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nf"&gt;data&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;shiba_card&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Shiba Inu&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;      A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;      bred for hunting.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://material.angular.io/assets/img/examples/shiba2.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;image_alt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Shiba Inu image&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="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;SocialCard&lt;/span&gt; &lt;span class="na"&gt;:card=&lt;/span&gt;&lt;span class="s"&gt;shiba_card&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/SocialCard&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This imports our social card component, defines a card object &lt;code&gt;shiba_card&lt;/code&gt; in the &lt;code&gt;data()&lt;/code&gt; function to store the different properties, then passes the card object to the social card component in the &lt;code&gt;template&lt;/code&gt; section.&lt;/p&gt;

&lt;p&gt;The application is working again and the default Vue landing page is replaced with the Shiba Inu social card.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwx0iepwz4d9yhdcld4s0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwx0iepwz4d9yhdcld4s0.png" alt="Image description" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, we only built a classic single page application and need to migrate it to a micro frontend. &lt;/p&gt;

&lt;h2&gt;
  
  
  Define the custom element
&lt;/h2&gt;

&lt;p&gt;In order to reuse this app as a web component, we need to define a custom element, which is a typical step we discovered when using Angular and React.&lt;/p&gt;

&lt;p&gt;Replace the content of the main.js file with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App.vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineCustomElement&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SocialCardElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defineCustomElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;social-card-element&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SocialCardElement&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code defines the &lt;code&gt;social-card-element&lt;/code&gt; custom element and wraps the Vue app. As we saw before, this app is now rendering the card as expected.&lt;/p&gt;

&lt;p&gt;Next, replace &lt;code&gt;&amp;lt;&lt;strong&gt;div&lt;/strong&gt; id="app"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; in the &lt;code&gt;public/index.html&lt;/code&gt; file with the custom element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;noscript&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;We're sorry but &lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;%=&lt;/span&gt; &lt;span class="na"&gt;htmlWebpackPlugin.options.title&lt;/span&gt; &lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; doesn't work properly without JavaScript enabled. Please enable it to continue.&lt;span class="nt"&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/noscript&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;social-card-element&amp;gt;&amp;lt;/social-card-element&amp;gt;&lt;/span&gt;
 &lt;span class="c"&gt;&amp;lt;!-- built files will be auto injected --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Congratulations! You have just built a Vue.js micro frontend using a custom element.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Please note, as I’m writing this article there is an issue with styling and custom elements that is discussed in detail here: &lt;a href="https://github.com/vuejs/core/issues/4662" rel="noopener noreferrer"&gt;https://github.com/vuejs/core/issues/4662&lt;/a&gt;. Please follow this ticket to know when it will be fixed or for current workarounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;The code above is available on GitHub: &lt;a href="https://github.com/avdev4j/vue-social-card" rel="noopener noreferrer"&gt;https://github.com/avdev4j/vue-social-card&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to this repo for the card example: &lt;a href="https://github.com/AlanPenaRuiz/vue-rick-and-morty" rel="noopener noreferrer"&gt;https://github.com/AlanPenaRuiz/vue-rick-and-morty&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you already using Entando and looking for Vue.js components? Take a look at this sample: &lt;a href="https://github.com/entando-samples/ent-project-template-vue" rel="noopener noreferrer"&gt;https://github.com/entando-samples/ent-project-template-vue&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Watch micro frontend videos on our YouTube channel: &lt;a href="https://www.youtube.com/c/EntandoVideos" rel="noopener noreferrer"&gt;https://www.youtube.com/c/EntandoVideos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Join us on Discord to share and learn about composable apps: &lt;a href="https://discord.gg/SdMCvyzzHm" rel="noopener noreferrer"&gt;https://discord.gg/SdMCvyzzHm&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>microfrontend</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Using React to create a Micro Frontend</title>
      <dc:creator>Anthony Viard</dc:creator>
      <pubDate>Mon, 20 Jun 2022 09:26:06 +0000</pubDate>
      <link>https://dev.to/entando/using-react-to-create-a-micro-frontend-4jn2</link>
      <guid>https://dev.to/entando/using-react-to-create-a-micro-frontend-4jn2</guid>
      <description>&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This article has been written with the help of the ModSquad Community. The related live session is available here:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4sF3XYlNZC4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hi, fellow developers!&lt;/p&gt;

&lt;p&gt;Having discovered micro frontend creation with Angular, we jump into another world with React. Remember, I’m trying to create a micro frontend using the web component specifications foreach of the following frameworks: Angular, React, and Vue.js.&lt;/p&gt;

&lt;p&gt;Does React provide the best developer experience when creating a micro frontend social card? Let’s try it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the React app
&lt;/h2&gt;

&lt;p&gt;React offers a simple way to &lt;a href="https://github.com/facebook/create-react-app" rel="noopener noreferrer"&gt;create React applications&lt;/a&gt; using the &lt;a href="https://create-react-app.dev/docs/getting-started/" rel="noopener noreferrer"&gt;Create React App&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As seen in the previous blog, you need to have npm installed. You can then run the following command to create the application skeleton:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-app react-social-card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once complete, you should have a new React project available in the &lt;code&gt;react-social-card&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;Start it using the command &lt;code&gt;npm start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The default React page is reachable at &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjdl4jlg2idiq9gftnp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjdl4jlg2idiq9gftnp7.png" alt="Image description" width="800" height="533"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Add the social card code
&lt;/h2&gt;

&lt;p&gt;Before configuring the &lt;code&gt;custom-element&lt;/code&gt;, we have to create the React social card component. After some research, here is an example of code we can use: &lt;a href="https://codepen.io/leoraw/pen/ZjvRpL" rel="noopener noreferrer"&gt;https://codepen.io/leoraw/pen/ZjvRpL&lt;/a&gt;. Thanks to &lt;a href="https://codepen.io/leoraw" rel="noopener noreferrer"&gt;@leoraw&lt;/a&gt; for sharing this example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the React components
&lt;/h3&gt;

&lt;p&gt;The social card is split into two different React components: a button box and the card itself.&lt;/p&gt;

&lt;p&gt;First, we create a new file for the button box in the &lt;code&gt;components&lt;/code&gt; folder, name it &lt;code&gt;ButtonBox.js&lt;/code&gt; and copy this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;UiButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;classes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isClicked&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="s2"&gt;ui-button clicked&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ui-button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isClicked&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="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

   &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
       &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ui-icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;       &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;   &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ButtonBox&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;

     &lt;span class="p"&gt;};&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
     &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
     &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UiButton&lt;/span&gt; &lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;♥&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;likes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
           &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likes&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
           &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
             &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;likeIsClicked&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
           &lt;span class="nx"&gt;isClicked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;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="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ButtonBox&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, in the same folder, we create the &lt;code&gt;SocialCard.js&lt;/code&gt; file and copy the following content.&lt;/p&gt;

&lt;p&gt;Please note that this new component imports and use the previous one. Effectively, the internal architecture in the micro frontend allows us to use multiple components, and all the components are built into one custom element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ButtonBox&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./ButtonBox&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;UiCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
 &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;card-wrapper&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;card-img&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;card-content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h3&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;     &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SocialCard&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;card-body&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UiCard&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;         &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;line&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="na"&gt;textAlign&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
             &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ButtonBox&lt;/span&gt;
             &lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
             &lt;span class="nx"&gt;likes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likes&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;         &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;       &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;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="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;SocialCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use the new components in the main App.js file
&lt;/h3&gt;

&lt;p&gt;Once these two components are available, we can update the main &lt;code&gt;App.js&lt;/code&gt; file and remove the old React demo code.&lt;/p&gt;

&lt;p&gt;Update the &lt;code&gt;App.js&lt;/code&gt; file by replacing the existing code with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./App.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;SocialCard&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./components/SocialCard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cardDetails&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Shiba Inu&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://material.angular.io/assets/img/examples/shiba2.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan. A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally bred for hunting.&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;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;likes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SocialCard&lt;/span&gt;
     &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cardDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cardDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nx"&gt;likes&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cardDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likes&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;cardDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;likeIsClicked&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see here that we are instantiating a new social card component and giving it some data to display.&lt;/p&gt;

&lt;p&gt;Now you can restart the application or refresh the page to see our social card appear. However, this is still a raw React application and we need to define the &lt;code&gt;custom-element&lt;/code&gt; to finish our task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhdl863euijt55n7qryw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhhdl863euijt55n7qryw.png" alt="Image description" width="487" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Switch the app to a custom element
&lt;/h2&gt;

&lt;p&gt;In the &lt;code&gt;src&lt;/code&gt; folder, at the same level as the &lt;code&gt;components&lt;/code&gt; folder, we create a new folder named &lt;code&gt;custom-element&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next, let’s create a new file named &lt;code&gt;social-card-app.js&lt;/code&gt; to define the &lt;code&gt;custom-element&lt;/code&gt; using the related API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SocialCardApp&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;HTMLElement&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nf"&gt;connectedCallback&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mountPoint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;span&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;StrictMode&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                   &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
           &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/React.StrictMode&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;,
&lt;/span&gt;           &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mountPoint&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="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-social-card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-social-card&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SocialCardApp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The string “react-social-card” is used to define the &lt;code&gt;custom-element&lt;/code&gt; tag and renders the React app using: &lt;code&gt;&amp;amp;lt;App/&amp;gt;.&lt;/code&gt;It’s analogous to Russian dolls: &lt;code&gt;custom-element &amp;gt; React app &amp;gt; social card component &amp;gt; buttonbox component.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then, in the file &lt;code&gt;index.js&lt;/code&gt; import the custom-element and replace all the previous content with this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './custom-element/social-card-app';
```



Then, in the following `public/index.html` file, replace the body with this:




```html
&amp;lt;body&amp;gt;
 &amp;lt;noscript&amp;gt;You need to enable JavaScript to run this app.&amp;lt;/noscript&amp;gt;
 &amp;lt;react-social-card&amp;gt;&amp;lt;/react-social-card&amp;gt;
&amp;lt;/body&amp;gt;
```




Reload your browser and check the HTML content:



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pmajvoe2sxvzo4id2eoa.png) 


The `react-social-card` custom element is used and loads the React app content.

**Congratulations! You’ve just created your first micro frontend using React!**


## Resources:

The code above is available on GitHub: [https://github.com/avdev4j/react-social-card](https://github.com/avdev4j/react-social-card)

Watch micro frontend videos on our YouTube channel: [https://www.youtube.com/c/EntandoVideos](https://www.youtube.com/c/EntandoVideos)

Join us on Discord to share and learn about composable apps: [https://discord.gg/SdMCvyzzHm](https://discord.gg/SdMCvyzzHm)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>microfrontend</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is the Entando Hub?</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Thu, 16 Jun 2022 10:33:50 +0000</pubDate>
      <link>https://dev.to/entando/what-is-the-entando-hub-1ic</link>
      <guid>https://dev.to/entando/what-is-the-entando-hub-1ic</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/frHvMrK8Sig"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What do you imagine when someone says Hub?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;It's a center or place to hold a collection of things, or several kinds of things. And an &lt;strong&gt;Entando Hub&lt;/strong&gt; is a repository (local, remote, public, or private), that contains components. To be more specific, the App Builder, the UI of the Entando Platform, can connect to one or more Entando Hub.&lt;/p&gt;

&lt;p&gt;In my recent blog on Entando 7.0 release, I wrote a bit about the Entando Hub. You can check that out &lt;a href="https://dev.to/entando/whats-new-with-the-entando-70-release-3gfa"&gt;here&lt;/a&gt;. But, in this blog, I’ll give a technical overview of the Hub.&lt;/p&gt;

&lt;p&gt;Before I start, let’s find out &lt;strong&gt;&lt;em&gt;why&lt;/em&gt;&lt;/strong&gt; we needed a Hub. &lt;/p&gt;

&lt;p&gt;In the previous blogs, we learned about the 4Cs. If you don’t know about that,  you can take a look at this &lt;a href="https://dev.to/entando/part-1-what-is-entando-platform-cbb"&gt;blog&lt;/a&gt;. from the 4 essential roles of application composition, one thing is clear: the set of components built by creators are &lt;strong&gt;reusable&lt;/strong&gt; and &lt;strong&gt;absolutely flexible&lt;/strong&gt;. But, to make them easy to reuse, there was a need to create a Hub, where they could reside and be available to a larger audience. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now, the question is, what are some of the capabilities of the Hub?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Hub lets you share &lt;strong&gt;Single Components, Component Collections, Solution Templates,  Packaged Business Capabilities (PBCs)&lt;/strong&gt; that creators build. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkscccdkszxuj84ny0spb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkscccdkszxuj84ny0spb.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Single components are a building block for apps. It  can be a page template, content template, micro frontend, microservice, UX Fragment,content type…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68f7b4scd7k1wr2tasm1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68f7b4scd7k1wr2tasm1.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Component collections are a packaged set of single components. They are assembled components that are in some way functionally unrelated but useful to a Composer.  (e.g. a set of Page Templates, a set of content templates or content types + widgets + MFE or a mix of them)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60531iqnf1sawt482uyk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60531iqnf1sawt482uyk.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solution templates are a pre-packaged set of PBCs, component collections, and single components providing full-featured, domain-specific solutions. (eg: Task Tracker, Supplier Portal, Customer Portal, Partner Portal, E-commerce, …)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecs83jgovgcjychu6cvn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecs83jgovgcjychu6cvn.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And PBCs are encapsulated software components that represent a well-defined business capability, recognizable as such by a business user, and packaged for programmatic access. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfh9zoudvka3zvsu0eqf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfh9zoudvka3zvsu0eqf.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any and all of these can be assembled in the Hub, where new items and new versions are continuously made available. But to avoid errors or issues, we should follow some best practices.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The PBCs and/or components we build as a creator must be well sized. It shouldn’t either be too small or too big. It should be business-driven with a definite business value. There are several scenarios in this case. For example, a PBC can have many components which can make it large, or it can have fewer components, making the size smaller. But in this case, a Composer may need to install several items to get what they need. It is a tradeoff between functionality and ease of use. Hence, we must judge wisely, making sure the component isn’t too large or too small. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Our Components and PBCs should be easily configurable. By this I mean, we must avoid hard-coded stuff. It is preferable to use separate configuration files or database tables to  store any value that’s needed in your component.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is best to use a package manager as it can help us with the right dependency versioning strategy. A package manager helps us by updating all the packages and/or software frequently. These packages run tests to check security and other things. It also saves us a lot of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While we discuss these best practices, we must know that the Curator oversees the Hub, managing the components available there for the organization. Hence, the Curator should do a Security Analysis. They should perform a thorough analysis of the dependencies, security alert or code vulnerabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use code quality metrics to measure and determine if the code we have written for the PBC is of high quality. Certain variables are checked under this quality analysis, like code complexity, portability, reusability, etc. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And finally, we should add proper documentation for our PBC. It’s the first thing that provides clarity about our PBC. This documentation should be made in such a manner that it is well understood by both business and technical people. Also, it is a good coding practice!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, it’s time we take a look at the Hub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzu1kokn9p65nr892es1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzu1kokn9p65nr892es1h.png" alt="Image description" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you see here, there are many PBCs, Component Collections, Solution Templates, and Single Components under “Catalog”. After the Curator performs the validation checks, these building blocks made by Creators are published in the Hub.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How can we use the Hub?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This Hub can be used with Entando 7.0. This &lt;a href="https://developer.entando.com/v7.0/tutorials/solution/entando-hub.html#overview" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; can help us get started after installing the Hub on Entando 7.0. But in the upcoming blogs, I’ll definitely share how it can be installed in our App Builder. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Is the Hub open source?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Entando Hub is under the ​​&lt;a href="https://github.com/entando-samples/entando-hub/blob/main/LICENSE" rel="noopener noreferrer"&gt;LGPL-3.0&lt;/a&gt; license and is open source. We can easily contribute to it by referring to this &lt;a href="https://github.com/entando-samples/entando-hub" rel="noopener noreferrer"&gt;repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, before we wrap up, I’d like to explain the Entando Cloud Hub.&lt;/p&gt;

&lt;p&gt;The Entando Cloud Hub is a SaaS instance of an Entando Hub that contains a public and private collection of components. &lt;/p&gt;

&lt;p&gt;Well, that’s all about the Hub for now. We are in the process of creating more tutorials around the Hub and those will be released over the next few weeks. &lt;/p&gt;

&lt;p&gt;But, for now, I would love to see you all try out the Hub for yourselves and send in your feedback to the comment section below!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw572a10t4yyg3uwvmujt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw572a10t4yyg3uwvmujt.jpeg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, we at Entando are building an exciting community that spreads awareness of composability and modular applications. We call it the Modular Squad, and we’d love to invite you to &lt;a href="https://discord.gg/N64a3QMd9X" rel="noopener noreferrer"&gt;join us&lt;/a&gt; and be part of this journey!&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>entando</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>hub</category>
    </item>
    <item>
      <title>Using Angular to create a Micro Frontend</title>
      <dc:creator>Anthony Viard</dc:creator>
      <pubDate>Tue, 14 Jun 2022 12:10:59 +0000</pubDate>
      <link>https://dev.to/entando/using-angular-to-create-a-micro-frontend-5fci</link>
      <guid>https://dev.to/entando/using-angular-to-create-a-micro-frontend-5fci</guid>
      <description>&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This article has been written with the help of the ModSquad Community. The related live session is available here:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/EEmMI1dENoE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Web Components
&lt;/h2&gt;

&lt;p&gt;Web components are a set of technologies, a &lt;em&gt;meta- specification&lt;/em&gt;, with reusable isolated elements that make up a web application.&lt;/p&gt;

&lt;p&gt;Basically, Web Components need 4 specifications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom Elements:&lt;/strong&gt; A set of Javascript APIs to define the components and their behaviors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadow DOM:&lt;/strong&gt; A set of APIs to render the element into a dedicated and isolated DOM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML Templates:&lt;/strong&gt; Allows you to use &amp;lt;template&amp;gt; and &amp;lt;slot&amp;gt; tags to define a portion of HTML to reuse in which slots could be filled with variable content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ES Modules&lt;/strong&gt;: A specification to import and use Javascript Modules to create an agnostic modular approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Modern Javascript frameworks offer some solutions to easily create a web component, using a custom element, leveraging all the framework features, and creating small business-oriented apps. This is what we call micro frontends.&lt;/p&gt;

&lt;p&gt;Let’s see how to proceed using Angular and let’s see how to create our first micro frontend.&lt;/p&gt;

&lt;p&gt;To continue, you need to have installed &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;NodeJS&lt;/a&gt; (including npm) and the Angular CLI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @angular/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Initiate the Project
&lt;/h2&gt;

&lt;p&gt;Here we go. We are going to create our first web component using Angular. For this first exercise, let’s create a card to describe people in our community. We call it “social card”.&lt;/p&gt;

&lt;p&gt;With your favorite terminal, create a new Angular project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng new social-card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create an Angular Component
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add Angular material&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because we want to use the Angular Material library to create our component, we need to add it as a dependency on our project. During the installation, I select the default values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng add @angular/material
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create the Material Card Component&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From the example section of the Card component, I choose to implement the “Card with multiple sections” one. &lt;a href="https://material.angular.io/components/card/examples" rel="noopener noreferrer"&gt;https://material.angular.io/components/card/examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, I create a new Angular component. Please note “components” here refer to the &lt;a href="https://angular.io/api/core/Component" rel="noopener noreferrer"&gt;Angular Component&lt;/a&gt;, not Web Components defined in the introduction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng generate component card
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Angular CLI automatically creates all the needed files and updates the different files to make the application work out of the box.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;src/app/card/&lt;/code&gt; folder, open the HTML file and copy the following code into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;mat-card&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"example-card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;mat-card-header&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;mat-card-avatar&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"example-header-image"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;mat-card-title&amp;gt;&lt;/span&gt;John Doe&lt;span class="nt"&gt;&amp;lt;/mat-card-title&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;mat-card-subtitle&amp;gt;&lt;/span&gt;Dev Adcovate&lt;span class="nt"&gt;&amp;lt;/mat-card-subtitle&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/mat-card-header&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;mat-card-image&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://material.angular.io/assets/img/examples/shiba2.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Photo of a Shiba Inu"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;mat-card-content&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
       The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
       A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
       bred for hunting.
     &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/mat-card-content&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;mat-card-actions&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;mat-button&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;LIKE&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;mat-button&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;SHARE&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/mat-card-actions&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/mat-card&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, open the CSS file and copy the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.example-card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="nc"&gt;.example-header-image&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('https://material.angular.io/assets/img/examples/shiba1.jpg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import Angular Material Modules in your App Module&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then, open the &lt;code&gt;src/app/app.module.ts&lt;/code&gt; to import the &lt;code&gt;MatCardModule&lt;/code&gt; and the &lt;code&gt;MatButtonModule&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;MatCardModule&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/material/card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;MatButtonModule&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/material/button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
 &lt;span class="nx"&gt;MatCardModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nx"&gt;MatButtonModule&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run your application&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Edit the &lt;code&gt;app.component.html&lt;/code&gt; file from the &lt;code&gt;src/app&lt;/code&gt; folder and replace the existing with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;app-card&amp;gt;&amp;lt;/app-card&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can start your application by running the following command at the project root level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnki33auo9odg6zwgex3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnki33auo9odg6zwgex3g.png" alt="Image description" width="642" height="615"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;So far, so good, but the following application is not yet a Web Component and we need to make some changes to transform it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transform the Application into a Web Component
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add Angular elements dependency&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Angular elements is the name in the Angular ecosystem for custom elements. This dependency allows us to easily create a custom element from our existing application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng add @angular/elements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Update the app.module.ts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From the &lt;code&gt;src/app/app.module.ts&lt;/code&gt; file, update the constructor, call the &lt;code&gt;createCustomElement()&lt;/code&gt; method, and define the custom element tag, &lt;code&gt;ng-social-card&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;createCustomElement&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/elements&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppModule&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nx"&gt;injector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Injector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createCustomElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;injector&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
   &lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ng-social-card&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="nf"&gt;ngDoBootstrap&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove the AppComponent in the &lt;code&gt;bootstrap&lt;/code&gt; array. we don’t need it anymore and it could generate errors in the console log.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Update the index.html&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open the src/.html file and change the content to use the custom-element instead of the initial value. \&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;ng-social-card&amp;gt;&amp;lt;/ng-social-card&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have now instantiated the application, using a custom element instead of the regular app-root tag.&lt;/p&gt;

&lt;p&gt;Start the application again using &lt;code&gt;ng serve&lt;/code&gt; and check that the application is still working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build and Run Your Web Component
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Build it!
&lt;/h3&gt;

&lt;p&gt;To build your component you have to run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feng0ryjvwh0yjpr73pvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feng0ryjvwh0yjpr73pvs.png" alt="Image description" width="800" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;dist&lt;/code&gt; folder is now created containing an HTML file and all the Javascript and CSS files.&lt;/p&gt;

&lt;p&gt;If you open the &lt;code&gt;index.html&lt;/code&gt;, you can see it contains the custom elements previously defined.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;NgSocialCard&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;ng-social-card&amp;gt;&amp;lt;/ng-social-card&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"runtime.6ef72ee47cb5bc7a.js"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"polyfills.41cc36d27639541d.js"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"main.8609c098aeba9ec8.js"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run it!
&lt;/h3&gt;

&lt;p&gt;To run it, you can install serve through npm to start a lightweight web server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And from the dist/ng-social-card folder, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94sppuvovadrvqo2huxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94sppuvovadrvqo2huxh.png" alt="Image description" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fik0xcy8zkzsvf462m5vt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fik0xcy8zkzsvf462m5vt.png" alt="Image description" width="449" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations! You’ve just created your first micro frontend using Angular.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;All the code is available at the repository: &lt;a href="https://github.com/avdev4j/ng-social-card" rel="noopener noreferrer"&gt;https://github.com/avdev4j/ng-social-card&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Find more micro frontends videos on our YouTube channel: &lt;a href="https://www.youtube.com/c/EntandoVideos" rel="noopener noreferrer"&gt;https://www.youtube.com/c/EntandoVideos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Join us on Discord to share and learn about Composable apps: &lt;a href="https://discord.gg/SdMCvyzzHm" rel="noopener noreferrer"&gt;https://discord.gg/SdMCvyzzHm&lt;/a&gt;&lt;/p&gt;

</description>
      <category>microfrontend</category>
      <category>angular</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Part 2: Building the statistics micro frontend using React and Tailwind</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Fri, 03 Jun 2022 07:39:36 +0000</pubDate>
      <link>https://dev.to/entando/part-2-building-the-statistics-micro-frontend-using-react-and-tailwind-3pmp</link>
      <guid>https://dev.to/entando/part-2-building-the-statistics-micro-frontend-using-react-and-tailwind-3pmp</guid>
      <description>&lt;p&gt;In the previous part of this blog series, we set up our React micro frontend, made it ready for bundling, and installed and set up Tailwind. In this blog, we will do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write code to create our stats component. &lt;/li&gt;
&lt;li&gt;Build the React app.&lt;/li&gt;
&lt;li&gt;Wrap our micro frontend inside a custom UI element. (If you’re curious about it, you can check out this &lt;a href="https://developer.entando.com/v6.3.2/tutorials/create/mfe/react.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; till the time the blog is Live.)&lt;/li&gt;
&lt;li&gt;Prepare our project directory for the Ent cli to bundle it.&lt;/li&gt;
&lt;li&gt;Build, Push and Deploy the bundle to the Entando Component Repository (ECR)&lt;/li&gt;
&lt;li&gt;Drag and drop the stats widget on a page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We begin by navigating to our &lt;code&gt;stats-widget&lt;/code&gt; directory. &lt;/p&gt;

&lt;p&gt;Here we’ll write a few lines of code to build our stats widget. We create a new file inside &lt;code&gt;src&lt;/code&gt; and name it &lt;code&gt;stats.js&lt;/code&gt;. Then add the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Stats() {
 return (
   &amp;lt;div class="bg-gray-50 pt-12 sm:pt-16"&amp;gt;
     &amp;lt;div class="mt-10 pb-12 bg-white sm:pb-16"&amp;gt;
       &amp;lt;div class="relative"&amp;gt;
         &amp;lt;div class="absolute inset-0 h-1/2 bg-gray-50"&amp;gt;&amp;lt;/div&amp;gt;
         &amp;lt;div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"&amp;gt;
           &amp;lt;div class="max-w-4xl mx-auto"&amp;gt;
             &amp;lt;dl class="rounded-lg bg-white shadow-lg sm:grid sm:grid-cols-3"&amp;gt;
               &amp;lt;div class="flex flex-col border-b border-gray-100 p-6 text-center sm:border-0 sm:border-r"&amp;gt;
                 &amp;lt;dt class="order-2 mt-2 text-lg leading-6 font-medium text-gray-500"&amp;gt;
                   Original
                 &amp;lt;/dt&amp;gt;
                 &amp;lt;dd class="order-1 text-5xl font-extrabold text-green-600"&amp;gt;
                   100%
                 &amp;lt;/dd&amp;gt;
               &amp;lt;/div&amp;gt;
               &amp;lt;div class="flex flex-col border-t border-b border-gray-100 p-6 text-center sm:border-0 sm:border-l sm:border-r"&amp;gt;
                 &amp;lt;dt class="order-2 mt-2 text-lg leading-6 font-medium text-gray-500"&amp;gt;
                   Service
                 &amp;lt;/dt&amp;gt;
                 &amp;lt;dd class="order-1 text-5xl font-extrabold text-green-600"&amp;gt;
                   24/7
                 &amp;lt;/dd&amp;gt;
               &amp;lt;/div&amp;gt;
               &amp;lt;div class="flex flex-col border-t border-gray-100 p-6 text-center sm:border-0 sm:border-l"&amp;gt;
                 &amp;lt;dt class="order-2 mt-2 text-lg leading-6 font-medium text-gray-500"&amp;gt;
                   86%
                 &amp;lt;/dt&amp;gt;
                 &amp;lt;dd class="order-1 text-5xl font-extrabold text-green-600"&amp;gt;
                   Users
                 &amp;lt;/dd&amp;gt;
               &amp;lt;/div&amp;gt;
             &amp;lt;/dl&amp;gt;
           &amp;lt;/div&amp;gt;
         &amp;lt;/div&amp;gt;
       &amp;lt;/div&amp;gt;
     &amp;lt;/div&amp;gt;
   &amp;lt;/div&amp;gt;
 );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in our &lt;code&gt;app.js&lt;/code&gt; file, we replace the existing content with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Statistics from "./stats";
function App() {
 return (
   &amp;lt;div&amp;gt;
     &amp;lt;Statistics /&amp;gt;
   &amp;lt;/div&amp;gt;
 );
}
export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have created our application, we need to wrap the entire React app into a custom element. We do this by adding a new file &lt;code&gt;src/WidgetElement.js&lt;/code&gt; with the following custom element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import ReactDOM from "react-dom";
import App from "./App";

class WidgetElement extends HTMLElement {
 connectedCallback() {
   this.mountPoint = document.createElement("div");
   this.appendChild(this.mountPoint);
   ReactDOM.render(&amp;lt;App /&amp;gt;, this.mountPoint);
 }
}

customElements.define("stats-widget", WidgetElement);

export default WidgetElement;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, open &lt;code&gt;src/index.js&lt;/code&gt; and replace the entire file with these two lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './index.css';
import './WidgetElement';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, we go to &lt;code&gt;public/index.html&lt;/code&gt; and replace &lt;code&gt;&amp;lt;div id="root"&amp;gt;&amp;lt;/&lt;strong&gt;div&lt;/strong&gt;&amp;gt;&lt;/code&gt; with the custom element &lt;code&gt;&amp;lt;stats-widget /&amp;gt;&lt;/code&gt;:&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;body&amp;gt;
     &amp;lt;noscript&amp;gt;You need to enable JavaScript to run this app.&amp;lt;/noscript&amp;gt;
     &amp;lt;stats-widget /&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect! Now,we need to build our React app before we build the entire bundle. Let’s take a look at our Tailwind dashboard:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqb0gin5cytvoa1eczmpa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqb0gin5cytvoa1eczmpa.png" alt="Image description" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We build the app using this command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm run build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bag2ar8nwqtcda0ppno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bag2ar8nwqtcda0ppno.png" alt="Image description" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it’s time we deploy this widget to our Entando Component Repository, which is accessed from the dashboard of our Entando App Builder. This requires a couple of steps.  &lt;/p&gt;

&lt;p&gt;First, we need to set up the project directory. We do this from our terminal by running the following commands from the root directory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prepare the bundle directory: &lt;code&gt;cp -r bundle_src bundle&lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here, the &lt;code&gt;descriptor.yaml&lt;/code&gt; file gets copied to the bundle folder, where all our static resources will be created when we build the bundle. In a sense, we are preparing the bundle folder. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize the project: &lt;code&gt;ent prj init&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Initialize publication: &lt;code&gt;ent prj pbs-init&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We need to push our bundled code to an empty GitHub repository and link that here:  &lt;/p&gt;

&lt;p&gt;This repository should be named something like &lt;code&gt;statistics-bundle&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qt7r8x7k07gkc8b9agy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qt7r8x7k07gkc8b9agy.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we publish the bundle to the Entando App Builder:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build: &lt;code&gt;ent prj fe-build -a&lt;/code&gt; (to just build the frontend, including changes from &lt;code&gt;bundle_src&lt;/code&gt;) &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvcxoymk9y0dj3zxx4qb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvcxoymk9y0dj3zxx4qb.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Publish: &lt;code&gt;ent prj fe-push&lt;/code&gt; (publish just the frontend) &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fboicj8e49orwju1g0jan.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fboicj8e49orwju1g0jan.png" alt="Image description" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Deploy (after connecting to k8s above): &lt;code&gt;ent prj deploy&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point, we are pushing everything to the Entando Component Repository.&lt;/p&gt;

&lt;p&gt;That’s all. Congratulations! You just built the stats micro frontend, bundled it and deployed it.&lt;/p&gt;

&lt;p&gt;Now it’s time we compose the application from the Entando Component Repository.&lt;/p&gt;

&lt;p&gt;First, we login to our Entando App Builder:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvjln8kc6szd93sf4851.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvjln8kc6szd93sf4851.png" alt="Image description" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which takes us to our dashboard. From there, we click on “Repository” on the bottom left side of the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ufhaavj7017q2beie73.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ufhaavj7017q2beie73.png" alt="Image description" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see our statistics bundle here. We click on install to install it. &lt;/p&gt;

&lt;p&gt;Next, we go to “Pages” in the left sidebar and click on “Management” to see a list of pages. Here, we can create a simple page by clicking on the three dots next to a folder. We need to click on “Add” to create a new page. Make sure to fill all the sections with an asterisk just as I have done. Take a look at this screenshot to follow along. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04k16zufbetgy74zmqp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04k16zufbetgy74zmqp1.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After this, go to the bottom of this page to click on “Save and Design”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1j5tjlsy1icr4qb7ezif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1j5tjlsy1icr4qb7ezif.png" alt="Image description" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under “Users” we see a list of widgets on the right sidebar. We drag and drop the “Sample Stats Dashboard Template” to any part of our page frame and click “Publish.” Finally, we click on “View Published Page.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs8wjqd9p5llbve4whdxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs8wjqd9p5llbve4whdxv.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations again! You did it!&lt;/p&gt;

&lt;p&gt;Let’s wrap up here. To summarize, we learned how to use Tailwind CSS in a React App. We created our app, deployed it to the Entando Component Repository, and used it on one of our pages. Soon, this will be the way developers build and work on applications. Here is the &lt;a href="https://github.com/rimmi21/statistics" rel="noopener noreferrer"&gt;bundle source code&lt;/a&gt; for your reference. &lt;/p&gt;

&lt;p&gt;If you found this interesting, don’t forget to like this blog and share it with your network! We are building a community that welcomes a composable approach to building applications. You can join us on our &lt;a href="https://discord.gg/N64a3QMd9X" rel="noopener noreferrer"&gt;Discord server&lt;/a&gt; to learn more about it. Thank you!&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>react</category>
      <category>beginners</category>
      <category>microfrontend</category>
    </item>
    <item>
      <title>Do you think Composable?</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Tue, 24 May 2022 20:13:54 +0000</pubDate>
      <link>https://dev.to/entando/do-you-think-composable-mg5</link>
      <guid>https://dev.to/entando/do-you-think-composable-mg5</guid>
      <description>&lt;p&gt;What is the first thing you imagine when you hear “composable”?  &lt;/p&gt;

&lt;p&gt;I think it is something that can be easily modified, built, configured, and integrated. What are your thoughts on this? (Let me know in the comments below!)&lt;/p&gt;

&lt;p&gt;Enterprises aiming to be more adaptive to their customer needs while staying resilient wish to be composable!&lt;/p&gt;

&lt;p&gt;The question is, are you someone who believes in the simplification of design modules  and leveraging modules from other resources? That to quickly adapt you should be able to seamlessly swap those same modules in and out? Are you someone who is open to innovation and exploring new capabilities? Do you believe in cost reduction (for instance, with reusable modules)?&lt;/p&gt;

&lt;p&gt;If you answered “yes” to any of the above, then building applications in a composable way is the solution for you! &lt;/p&gt;

&lt;p&gt;But how do you begin “thinking composable”?&lt;/p&gt;

&lt;p&gt;It isn’t hard! You can start by focusing on which parts of your enterprise change quickly and frequently, such as customer/marketing segments or products, as they are most likely to benefit from composability. &lt;/p&gt;

&lt;p&gt;This is not going to happen overnight. It takes time to understand and adapt to composability, but gradually it becomes useful&lt;/p&gt;

&lt;p&gt;First we need to understand the advantages of composability and how to “think composable” in a constructive way. But then how and where can we experiment with our composable thoughts?&lt;/p&gt;

&lt;p&gt;I’ve got an answer for that, too! Entando has built an Application Composition Platform (ACP) that you and your organization can use to experiment with the idea of composability. You can start building composable applications with the Entando ACP. &lt;/p&gt;

&lt;p&gt;Entando’s mission is to standardize and orchestrate the composable approach and the composition process. It is the leading open-source Application Composition Platform for building cloud-native, composable applications on top of Kubernetes.&lt;/p&gt;

&lt;p&gt;To give you a little more insight, the ACP is a set of technologies that enables teams to build, deploy, run and manage applications developed by composing and integrating components and business capabilities. &lt;/p&gt;

&lt;p&gt;If this interests you, here is a series of &lt;a href="https://dev.to/entando/part-1-what-is-entando-platform-cbb"&gt;blogs&lt;/a&gt; and video tutorials to help you get started.&lt;/p&gt;

&lt;p&gt;We at Entando are also working to build a community to create awareness about composable applications. If you’d like to learn along with us and contribute to our community, then Modular Squad is the perfect place for you! This is our &lt;a href="https://discord.gg/N64a3QMd9X" rel="noopener noreferrer"&gt;Discord Link&lt;/a&gt;. Come join us, and let’s build a composable future!&lt;/p&gt;

</description>
      <category>composable</category>
      <category>beginners</category>
      <category>k8s</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why is Technical Blogging so important?</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Wed, 18 May 2022 07:11:31 +0000</pubDate>
      <link>https://dev.to/entando/why-is-technical-blogging-so-important-291a</link>
      <guid>https://dev.to/entando/why-is-technical-blogging-so-important-291a</guid>
      <description>&lt;p&gt;All the learning that we gather together defines our knowledge. And when we put this knowledge into writing, by providing direction, instruction, explanation, and empathy, we call it Technical Blogging.&lt;/p&gt;

&lt;p&gt;But, why do we have to do this? &lt;/p&gt;

&lt;p&gt;If we look at it from our own perspective, it’s really helpful for us to grow as an individual. Because documenting our learning process for a particular subject, in one place, in a complete manner is, first of all, self-help! There are two benefits in it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our storytelling capability develops and improves with time.&lt;/li&gt;
&lt;li&gt;When we need to work on that particular subject even after 5 years the blog written by us helps us stay up to date on the subject.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What, apart from these?&lt;/p&gt;

&lt;p&gt;If you are someone who wishes to be around a technical community or a network of people, technical blogging is so your thing!&lt;/p&gt;

&lt;p&gt;One technical blog can help many learn and grow, just as you grow personally. After all, we look for blogs when we try to learn something new. So, we can definitely be one of those bloggers whose writings are read by others as they try to learn something new.&lt;/p&gt;

&lt;p&gt;But what if you suffer from imposter syndrome? &lt;/p&gt;

&lt;p&gt;&lt;em&gt;“What if I am not proficient enough to write a blog? What if I don’t have the skills to do it? What if I am not knowledgeable enough?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Well, you don’t need to be a pro in order to write a blog. If you’re a very keen learner, you can always use your learnings to start writing blogs. &lt;/p&gt;

&lt;p&gt;And whatever we learn is our knowledge. Hence, each one of us is absolutely eligible for writing technical blogs.&lt;/p&gt;

&lt;p&gt;Let’s explore a few things we can use as best practices while writing blogs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always define key points before starting a blog. (It can be a goal statement too)&lt;/li&gt;
&lt;li&gt;Dedicate each paragraph to a particular topic/area&lt;/li&gt;
&lt;li&gt;Make sure you are writing with your target audience in mind&lt;/li&gt;
&lt;li&gt;Create engaging sentences at the beginning of each paragraph to develop interest&lt;/li&gt;
&lt;li&gt;Break lengthy sentences into shorter ones&lt;/li&gt;
&lt;li&gt;Break up big  ideas into smaller sections, with short paragraphs&lt;/li&gt;
&lt;li&gt;Use bullet points to explain agendas/steps&lt;/li&gt;
&lt;li&gt;when working with an in-depth technical subject, use flow diagrams to explain processes&lt;/li&gt;
&lt;li&gt;Be empathetic while you write. Express how you feel; don't be afraid to show your emotions in the writing. This will keep it from sounding like a dry step-by-step manual.&lt;/li&gt;
&lt;li&gt;Use a tool to check spelling mistakes, nouns, pronouns, adjectives and etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the steps I try to follow when I am writing blogs. The best thing about writing blogs continuously is that your writing improves every time. And that is learning too.&lt;/p&gt;

&lt;p&gt;To wrap up, It is not really hard to write a technical blog. The very first thing you really need to do is get started. And slowly the quality of your writing and content will improve over time. Believe in your capabilities and write everything you can to explain your content at its best! The blogs you write can help many other people while satisfying your own curiosity/learning goals. It is mutually beneficial, for you and the audience you’re writing the blog for.&lt;/p&gt;

&lt;p&gt;That’s all for this blog. I hope this was useful for you. Please feel free to drop your thoughts in the comment section below. &lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>technical</category>
      <category>blogging</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What’s new with the Entando 7.0 Release?</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Wed, 27 Apr 2022 04:24:08 +0000</pubDate>
      <link>https://dev.to/entando/whats-new-with-the-entando-70-release-3gfa</link>
      <guid>https://dev.to/entando/whats-new-with-the-entando-70-release-3gfa</guid>
      <description>&lt;p&gt;Entando is all set with its new release! Would you like to learn more about it? If yes, then this blog would give you a perfect sneak peak of everything we released with version 7.0.&lt;/p&gt;

&lt;p&gt;Entando 7 lets us build a composable business model using composable applications. Composable business allows enterprises to rapidly adapt to market shifts and opportunities by allowing rapid recomposition of services and products.  Composable applications enable composable business by allowing the applications and infrastructure required to support the business to change quickly, at low cost, and at greatly reduced risk.&lt;/p&gt;

&lt;p&gt;Apart from this, the new Hub supports code reuse for major enterprises and SI partners. It also aligns pro-code development with low-code composition. The question here is, do you really know what the Entando Hub is?&lt;/p&gt;

&lt;p&gt;The Entando Hub enables a team to share components across Entando Applications. The Hub allows users to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Centralize components and business capabilities for use across teams, groups, or clients&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Publish, manage and communicate component features, versions and metadata&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perform business-level assessment of component readiness&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzwvewkrx5xmbllrezaw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzwvewkrx5xmbllrezaw8.png" alt="Image description" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The new Entando Hub provides a repository for application modules.  Modules can be individual application components, collections of components called Packaged Business Capabilities (PBCs), or complete solutions or solution templates. The hub provides a simple interface, or marketplace, to store modules and make them discoverable across multiple development teams and applications.  The hub works in conjunction with Git allowing development teams to work in the same way as they do today, but adding a web interface to simplify the interaction between creators of pro-code modules, and application composers assembling applications from the hub.  The hub also enables module curators a location to enforce IT governance. The hub is available to developers, enterprises, and solution providers as a SaaS or for private installation on prem on in the cloud. &lt;/p&gt;

&lt;p&gt;Our partner program is helping System Integrators (SIs) develop new customers and new revenue streams for customers adopting composable applications on kubernetes. If you are interested in learning more about our Partner Program, drop us a line at &amp;lt;&lt;a href="//mailto:partner@entando.com"&gt;partner@entando.com&lt;/a&gt;&amp;gt;.&lt;/p&gt;

&lt;p&gt;Now, let’s also take a look at the Entando Component Generator (ECG). The ECG is a Jhipster blueprint that generates Entando compatible Java applications and micro frontends. With the new release of Entando 7, the ECG has now been upgraded to use Jhipster 7.2! &lt;/p&gt;

&lt;p&gt;The Entando CLI has also been improved. The ent CLI provides a set of commands that accelerate the developer experience by assisting the developer with common tasks such as quickly installing a new copy of Entando, generating an Entando project via JHipster, deploying an Entando Bundle, etc. To learn more about the fixes and changes take a look at our &lt;a href="https://developer.entando.com/v7.0/docs/releases/" rel="noopener noreferrer"&gt;release notes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many interesting features right? Well, if you’re pretty new here, why don’t you get started? You can get started through our &lt;a href="https://developer.entando.com/v7.0/docs/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;While we are doing all these amazing things, we are also building a community that deeply focuses on Composability and Modularity. The goal of this community is to grow an awareness and culture about composable applications. And none of this would be possible without your support, love and contribution. If you are really interested to learn more and get started with us, join our &lt;a href="https://discord.gg/N64a3QMd9X" rel="noopener noreferrer"&gt;discord server&lt;/a&gt; and drop us a hi!&lt;/p&gt;

&lt;p&gt;Do let us know your feedback on Entando 7.0! &lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>release</category>
      <category>entando</category>
      <category>official</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Part 1: Installing and setting up React and Tailwind</title>
      <dc:creator>Sohini Pattanayak</dc:creator>
      <pubDate>Wed, 13 Apr 2022 09:14:56 +0000</pubDate>
      <link>https://dev.to/entando/part-1-installing-and-setting-up-react-and-tailwind-m4o</link>
      <guid>https://dev.to/entando/part-1-installing-and-setting-up-react-and-tailwind-m4o</guid>
      <description>&lt;p&gt;In this blog series, we’ll build a micro frontend using React and Tailwind CSS. We’ll break the series into two parts. This being the first part, we’ll set up our React project here, and install Tailwind step by step. In the second part of this blog, we will write code to build our stats micro frontend. And later we will bundle, publish, deploy and use it from the Entando Component Repository (ECR) on a page, newly created by us. Just in case we don’t all know what a micro frontend is, here’s a little explanation.  &lt;/p&gt;

&lt;p&gt;Imagine an UI or a website, and what do you see? A big frontend, right? Well, this particular frontend application can be split up into several smaller pieces of a frontend we call micro frontends. We can deploy and manage each of them independently. We can use a variety of libraries and frameworks like React or Angular, etc., to build these micro frontends on a single page. Now the question is, how do we do this?&lt;/p&gt;

&lt;p&gt;Before we get started, I’m assuming you’re familiar with what a bundle is. In case you’re pretty new to this, you can check out this &lt;a href="https://dev.to/entando/part-3-building-a-simple-application-using-the-entando-acp-44ah"&gt;blog&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;To begin, we refer to this &lt;a href="https://github.com/entando-samples/ent-project-template-react" rel="noopener noreferrer"&gt;template&lt;/a&gt;. This is a simple React template that has all the files that we need to bundle and deploy our code. All you have to do is clone it on your local machine and open it in your favorite code editor!&lt;/p&gt;

&lt;p&gt;For the next part, we need to navigate inside &lt;code&gt;cd ui/widgets/widgets-dir&lt;/code&gt; and create our React app. Let’s name it &lt;code&gt;stats-widget&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We run this command to create our react app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app stats-widget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once it’s created, we go inside it with &lt;code&gt;cd stats-widget,&lt;/code&gt; and run &lt;code&gt;npm start&lt;/code&gt; to check if the app was successfully created.&lt;/p&gt;

&lt;p&gt;Now, before we install Tailwind we need to make sure our project is ready for Entando bundling. For that we create a &lt;code&gt;bundle&lt;/code&gt; folder inside the &lt;code&gt;stats-widget&lt;/code&gt; folder and create two files. The first one is &lt;code&gt;stats-descriptor.yaml&lt;/code&gt; and the second is &lt;code&gt;stats.ftl&lt;/code&gt;. This descriptor file contains some context about our widget and is also used to point to the ftl file. And the ftl file is a FreeMarker template used to render the final HTML code. It defines the "viewed" part while the descriptor defines the definition from a bundle point of view.&lt;/p&gt;

&lt;p&gt;To get going, paste this code inside your &lt;code&gt;stats-descriptor.yaml&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code: stats-widget
titles:
 en: Sample Stats Template
 it: Sample Stats Template
group: free
customUiPath: stats.ftl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And, paste this code inside the &lt;code&gt;stats.ftl&lt;/code&gt; file.&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;#assign wp=JspTaglibs["/aps-core"]&amp;gt;
&amp;lt;#-- entando_resource_injection_point --&amp;gt;
&amp;lt;#-- Don't add anything above this line. The build scripts will automatically link the compiled JS and CSS for you and add them above this line so that the widget can be loaded--&amp;gt;

&amp;lt;@wp.info key="currentLang" var="currentLangVar" /&amp;gt;
&amp;lt;stats-widget locale="${currentLangVar}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cool. We are now done setting up our bundle folder. But we still need to update the bundle_src folder that’s present inside the root directory of our project. Hence, we go back to the root directory and go inside our bundle_src folder. We open the descriptor.yaml file and update the code by replacing the name of our React app and widget descriptor. It should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code: tailwind-demo
description: Template for Tailwind Components
components:
 widgets:
   - ui/widgets/widgets-dir/stats-widget/stats-descriptor.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect, now we are a 100% done with setting up all the bundle folders.  At this point, our project structure should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpbh304vrchlj0vd2vh2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpbh304vrchlj0vd2vh2.png" alt="Image description" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can absolutely begin with installing Tailwind on our React app. So, let’s navigate to our React app’s directory &lt;code&gt;cd ui/widgets/widgets-dir/stats-widget&lt;/code&gt;. Now, I have a question: Have you ever wondered why we use Tailwind?&lt;/p&gt;

&lt;p&gt;Tailwind is a utility-first CSS framework that is packed with many classes which are easy to use in our HTML tags. These utility classes are named as per their function so that even a beginner can understand what a particular CSS class defines. The best part about Tailwind CSS is that it’s highly customizable! Plus, we don’t need to spend hours writing CSS chunks, as Tailwind makes them easier. Visit the &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind CSS website&lt;/a&gt; to learn more.&lt;/p&gt;

&lt;p&gt;Let’s get started with the installation.&lt;/p&gt;

&lt;p&gt;First, we enter the &lt;code&gt;stats-widget&lt;/code&gt; folder, e.g.  &lt;code&gt;cd ui/widgets/widgets-dir/stats-widget&lt;/code&gt; from the root directory. We then install Tailwind from our terminal with the next few commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Tailwind CSS, Post CSS and Autoprefixer:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install CRACO. React doesn’t allow us to override Post CSS configuration by default, but we can use CRACO to configure Tailwind.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @craco/craco
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a config file for CRACO:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch craco.config.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add the configurations below :
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  style: {
    postcssOptions: {
      plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
      ],
    },
  },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;To tell our app to use CRACO, we configure our &lt;code&gt;package.json&lt;/code&gt; file, and replace everything under &lt;code&gt;scripts&lt;/code&gt; with the following:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "start": "craco start",
    "build": "craco build",
    "test": "craco test",
    "eject": "react-scripts eject"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create the Tailwind configuration file, using the &lt;code&gt;--full&lt;/code&gt; tag to generate all the default configurations.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx tailwindcss init --full
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the &lt;code&gt;--full&lt;/code&gt; tag is optional. It involves a huge configuration you might not want to deal with. &lt;/p&gt;

&lt;p&gt;Please do not forget to replace the existing &lt;code&gt;purge[]&lt;/code&gt; entity (under &lt;code&gt;module.exports&lt;/code&gt; ) with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Go to the &lt;code&gt;src&lt;/code&gt; folder and replace the contents of the existing &lt;code&gt;index.css&lt;/code&gt; file with the following:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind base;

@tailwind components;

@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;index.css&lt;/code&gt; file consists of all the Tailwind base styles. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Exit the &lt;code&gt;src&lt;/code&gt; folder and open the &lt;code&gt;package.json&lt;/code&gt; file to configure our app to use CRACO to build our styles every time we run our app using &lt;code&gt;npm start&lt;/code&gt; or &lt;code&gt;npm build&lt;/code&gt;. To do this, we insert the following syntax under the &lt;code&gt;scripts&lt;/code&gt; section of the &lt;code&gt;package.json&lt;/code&gt; file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"build:style": "tailwind build src/styles/index.css -o src/styles/tailwind.css",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import Tailwind CSS base styles to our &lt;code&gt;index.js&lt;/code&gt; file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './index.css';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Delete the &lt;code&gt;app.css&lt;/code&gt; file and change our &lt;code&gt;app.js&lt;/code&gt; file to this:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
 return &amp;lt;div&amp;gt;Hi there!&amp;lt;/div&amp;gt;;
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;We have completed the Tailwind installation and configuration. We can test our React app by generating a page that says, “Hi there”. If it runs, then perfect. We are all set! &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Attention!&lt;/p&gt;

&lt;p&gt;If we get an error about PostCSS versioning or Autoprefixer versioning, we can use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm uninstall tailwindcss
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have now installed Tailwind correctly!! &lt;/p&gt;

&lt;p&gt;Well, that’s all for this blog. In the next blog of this series, we will do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write code to create our stats component. &lt;/li&gt;
&lt;li&gt;Build the React app.&lt;/li&gt;
&lt;li&gt;Wrap our micro frontend inside a custom UI element. (If you’re curious about it, you can check out this &lt;a href="https://developer.entando.com/v6.3.2/tutorials/create/mfe/react.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; till the time the blog is Live.)&lt;/li&gt;
&lt;li&gt;Prepare our project directory for the ENT cli to bundle it.&lt;/li&gt;
&lt;li&gt;Build, Push and Deploy the bundle to the Entando Component Repository (ECR).&lt;/li&gt;
&lt;li&gt;Drag and drop the stats widget on a page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope that’s really exciting! Meanwhile, you’re here so I’d like to mention, we at Entando are building a community to spread awareness of Composable and Modular applications. There is a lot more we are trying to do with our community. If you feel like engaging or contributing to our community, please join our &lt;a href="https://discord.gg/996XbMk2" rel="noopener noreferrer"&gt;Discord Server&lt;/a&gt;, and let’s learn together! See you in the next blog. Thank you.&lt;/p&gt;

</description>
      <category>react</category>
      <category>tailwindcss</category>
      <category>beginners</category>
      <category>microfrontend</category>
    </item>
  </channel>
</rss>
