<?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: Gabriel Mayta</title>
    <description>The latest articles on DEV Community by Gabriel Mayta (@grandemayta).</description>
    <link>https://dev.to/grandemayta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F109545%2F86627ec2-a70c-4139-a8d1-83acd9422a3d.png</url>
      <title>DEV Community: Gabriel Mayta</title>
      <link>https://dev.to/grandemayta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/grandemayta"/>
    <language>en</language>
    <item>
      <title>Googlebot now supports latest Javascript features</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Sat, 18 May 2019 10:24:18 +0000</pubDate>
      <link>https://dev.to/grandemayta/googlebot-now-supports-latest-javascript-features-43e0</link>
      <guid>https://dev.to/grandemayta/googlebot-now-supports-latest-javascript-features-43e0</guid>
      <description>&lt;p&gt;Google announced at Google IO 2019 that Googlebot now supports the latest Javascript features. This is an important improvement for Frontend Developers.&lt;/p&gt;

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

&lt;p&gt;This means that now we can develop Single Page Applications or use the latest browsers features like ES6, WebComponents, IntersectionObserver an so on.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--SGzPT-c2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/378800000808710206/2dbdaa1cb7b0db02f997aea5b40f29b8_normal.jpeg" alt="Justin Fagnani profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Justin Fagnani
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/justinfagnani"&gt;@justinfagnani&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Googlebot now supports:&lt;br&gt;&lt;br&gt;🧩 JS Modules&lt;br&gt;🧱 Custom Elements&lt;br&gt;🌚 Shadow DOM&lt;br&gt;🏫 Classes&lt;br&gt;🏷 Tagged Template Literals&lt;br&gt;&lt;br&gt;IOW, it's ready for indexing super-modern web sites without compiling to ES5 or SSR! 🎉 &lt;a href="https://t.co/9N2VYCvDSc"&gt;twitter.com/googlewmc/stat…&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      00:39 AM - 08 May 2019
    &lt;/div&gt;

      &lt;div class="ltag__twitter-tweet__quote"&gt;
        &lt;div class="ltag__twitter-tweet__quote__header"&gt;
          &lt;span class="ltag__twitter-tweet__quote__header__name"&gt;
            Google Webmasters
          &lt;/span&gt;
          @googlewmc
        &lt;/div&gt;
        🤖 Meet the new evergreen Googlebot! 🤖

We've listened to your questions and feedback and brought modern Chromium to Googlebot - read more at our blog 👉https://t.co/nufYWOozBd
      &lt;/div&gt;

    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1125923222417920000" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1125923222417920000" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      232
      &lt;a href="https://twitter.com/intent/like?tweet_id=1125923222417920000" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      515
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;There are some limitations, for example if you are using babel for transpiling your Javascript code, you should evaluate if it's necessary. Major Browsers supports many ES6 features like fetch, promise, classes, async &amp;amp; await, arrow functions and many others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Index Javascript
&lt;/h2&gt;

&lt;p&gt;To fix Javascript issues I leave you these links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developers.google.com/search/docs/guides/fix-search-javascript"&gt;Fix JS Limitations&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/guides/lazy-loading"&gt;Lazy Loading&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs/guides/dynamic-rendering"&gt;Implement Dynamic Rendering&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Debugging
&lt;/h2&gt;

&lt;p&gt;For debugging your pages there are two useful tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://search.google.com/test/mobile-friendly"&gt;Mobile Friendly Test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://search.google.com/search-console/welcome"&gt;Url Inspection Tool&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Javascript SEO
&lt;/h2&gt;

&lt;p&gt;Javascript SEO is a &lt;a href="https://www.youtube.com/watch?v=wSwzfEn5-6A&amp;amp;list=PLKoqnv2vTMUPOalM1zuWDP9OQl851WMM9&amp;amp;index=9"&gt;series of videos&lt;/a&gt; presented by Martin Splitt where you can find interesting advices.&lt;/p&gt;

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

&lt;p&gt;Keep calm and code!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>seo</category>
      <category>webcomponents</category>
      <category>io2019</category>
    </item>
    <item>
      <title>Usare Travis con Firebase per deployare Applicazioni Frontend</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Tue, 30 Apr 2019 16:09:04 +0000</pubDate>
      <link>https://dev.to/grandemayta/usare-travis-con-firebase-per-deployare-applicazioni-frontend-21bj</link>
      <guid>https://dev.to/grandemayta/usare-travis-con-firebase-per-deployare-applicazioni-frontend-21bj</guid>
      <description>&lt;p&gt;Scrivo questo post perché in questi giorni mi sono imbattuto in un problema molto ricorrente. Ho diversi progetti su Github la maggior parte sono degli esperimenti che faccio per conto mio. Il mio obiettivo era quello di trovare una piattaforma di hosting gratuita, con supporto di Single Page Applications, integrazione con Travis e Https attivo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Perche Travis?
&lt;/h2&gt;

&lt;p&gt;Anche se è un progetto personale, non voglio perdere tempo a fare deploy manuali (spostando cartelle su Filezilla) quando ci sono sistemi di CI che mi permettono di automatizzare tutto il flusso di rilascio delle miei applicazioni. Per chi volesse approfondire su travis ecco un &lt;a href="https://docs.travis-ci.com/user/for-beginners/" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cercando in giro per la rete, ho trovato questa lista di possibili candidati:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heroku&lt;/li&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Github Pages&lt;/li&gt;
&lt;li&gt;Surge.sh&lt;/li&gt;
&lt;li&gt;Firebase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cominciamo con Heroku che uso già per applicazioni NodeJS, il problema è che devo creare una applicazione server per servire i miei file statici, in più la versione gratuita si spegne quando non viene utilizzata.&lt;/p&gt;

&lt;p&gt;Amazon S3 l'ho trovato molto macchinoso e non facile da configurare.&lt;/p&gt;

&lt;p&gt;Github Pages era l'ideale poi ho scoperto che non offre supporto a SPA. Quindi se dovete sviluppare una demo dove è presente solo una pagina può andare.&lt;/p&gt;

&lt;p&gt;Surge.sh sembrava l'ideale, molto facile da configurare, tutto da riga di comando, ma il problema è che i siti sono lenti. &lt;/p&gt;

&lt;p&gt;Firebase mi ha sorpreso di solito l'uso per creare REST Api, è stato molto semplice la configurazione.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configurazione Firebase
&lt;/h2&gt;

&lt;p&gt;La prima cosa che bisogna fare e creare un progetto dalla &lt;a href="https://console.firebase.google.com" rel="noopener noreferrer"&gt;console di Firebase&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fldgdgm9bga4ocit3l1bz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fldgdgm9bga4ocit3l1bz.png" alt="Creazione progetto con Firebase"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Poi bisogna installare la cli, lo potete fare da riga di commando usando npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; firebase-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dopo l'installazione bisogna lanciare il commando per effettuare la login, verrà aperta una pagina sul browser, dovete confermare i permessi.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Per questo esempio ho usato il seguente progetto che ho su Github &lt;a href="https://github.com/grandemayta/ngrx-angular-example" rel="noopener noreferrer"&gt;ngrx-angular-example&lt;/a&gt;, prima di lanciare il prossimo commando dovete spostarvi nella root del progetto che volete usare.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;La console di Firebase vi mostrerà una lista di opzioni dovete selezionare "Hosting: Configure and deploy Firebase Hosting sites":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Famfw8stsljjymxjzb360.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Famfw8stsljjymxjzb360.png" alt="Firebase init"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Poi vi chiederà quale cartella usare per deployare la vostra applicazione e se volete il supporto alle SPA. &lt;br&gt;
Nel mio caso visto che ho usato la CLI di Angular per generare il progetto, la cartella sarà dist/ngrx-angular-example.&lt;/p&gt;

&lt;p&gt;Alla fine della configurazione nel vostro progetto verrano inclusi da firebase 2 file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;.firebasesrc&lt;/li&gt;
&lt;li&gt;firebase.json&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All'interno di &lt;strong&gt;firebase.json&lt;/strong&gt; trovate la seguente configurazione, che potete modificare quando volete:&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;"hosting"&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;"public"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"dist/ngrx-angular-example"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ignore"&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="s2"&gt;"firebase.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"**/.*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"**/node_modules/**"&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;"rewrites"&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;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&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;"destination"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/index.html"&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configurazione Travis
&lt;/h2&gt;

&lt;p&gt;Adesso che abbiamo Firebase configurato, dobbiamo creare il file .travis.yml al cui interno inserire le regole per gestire la build e poi il deploy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;language&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;node_js&lt;/span&gt;
&lt;span class="na"&gt;node_js&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;8'&lt;/span&gt;
&lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;yarn&lt;/span&gt;
&lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;only&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;
&lt;span class="na"&gt;before-script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;yarn&lt;/span&gt;
&lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; 
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;yarn prod&lt;/span&gt;
&lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;firebase&lt;/span&gt;
  &lt;span class="na"&gt;skip_cleanup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;secure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;$FIREBASE_TOKEN&lt;/span&gt;
  &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ngrx-angular-fe-gm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Le regole sono molto semplici, nel mio caso voglio che la build si attivi solo sul branch master. Il commando da lanciare per effettuare la build del mio progetto è "yarn prod".&lt;/p&gt;

&lt;p&gt;Nelle regole di deploy bisogna aggiungere come provider "firebase" e specificare il nome del progetto che abbiamo creato precedentemente nella &lt;a href="https://console.firebase.google.com/" rel="noopener noreferrer"&gt;console di firebase&lt;/a&gt;. Per creare il token potete lanciare il seguente commando e poi salvatelo da qualche parte:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;firebase login:ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Se andate sul &lt;a href="http://travis-ci.com" rel="noopener noreferrer"&gt;sito di travis&lt;/a&gt; vi potete creare un account usando la vostra utenza di Github, accettate i permessi che vi chiederà:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqgfvh7oxgkl4sj0pxfjo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqgfvh7oxgkl4sj0pxfjo.png" alt="Creare account su Travis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Selezionate la vostra repo, in fondo a destra dovrebbe comparire la voce "more options" andate su settings e inserite la seguente configurazione:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz0y4shlp19s84j5sx4os.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz0y4shlp19s84j5sx4os.png" alt="Configurazione Travis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vi ricordate il token che avete generato prima, copiatelo dentro "Environment Variables". &lt;/p&gt;

&lt;p&gt;Adesso che abbiamo tutto configurato non ci resta che pushare tutto su develop e poi fare una pull request su master, accettando la PR dovrebbe partire la build in automatico, andate su Travis nella sezione branches, dovresti avere una schermata simile a questa:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmhgbxjbxnjvhtcesrn6z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmhgbxjbxnjvhtcesrn6z.png" alt="Build attiva su Travis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Se tutto va a buon fine la schermata finale dovrebbe essere questa:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fli4e9rstar46uw5rldvw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fli4e9rstar46uw5rldvw.png" alt="Build finita su Travis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adesso che il deploy è finito tornate nella console di Firebase e aprite il vostro progetto, cliccate sulla voce di menu "Hosting" che vi manderà nella pagina dove trovate l'url del vostro sito.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flqkyucw0x94bfnrtyhl1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flqkyucw0x94bfnrtyhl1.png" alt="Firebase Hosting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adesso potete replicare questo processo ogni volta che iniziate un progetto su Github e non lasciare i vostri progetti abbandonati. In questo modo potete anche condividerli con amici e colleghi e perché no, può servire anche da cavia per progetti futuri.&lt;/p&gt;

&lt;p&gt;keep calm and code!&lt;/p&gt;

</description>
      <category>travis</category>
      <category>github</category>
      <category>frontend</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Use the platform with Web Components</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Tue, 02 Apr 2019 21:40:58 +0000</pubDate>
      <link>https://dev.to/grandemayta/use-the-platform-with-web-components-4cfi</link>
      <guid>https://dev.to/grandemayta/use-the-platform-with-web-components-4cfi</guid>
      <description>&lt;p&gt;Major browsers support many features like Classes, Arrow Functions, Spread Operator, Template Literals, Instersection Observer, Web Components and with the introduction of ES Modules we can develop Web Applications without the help of module bundlers like Webpack or Rollup.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1113016962483998720-640" src="https://platform.twitter.com/embed/Tweet.html?id=1113016962483998720"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1113016962483998720-640');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1113016962483998720&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;I know what do you think... Talk is cheap, show me the code!&lt;/p&gt;

&lt;p&gt;So I created a repository to share my test with Web Components and ES Modules.&lt;br&gt;
I used the Github's API to develop 3 Web Components:&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;github-profile&lt;/span&gt; &lt;span class="na"&gt;nickname=&lt;/span&gt;&lt;span class="s"&gt;"timbl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/github-profile&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;github-repositories&lt;/span&gt; &lt;span class="na"&gt;nickname=&lt;/span&gt;&lt;span class="s"&gt;"timbl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/github-repositories&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;github-followers&lt;/span&gt; &lt;span class="na"&gt;nickname=&lt;/span&gt;&lt;span class="s"&gt;"timbl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/github-followers&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;As you can see I added the nickname attribute, I used this attribute to retrieve data from Rest API. With WCs you can use html templates to handle fragments of markup to load with JS. For your information the template content is not render by the browser, but can be instantiated later or at runtime.&lt;br&gt;
Below you can find the profile template:&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;template&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"github-profile-template"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;*&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="nl"&gt;padding&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="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&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;20px&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;240px&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="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#f0f0f0&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;4px&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="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;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;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nt"&gt;h1&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&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="m"&gt;#f0f0f0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="nl"&gt;text-transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;uppercase&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&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;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;img&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&amp;lt;/h1&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Below you can find the javascript classes of every WC and you can see how the templates are loaded:&lt;/p&gt;
&lt;h3&gt;
  
  
  Github Profile
&lt;/h3&gt;


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



&lt;h3&gt;
  
  
  Github Repositories
&lt;/h3&gt;


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


&lt;h3&gt;
  
  
  Github Followers
&lt;/h3&gt;


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


&lt;p&gt;I developed a service function to make http calls with Fetch. This function will be load from every WC.&lt;/p&gt;


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


&lt;p&gt;And then I created a script file to import my 3 Web Components, I called this file bootstrap.js:&lt;/p&gt;


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


&lt;p&gt;After that I added in the bottom the bootstrap script, I used the type="module" (ES Modules) in the tag:&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 &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"bootstrap.js"&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;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you open the index.html with your browser, you should see the following files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftvkpn8d5ys7hnafoirv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftvkpn8d5ys7hnafoirv1.png" alt="Scripts downloaded"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To improve performance you can enable HTTPS/2 on server side like Facebook:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F1%2AiUnZLRBnJgrWqNuL1f_hYQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F1%2AiUnZLRBnJgrWqNuL1f_hYQ.png" alt="Facebook http2"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In this project I didn't use Babel, Webpack, libraries or frameworks, but I used the &lt;strong&gt;Web Standards&lt;/strong&gt; and my code is working on Chrome, Safari, Firefox and Opera.&lt;br&gt;
You need polyfill to support Microsoft Edge for now.&lt;/p&gt;

&lt;p&gt;The Web is changing so fast in the last years, so maybe in some cases is better to choose the standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/esmodules-webcomponent" rel="noopener noreferrer"&gt;Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codepen.io/grandemayta/project/full/AyaWmg" rel="noopener noreferrer"&gt;Codepen Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://grandemayta.herokuapp.com/js/esmodules-github-wc" rel="noopener noreferrer"&gt;Heroku Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep calm and code!&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>javascript</category>
      <category>esmodules</category>
      <category>shadowdom</category>
    </item>
    <item>
      <title>Javascript DOM Manipulation to improve performance</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Fri, 25 Jan 2019 23:16:12 +0000</pubDate>
      <link>https://dev.to/grandemayta/javascript-dom-manipulation-to-improve-performance-459a</link>
      <guid>https://dev.to/grandemayta/javascript-dom-manipulation-to-improve-performance-459a</guid>
      <description>&lt;p&gt;I wrote this article to show you with examples, how avoid performance issues when develop Web Applications with Vanilla Javascript.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use selector instead nested elements
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD
&lt;span class="nb"&gt;let &lt;/span&gt;menu &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'header &amp;gt; nav &amp;gt; ul.menu'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

// GOOD
&lt;span class="nb"&gt;let &lt;/span&gt;menu &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.menu'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Avoid DOM manipulations inside loops
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 10&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.numbers'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;.innerText +&lt;span class="o"&gt;=&lt;/span&gt; i&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

// GOOD
&lt;span class="nb"&gt;let &lt;/span&gt;numbers &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 10&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    numbers +&lt;span class="o"&gt;=&lt;/span&gt; i&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.numbers'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;.innerText &lt;span class="o"&gt;=&lt;/span&gt; numbers&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Don't use DOM values inside loops
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD
&lt;span class="nb"&gt;let &lt;/span&gt;nodes &lt;span class="o"&gt;=&lt;/span&gt; document.querySelectorAll&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.menu-items'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; node.length&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; ... &lt;span class="o"&gt;}&lt;/span&gt;

// GOOD
&lt;span class="nb"&gt;let &lt;/span&gt;nodes &lt;span class="o"&gt;=&lt;/span&gt; document.querySelectorAll&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.menu-items'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
const size &lt;span class="o"&gt;=&lt;/span&gt; nodes.length&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; size&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; ... &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use css classes instead inline styles
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD 
&lt;span class="nb"&gt;let &lt;/span&gt;card &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.card'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
card.style.width &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'400px'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
card.style.color &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'#f0f0f0'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
card.style.marginTop &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'10px'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

// GOOD 
&lt;span class="nb"&gt;let &lt;/span&gt;card &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.card'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
card.style.cssText &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;.concat&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="s1"&gt;'width       : 400px;'&lt;/span&gt;,
    &lt;span class="s1"&gt;'color       : #f0f0f0;'&lt;/span&gt;,
    &lt;span class="s1"&gt;'margin-top  : 10px;'&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

// BETTER 
.card-custom &lt;span class="o"&gt;{&lt;/span&gt;
    width: 400px&lt;span class="p"&gt;;&lt;/span&gt;
    color: &lt;span class="c"&gt;#f0f0f0;&lt;/span&gt;
    margin-top: 10px&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;let &lt;/span&gt;card &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.card'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
card.classList.add&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'card-custom'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Appending DOM is the most expensive operation, choose the right approach
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 1000&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;let &lt;/span&gt;a &lt;span class="o"&gt;=&lt;/span&gt; document.createElement&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'a'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    a.text &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;Row N° &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    container.appendChild&lt;span class="o"&gt;(&lt;/span&gt;a&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

// GOOD
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;html &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 1000&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    html &lt;span class="o"&gt;=&lt;/span&gt; html.concat&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&amp;lt;a&amp;gt;Row N° &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&amp;lt;/a&amp;gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
container.innerHTML &lt;span class="o"&gt;=&lt;/span&gt; html&lt;span class="p"&gt;;&lt;/span&gt;

// BETTER
&lt;span class="nb"&gt;let &lt;/span&gt;a &lt;span class="o"&gt;=&lt;/span&gt; document.createElement&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'a'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 1000&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;let &lt;/span&gt;cloneA &lt;span class="o"&gt;=&lt;/span&gt; a.cloneNode&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    cloneA.text &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;Row N° &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    container.appendChild&lt;span class="o"&gt;(&lt;/span&gt;cloneA&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

// BETTER^2
&lt;span class="nb"&gt;let &lt;/span&gt;a &lt;span class="o"&gt;=&lt;/span&gt; document.createElement&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'a'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;documentFragment &lt;span class="o"&gt;=&lt;/span&gt; document.createDocumentFragment&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;let &lt;/span&gt;i &lt;span class="o"&gt;=&lt;/span&gt; 0&lt;span class="p"&gt;;&lt;/span&gt; i &amp;lt; 1000&lt;span class="p"&gt;;&lt;/span&gt; i++&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;let &lt;/span&gt;cloneA &lt;span class="o"&gt;=&lt;/span&gt; a.cloneNode&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    cloneA.text &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;Row N° &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    documentFragment.appendChild&lt;span class="o"&gt;(&lt;/span&gt;cloneA&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
container.appendChild&lt;span class="o"&gt;(&lt;/span&gt;documentFragment&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use innerHTML only for first rendering and then use DOM methods
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// BAD
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
container.innerHTML &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;input type="text" name="example" value="Hi DEVS!"&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
container.innerHTML &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;input type="text" name="example" value="Bye DEVS!"&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

// GOOD
&lt;span class="nb"&gt;let &lt;/span&gt;container &lt;span class="o"&gt;=&lt;/span&gt; document.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'.container'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
container.innerHTML &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;input type="text" name="example" value="Hi DEVS!"&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;input &lt;span class="o"&gt;=&lt;/span&gt; container.querySelector&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'input'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
input.value &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Bye DEVS!'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;If you have some tips, please leave your comment. &lt;br&gt;
Keep calm and code!&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>html</category>
      <category>webdev</category>
    </item>
    <item>
      <title>My New Year Resolutions for 2019</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Mon, 31 Dec 2018 10:55:18 +0000</pubDate>
      <link>https://dev.to/grandemayta/my-new-year-resolutions-for-2019-4hg1</link>
      <guid>https://dev.to/grandemayta/my-new-year-resolutions-for-2019-4hg1</guid>
      <description>&lt;p&gt;I want to share with you my goals for 2019. For this reason I forked this &lt;a href="https://github.com/sarthology/ResolutionBoard"&gt;repository&lt;/a&gt; to get update my new year resolutions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Help my wife to learn Html, Css and Javascript&lt;/li&gt;
&lt;li&gt;Improve my skills with Dart and Flutter to write native apps&lt;/li&gt;
&lt;li&gt;Write at least one article at month&lt;/li&gt;
&lt;li&gt;Read a book a month&lt;/li&gt;
&lt;li&gt;Improve my english ASAP 😁&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and you?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/grandemayta/ResolutionBoard"&gt;My resolutions repository&lt;/a&gt;&lt;/p&gt;


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


&lt;p&gt;Keep calm and code!&lt;/p&gt;

</description>
      <category>resolution</category>
      <category>frontend</category>
      <category>flutter</category>
    </item>
    <item>
      <title>My experience with Flutter</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Thu, 06 Dec 2018 20:37:12 +0000</pubDate>
      <link>https://dev.to/grandemayta/my-experience-with-flutter-1bof</link>
      <guid>https://dev.to/grandemayta/my-experience-with-flutter-1bof</guid>
      <description>&lt;p&gt;Google &lt;a href="https://www.theverge.com/2018/12/4/18125053/google-flutter-1-0-skia-mobile-app-cross-platform-developers" rel="noopener noreferrer"&gt;has just released version 1.0&lt;/a&gt; of their native app development framework called &lt;a href="https://flutter.io/" rel="noopener noreferrer"&gt;Flutter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I've always been a fan of mobile apps, during my career I participated in many projects where &lt;a href="https://milano.repubblica.it/cronaca/2015/06/22/foto/playground-117440499/1/#2" rel="noopener noreferrer"&gt;I created apps for different companies from scratch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5od4hkdfi9kw1buq6x2j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5od4hkdfi9kw1buq6x2j.jpg" alt="Pisapia con la palla a spicchi lancia la app dei 120 playground di Milano"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In most cases I have always used web technologies like Angular / React, Css and Html and then with the help of frameworks like &lt;a href="https://cordova.apache.org/" rel="noopener noreferrer"&gt;Apache Cordova&lt;/a&gt; or &lt;a href="https://phonegap.com/" rel="noopener noreferrer"&gt;Phonegap&lt;/a&gt; you could make an &lt;a href="https://developer.telerik.com/featured/what-is-a-hybrid-mobile-app/" rel="noopener noreferrer"&gt;hybrid app&lt;/a&gt;. The problem with this type of approach is that often the look &amp;amp; feel and the usability are affected heavily, especially with less powerful devices.&lt;/p&gt;

&lt;p&gt;Then Facebook arrived with &lt;a href="https://facebook.github.io/react-native/" rel="noopener noreferrer"&gt;React Native&lt;/a&gt; and Microsoft with &lt;a href="https://visualstudio.microsoft.com/xamarin/" rel="noopener noreferrer"&gt;Xamarin&lt;/a&gt;.&lt;br&gt;
Both with the same promise, allow the developer to use the same code on Android, IOS and Windows Phone (RIP).&lt;/p&gt;

&lt;p&gt;The major supporter of React Native &lt;a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a" rel="noopener noreferrer"&gt;AirBnb in the course of 2018 announced the farewell to the Facebook home framework&lt;/a&gt; for several reasons including bugs and various problems.&lt;/p&gt;

&lt;p&gt;Also in 2018 &lt;a href="https://proandroiddev.com/google-i-o-2018-flutter-recap-6f06545efd74" rel="noopener noreferrer"&gt;Google announces the release of the first version of Flutter in Beta&lt;/a&gt;. Alibaba immediately sees the potential of the new framework and adopts it &lt;a href="https://www.youtube.com/watch?v=jtYk3gWRSw0&amp;amp;vl=en" rel="noopener noreferrer"&gt;for the development of a 50 million user app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have personally created 2 apps using Flutter, currently they are in the Android store. The learning curve is fast because it always adopts a component logic like it happens with React or Angular even if they call it Widget&lt;/p&gt;

&lt;p&gt;The programming language it uses is &lt;a href="https://www.dartlang.org/" rel="noopener noreferrer"&gt;Dart&lt;/a&gt;, object oriented so for those coming from Java or C# it is simpler. They have also introduced ready-to-use UI components that integrate the guidelines of Material Design and Cupertino, which speeds up development. The documentation is still to be improved but they are on track.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53upotjbi7gl9t4x4ke2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53upotjbi7gl9t4x4ke2.png" alt="Exchange Flutter"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fajs2o70plf6mkyfct6tz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fajs2o70plf6mkyfct6tz.png" alt="Social Dev"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To keep you updated I recommend you follow their &lt;a href="https://www.youtube.com/watch?v=CPmN4-i9zC8&amp;amp;list=PLOU2XLYxmsIK0r_D-zWcmJ1plIcDNnRkK" rel="noopener noreferrer"&gt;official channel on Youtube&lt;/a&gt; where they publish videos under the title of &lt;strong&gt;Boring Flutter Development Show&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Below I leave the links of the 2 projects that I shared on Github:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/exchange-flutter" rel="noopener noreferrer"&gt;[Repository] Exchange Flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/github-flutter" rel="noopener noreferrer"&gt;[Repository]Social Dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.grandemayta.exchangeflutter" rel="noopener noreferrer"&gt;[Play Store] Exchange Flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.grandemayta.socialdev" rel="noopener noreferrer"&gt;[Play Store] Social Dev&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep calm and code!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>mobile</category>
      <category>apps</category>
    </item>
    <item>
      <title>La mia esperienza con Flutter</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Thu, 06 Dec 2018 19:14:37 +0000</pubDate>
      <link>https://dev.to/grandemayta/la-mia-esperienza-con-flutter-58p9</link>
      <guid>https://dev.to/grandemayta/la-mia-esperienza-con-flutter-58p9</guid>
      <description>&lt;p&gt;Google ha appena &lt;a href="https://www.theverge.com/2018/12/4/18125053/google-flutter-1-0-skia-mobile-app-cross-platform-developers" rel="noopener noreferrer"&gt;rilasciato la versione 1.0 del loro framework&lt;/a&gt; per lo sviluppo di app native chiamato &lt;a href="https://flutter.io/" rel="noopener noreferrer"&gt;Flutter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sono sempre stato un appassionato di app, durante il mio percorso lavorativo ho partecipato in tanti progetti dove mi è capitato di &lt;a href="https://milano.repubblica.it/cronaca/2015/06/22/foto/playground-117440499/1/#2" rel="noopener noreferrer"&gt;creare da zero app per aziende diverse&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5od4hkdfi9kw1buq6x2j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5od4hkdfi9kw1buq6x2j.jpg" alt="Pisapia con la palla a spicchi lancia la app dei 120 playground di Milano"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nella maggior parte dei casi ho sempre utilizzato tecnologie web come Angular/React, Css e Html e poi con l'aiuto di framework come &lt;a href="https://cordova.apache.org/" rel="noopener noreferrer"&gt;Apache Cordova&lt;/a&gt; o &lt;a href="https://phonegap.com/" rel="noopener noreferrer"&gt;Phonegap&lt;/a&gt; si creava &lt;a href="https://developer.telerik.com/featured/what-is-a-hybrid-mobile-app/" rel="noopener noreferrer"&gt;un'app ibrida&lt;/a&gt;. Il problema con questo tipo di approccio è che spesso il look &amp;amp; feel e l'usabilità ne risentono a volte anche pesantemente, soprattutto con dispositivi meno potenti.&lt;/p&gt;

&lt;p&gt;Poi sono arrivati Facebook con &lt;a href="https://facebook.github.io/react-native/" rel="noopener noreferrer"&gt;React Native&lt;/a&gt; e Microsoft con &lt;a href="https://visualstudio.microsoft.com/xamarin/" rel="noopener noreferrer"&gt;Xamarin&lt;/a&gt;.&lt;br&gt;
Entrambi con la stessa promessa, permettere allo sviluppattore di usare lo stesso codice su Android, IOS e Windows Phone (RIP). &lt;/p&gt;

&lt;p&gt;Il maggiore utilizzatore di React Native AirBnb nel corso del 2018 &lt;a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a" rel="noopener noreferrer"&gt;ha annunciato&lt;/a&gt; l'addio al framework di casa Facebook per diversi motivi tra cui bug e problemi vari.&lt;/p&gt;

&lt;p&gt;Sempre nel 2018 Google annuncia &lt;a href="https://proandroiddev.com/google-i-o-2018-flutter-recap-6f06545efd74" rel="noopener noreferrer"&gt;il rilascio della prima versione di Flutter in Beta&lt;/a&gt;. Alibaba vede subito le potenzialità del nuovo framework e lo adotta per lo sviluppo di &lt;a href="https://www.youtube.com/watch?v=jtYk3gWRSw0&amp;amp;vl=en" rel="noopener noreferrer"&gt;un'app da 50 milioni di utenti&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Io personalmente ho creato 2 app usando Flutter, attualmente sono nello store di Android. La curva di apprendimento è veloce perché adotta sempre una logica a componenti come succede con React o Angular anche se loro lo chiamano Widget.&lt;br&gt;
Il linguaggio di programmazione che usa è &lt;a href="https://www.dartlang.org/" rel="noopener noreferrer"&gt;Dart&lt;/a&gt;, object oriented quindi per chi arriva da Java o C# è più semplice. Inoltre hanno introdotto dei componenti di UI pronti all'uso che integrano le guidelines di Material Design e Cupertino, questo velocizza lo sviluppo. La documentazione è ancora da migliorare pero sono sulla buona strada.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53upotjbi7gl9t4x4ke2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53upotjbi7gl9t4x4ke2.png" alt="Exchange Flutter"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fajs2o70plf6mkyfct6tz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fajs2o70plf6mkyfct6tz.png" alt="Social Dev"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Per tenervi aggiornati vi consiglio di seguire il loro &lt;a href="https://www.youtube.com/watch?v=CPmN4-i9zC8&amp;amp;list=PLOU2XLYxmsIK0r_D-zWcmJ1plIcDNnRkK" rel="noopener noreferrer"&gt;canale ufficiale su Youtube&lt;/a&gt; dove pubblicano dei video sotto il titolo di &lt;strong&gt;Boring Flutter Development Show&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Di seguito vi lascio i link dei 2 progetti che ho condiviso su Github:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/exchange-flutter" rel="noopener noreferrer"&gt;[Repository] Exchange Flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/github-flutter" rel="noopener noreferrer"&gt;[Repository]Social Dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.grandemayta.exchangeflutter" rel="noopener noreferrer"&gt;[Play Store] Exchange Flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.grandemayta.socialdev" rel="noopener noreferrer"&gt;[Play Store] Social Dev&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep calm and Code!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>mobile</category>
      <category>apps</category>
      <category>dart</category>
    </item>
    <item>
      <title>How to load polyfills to handle Web Components?</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Fri, 02 Nov 2018 20:44:52 +0000</pubDate>
      <link>https://dev.to/grandemayta/how-load-polyfills-to-handle-web-components-1935</link>
      <guid>https://dev.to/grandemayta/how-load-polyfills-to-handle-web-components-1935</guid>
      <description>&lt;p&gt;In this article I will explain you how I handled the latest ES6 and Web Components features.&lt;br&gt;
If you are starting to work with Web Components you should know that they are well supported by Chrome, Firefox, Safari and Microsoft &lt;a href="https://blogs.windows.com/msedgedev/2015/07/15/microsoft-edge-and-web-components/" rel="noopener noreferrer"&gt;announced&lt;/a&gt; this year that they are working to support them.&lt;br&gt;
So you don't need to load polyfills statically, increasing the weight of the final package.&lt;/p&gt;

&lt;p&gt;For this reason I created a specific bundle to load polyfills at runtime when browsers don't support it.&lt;br&gt;
I listed the most used features split by types. Below you can find the code:&lt;/p&gt;


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


&lt;p&gt;As you can see I created a function where I define my WC and then I used dynamic import to enable code splitting to load all polyfills. The file contains all features that I need like fetch, es6 and WC features. Check the code:&lt;/p&gt;


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


&lt;p&gt;To enable code splitting with webpack you need to install the following package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm i --save-dev @babel/plugin-syntax-dynamic-import
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that add the package in your babel setup (.babelrc or babel.config.js):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$  plugins: [
$   '@babel/plugin-syntax-dynamic-import'
$  ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This demo works without the help of polyfills in Chrome, Safari, Firefox and Edge&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/grandemayta/embed/XxEOPW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you try to launch the application with IE11, you will see the polyfill loaded:&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%2Fz70rgfteku0z9qplngfc.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%2Fz70rgfteku0z9qplngfc.png" alt="Polyfill loaded" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you need to see the code, below you can find the links of my repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/webcomponents-scaffolding" rel="noopener noreferrer"&gt;Web Components Scaffolding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/webcomponents-exchange-rates" rel="noopener noreferrer"&gt;Exchange Rates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Are Web Components the future? I don't know but with the right approach you can build reusable components that work in all browsers without load polyfills if you don't need it.&lt;/p&gt;

&lt;p&gt;Keep calm and code!&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>javascript</category>
      <category>polyfills</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Create a Web Component with LitElement</title>
      <dc:creator>Gabriel Mayta</dc:creator>
      <pubDate>Mon, 29 Oct 2018 14:15:21 +0000</pubDate>
      <link>https://dev.to/grandemayta/create-a-web-component-with-litelement-2lf1</link>
      <guid>https://dev.to/grandemayta/create-a-web-component-with-litelement-2lf1</guid>
      <description>&lt;p&gt;Two weeks ago I started to play with Web Components. I think that Web Components is a great approach to build reusable components.&lt;/p&gt;

&lt;p&gt;So I want to share with you the repositories where I worked. I also created a scaffolding to generate a &lt;strong&gt;custom-element&lt;/strong&gt; with all you need.&lt;/p&gt;

&lt;p&gt;Custom Elements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/custom-element-pokemon-cards"&gt;Respository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/custom-elements-scaffolding"&gt;Scaffolding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codepen.io/grandemayta/pen/WaMYwe"&gt;Codepen Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/grandemayta/embed/WaMYwe?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;After tried the potential of custom elements I created another project with Web Components support. For this purpose I used &lt;a href="https://github.com/Polymer/lit-element"&gt;Lit-element&lt;/a&gt; a library developed by Polymer team to support Web Components.&lt;/p&gt;

&lt;p&gt;Web Components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/webcomponents-exchange-rates"&gt;Respository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/grandemayta/webcomponents-scaffolding"&gt;Scaffolding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codepen.io/grandemayta/pen/mzgBKw"&gt;Codepen Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/grandemayta/embed/mzgBKw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;While I writing this post Chrome, Safari and Firefox support Web Components and Microsoft &lt;a href="https://blogs.windows.com/msedgedev/2015/07/15/microsoft-edge-and-web-components/"&gt;announced&lt;/a&gt; they are working to bring Web Components to Edge. &lt;/p&gt;

&lt;p&gt;If you need to support IE11 you can integrate &lt;a href="https://github.com/webcomponents/webcomponentsjs"&gt;webcomponents library&lt;/a&gt; that works fine.&lt;/p&gt;

&lt;p&gt;What do you think about Web Components?&lt;/p&gt;

</description>
      <category>customelements</category>
      <category>webcomponents</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
