<?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>Forem: Roberto Celano</title>
    <description>The latest articles on Forem by Roberto Celano (@roberto_celano).</description>
    <link>https://forem.com/roberto_celano</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%2F1999584%2F55af289b-0a06-43a4-aa70-31d916d1f81c.jpg</url>
      <title>Forem: Roberto Celano</title>
      <link>https://forem.com/roberto_celano</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/roberto_celano"/>
    <language>en</language>
    <item>
      <title>Creare una PWA con Laravel e Bootstrap | Building a PWA with Laravel and Bootstrap</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Sat, 18 Oct 2025 22:07:26 +0000</pubDate>
      <link>https://forem.com/roberto_celano/creare-una-pwa-con-laravel-e-bootstrap-building-a-pwa-with-laravel-and-bootstrap-5epe</link>
      <guid>https://forem.com/roberto_celano/creare-una-pwa-con-laravel-e-bootstrap-building-a-pwa-with-laravel-and-bootstrap-5epe</guid>
      <description>&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;  

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version. &lt;/p&gt;


&lt;h2&gt;
  
  
  🇮🇹 Come ho trasformato un sito &lt;strong&gt;Laravel&lt;/strong&gt; in una &lt;strong&gt;PWA&lt;/strong&gt; moderna
&lt;/h2&gt;

&lt;p&gt;Negli ultimi anni le &lt;strong&gt;Progressive Web App&lt;/strong&gt; (&lt;strong&gt;PWA&lt;/strong&gt;) sono diventate uno standard per offrire un’esperienza simile a quella delle app native, direttamente dal browser. Nel mio caso, volevo che il mio portfolio personale – sviluppato in &lt;strong&gt;Laravel&lt;/strong&gt; + &lt;strong&gt;Bootstrap&lt;/strong&gt; – potesse essere installato su dispositivi mobile e desktop, mantenendo la leggerezza di un sito classico.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Creare il Manifest
&lt;/h3&gt;

&lt;p&gt;Il primo passo è aggiungere il file &lt;code&gt;manifest.json&lt;/code&gt; nella directory &lt;code&gt;public/&lt;/code&gt;.&lt;br&gt;
Contiene le informazioni che definiscono il comportamento della tua app una volta installata.&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;"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;"Roberto Celano | Web Developer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"short_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;"RC Dev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start_url"&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;"display"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"standalone"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"background_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#0d1117"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"theme_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#00bcd4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"icons"&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;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/assets/icons/icon-192.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"sizes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"192x192"&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;"image/png"&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;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/assets/icons/icon-512.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"sizes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"512x512"&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;"image/png"&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;p&gt;Ricorda di linkarlo nel tuo layout principale (&lt;code&gt;resources/views/layouts/app.blade.php&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"manifest"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('manifest.json') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Registrare il Service Worker
&lt;/h3&gt;

&lt;p&gt;Nel file &lt;code&gt;public/service-worker.js&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="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;install&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="o"&gt;=&amp;gt;&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Service Worker installato&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="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fetch&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="nx"&gt;event&lt;/span&gt;&lt;span class="p"&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;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;respondWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&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;E nella tua view Blade, aggiungi:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;serviceWorker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;serviceWorker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/service-worker.js&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="nf"&gt;then&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;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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Service Worker registrato&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="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Errore:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Aggiungere il prompt d’installazione
&lt;/h3&gt;

&lt;p&gt;Con questo snippet puoi mostrare il messaggio “&lt;strong&gt;Installa App&lt;/strong&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;beforeinstallprompt&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="nx"&gt;e&lt;/span&gt;&lt;span class="p"&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;installButton&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;block&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quando l’utente clicca il bottone:&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="nx"&gt;installButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&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;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;outcome&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userChoice&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Scelta utente:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;outcome&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;h3&gt;
  
  
  4. Test con Lighthouse
&lt;/h3&gt;

&lt;p&gt;Apri &lt;strong&gt;Chrome&lt;/strong&gt; → &lt;strong&gt;DevTools&lt;/strong&gt; → &lt;strong&gt;Lighthouse&lt;/strong&gt; → &lt;strong&gt;Progressive Web App&lt;/strong&gt;.&lt;br&gt;
Ti mostrerà se la tua &lt;strong&gt;PWA&lt;/strong&gt; è installabile e conforme agli standard.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Risultato finale
&lt;/h3&gt;

&lt;p&gt;Ora il mio sito &lt;strong&gt;robertocelano.dev&lt;/strong&gt; può essere installato come app su smartphone, tablet e desktop.&lt;br&gt;
L’esperienza è fluida, il caricamento è rapido e l’interfaccia mantiene il design Bootstrap originale.&lt;/p&gt;


&lt;h2&gt;
  
  
  🇬🇧 How I turned a &lt;strong&gt;Laravel&lt;/strong&gt; site into a modern &lt;strong&gt;PWA&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In recent years, &lt;strong&gt;Progressive Web Apps&lt;/strong&gt; (&lt;strong&gt;PWA&lt;/strong&gt;) have become the standard for bringing native-like experiences to the browser. In my case, I wanted my personal portfolio — built with Laravel + Bootstrap — to be installable on mobile and desktop, while keeping the simplicity of a classic website.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Create the Manifest
&lt;/h3&gt;

&lt;p&gt;Add a &lt;code&gt;manifest.json&lt;/code&gt; file in your &lt;code&gt;public/ directory&lt;/code&gt;:&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;"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;"Roberto Celano | Web Developer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"short_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;"RC Dev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"start_url"&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;"display"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"standalone"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"background_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#0d1117"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"theme_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#00bcd4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"icons"&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;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/assets/icons/icon-192.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"sizes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"192x192"&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;"image/png"&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;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/assets/icons/icon-512.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"sizes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"512x512"&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;"image/png"&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;p&gt;Then link it in your main Blade layout (&lt;code&gt;resources/views/layouts/app.blade.php&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"manifest"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('manifest.json') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Register the Service Worker
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;public/service-worker.js&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="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;install&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="o"&gt;=&amp;gt;&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Service Worker installed&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="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fetch&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="nx"&gt;event&lt;/span&gt;&lt;span class="p"&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;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;respondWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&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;And in your Blade view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;serviceWorker&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;serviceWorker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/service-worker.js&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="nf"&gt;then&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;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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Service Worker registered&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="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Add the installation prompt
&lt;/h3&gt;

&lt;p&gt;With this snippet you can show the “&lt;strong&gt;Install App&lt;/strong&gt;” message:&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;beforeinstallprompt&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="nx"&gt;e&lt;/span&gt;&lt;span class="p"&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;installButton&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;block&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the user clicks the button:&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="nx"&gt;installButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&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;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;outcome&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;deferredPrompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userChoice&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;User choice:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;outcome&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;h3&gt;
  
  
  4. Test with Lighthouse
&lt;/h3&gt;

&lt;p&gt;Open &lt;strong&gt;Chrome&lt;/strong&gt; → &lt;strong&gt;DevTools&lt;/strong&gt; → &lt;strong&gt;Lighthouse&lt;/strong&gt; → &lt;strong&gt;Progressive Web App&lt;/strong&gt;.&lt;br&gt;
It will show whether your &lt;strong&gt;PWA&lt;/strong&gt; meets installability standards.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Final result
&lt;/h3&gt;

&lt;p&gt;Now &lt;strong&gt;robertocelano.dev&lt;/strong&gt; can be installed like an app on smartphones, tablets, and desktops — fast, responsive, and consistent with its Bootstrap design.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;center&gt;Traduzione&lt;/center&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>laravel</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>pwa</category>
    </item>
    <item>
      <title>🌊 CodeTideHQ — La nuova community per developer su X | 🌊 CodeTideHQ — The new community for developers on X</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Fri, 10 Oct 2025 00:09:00 +0000</pubDate>
      <link>https://forem.com/roberto_celano/codetidehq-la-nuova-community-per-developer-su-x-codetidehq-the-new-community-for-7f2</link>
      <guid>https://forem.com/roberto_celano/codetidehq-la-nuova-community-per-developer-su-x-codetidehq-the-new-community-for-7f2</guid>
      <description>&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;  

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.  &lt;/p&gt;




&lt;p&gt;🇮🇹 Versione Italiana&lt;/p&gt;

&lt;p&gt;🌊 Cos’è CodeTideHQ&lt;/p&gt;

&lt;p&gt;Ho creato CodeTideHQ, una nuova community su X dedicata a chi vive lo sviluppo come un percorso di crescita continua.&lt;br&gt;
È uno spazio globale dove sviluppatori e appassionati di tecnologia possono condividere codice, strumenti, risorse e riflessioni.&lt;/p&gt;

&lt;p&gt;Il motto è semplice e diretto:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn. Build. Evolve.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;L’obiettivo è creare un punto di incontro per chi vuole imparare, migliorare e crescere insieme attraverso la condivisione.&lt;/p&gt;




&lt;p&gt;💡 Cosa troverai nella community&lt;/p&gt;

&lt;p&gt;Discussioni su sviluppo web, Laravel, React, JavaScript e strumenti moderni.&lt;/p&gt;

&lt;p&gt;Spazio per condividere progetti, esperimenti e risorse utili.&lt;/p&gt;

&lt;p&gt;Un ambiente positivo, aperto e globale.&lt;/p&gt;




&lt;p&gt;🚀 Unisciti&lt;/p&gt;

&lt;p&gt;Se vuoi far parte della community, puoi unirti da qui:&lt;br&gt;
👉 &lt;a href="https://twitter.com/i/communities/1976393201641734619" rel="noopener noreferrer"&gt;https://twitter.com/i/communities/1976393201641734619&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📍Hashtag ufficiale: #CodeTideHQ&lt;/p&gt;




&lt;p&gt;🇬🇧 English Version&lt;/p&gt;

&lt;p&gt;🌊 What is CodeTideHQ&lt;/p&gt;

&lt;p&gt;I created CodeTideHQ, a new community on X for developers who see coding as a journey of continuous growth.&lt;br&gt;
It’s a global space where developers and tech enthusiasts can share code, tools, resources, and ideas.&lt;/p&gt;

&lt;p&gt;Our motto:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn. Build. Evolve.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The goal is to build a collaborative place for learning, sharing, and growing together.&lt;/p&gt;




&lt;p&gt;💡 What you’ll find&lt;/p&gt;

&lt;p&gt;Discussions about web development, Laravel, React, JavaScript, and modern tools.&lt;/p&gt;

&lt;p&gt;A place to share your projects, experiments, and useful resources.&lt;/p&gt;

&lt;p&gt;A positive, open, and global environment.&lt;/p&gt;




&lt;p&gt;🚀 Join&lt;/p&gt;

&lt;p&gt;Join the community here:&lt;br&gt;
👉 &lt;a href="https://twitter.com/i/communities/1976393201641734619" rel="noopener noreferrer"&gt;https://twitter.com/i/communities/1976393201641734619&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📍Official hashtag: #CodeTideHQ&lt;/p&gt;




&lt;p&gt;Traduzione:&lt;br&gt;
Questo articolo è stato tradotto con l’ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>developers</category>
      <category>javascript</category>
      <category>coding</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🎨 Laravel &amp; Blade: crea viste eleganti e riutilizzabili | 🎨 Laravel &amp; Blade: Create Elegant and Reusable Views</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Sun, 31 Aug 2025 21:29:16 +0000</pubDate>
      <link>https://forem.com/roberto_celano/laravel-blade-crea-viste-eleganti-e-riutilizzabili-laravel-blade-create-elegant-and-15p3</link>
      <guid>https://forem.com/roberto_celano/laravel-blade-crea-viste-eleganti-e-riutilizzabili-laravel-blade-create-elegant-and-15p3</guid>
      <description>&lt;h2&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h2&gt;  

&lt;p&gt;&lt;em&gt;Italiano:&lt;/em&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;em&gt;English:&lt;/em&gt; This article is available in both Italian and English. Scroll down for the English version.  &lt;/p&gt;


&lt;h2&gt;
  
  
  🇮🇹 Versione Italiana
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Perché Blade?
&lt;/h3&gt;

&lt;p&gt;Laravel include &lt;strong&gt;Blade&lt;/strong&gt;, un motore di template leggero e potente che semplifica la scrittura delle viste.&lt;br&gt;&lt;br&gt;
Rispetto all’HTML puro, Blade ti permette di:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Riutilizzare codice&lt;/strong&gt; con layout e componenti.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evitare duplicazioni&lt;/strong&gt; grazie a &lt;code&gt;@extends&lt;/code&gt;, &lt;code&gt;@section&lt;/code&gt;, &lt;code&gt;@yield&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mantenere il codice più ordinato e leggibile&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  Creare un layout base
&lt;/h3&gt;

&lt;p&gt;Un esempio di &lt;code&gt;layout.blade.php&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/layouts/app.blade.php --&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"it"&lt;/span&gt;&lt;span class="nt"&gt;&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;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;@yield('title', 'Il mio sito Laravel')&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;x-navbar&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        @yield('content')
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;x-footer&lt;/span&gt; &lt;span class="nt"&gt;/&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;h3&gt;
  
  
  Estendere un layout
&lt;/h3&gt;

&lt;p&gt;Per creare una pagina che estende il layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/home.blade.php --&amp;gt;&lt;/span&gt;
@extends('layouts.app')

@section('title', 'Homepage')

@section('content')
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Benvenuto nel mio sito!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Questa è la homepage creata con Blade.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
@endsection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Sezioni dinamiche
&lt;/h3&gt;

&lt;p&gt;Con &lt;code&gt;@section&lt;/code&gt; puoi definire aree diverse della pagina, ad esempio meta tag SEO o script specifici.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'meta_description'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Benvenuto nel sito di esempio con Blade'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Componenti Blade
&lt;/h3&gt;

&lt;p&gt;Un componente ti permette di creare blocchi riutilizzabili.&lt;br&gt;
Esempio: &lt;code&gt;x-navbar&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/components/navbar.blade.php --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('home') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('about') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Chi Siamo&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('contact') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contatti&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;E lo richiami semplicemente con:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-navbar&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Include vs Componenti
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;@include&lt;/code&gt;→ utile per piccoli frammenti statici.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Componenti&lt;/code&gt; → ideali per elementi dinamici e riutilizzabili (es. navbar, card, footer).&lt;/p&gt;




&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;p&gt;✅ Mantieni i layout semplici.&lt;br&gt;
✅ Dai nomi chiari ai file (&lt;code&gt;layouts/app.blade.php&lt;/code&gt;, &lt;code&gt;components/navbar.blade.php&lt;/code&gt;).&lt;br&gt;
✅ Sfrutta le variabili nei componenti (&lt;code&gt;&amp;lt;x-alert type="success" /&amp;gt;&lt;/code&gt;).&lt;br&gt;
✅ Evita duplicazioni: DRY (&lt;em&gt;Don’t Repeat Yourself&lt;/em&gt;).&lt;/p&gt;


&lt;h3&gt;
  
  
  📌 Conclusione
&lt;/h3&gt;

&lt;p&gt;Blade è uno strumento fondamentale per organizzare le viste in un progetto Laravel.&lt;br&gt;
Con layout, sezioni e componenti puoi creare interfacce modulari, eleganti e facili da mantenere.&lt;/p&gt;


&lt;h2&gt;
  
  
  🇬🇧 English Version
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Why Blade?
&lt;/h3&gt;

&lt;p&gt;Laravel includes &lt;strong&gt;Blade&lt;/strong&gt;, a lightweight and powerful template engine that simplifies building views.&lt;br&gt;
Compared to plain HTML, Blade allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reuse code&lt;/strong&gt; with layouts and components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid duplication&lt;/strong&gt; with &lt;code&gt;@extends&lt;/code&gt;, &lt;code&gt;@section&lt;/code&gt;, &lt;code&gt;@yield&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keep your code clean and readable.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  Creating a base layout
&lt;/h3&gt;

&lt;p&gt;Example &lt;code&gt;layout.blade.php&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/layouts/app.blade.php --&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&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;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;@yield('title', 'My Laravel Site')&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;x-navbar&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
        @yield('content')
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;x-footer&lt;/span&gt; &lt;span class="nt"&gt;/&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;h3&gt;
  
  
  Extending a layout
&lt;/h3&gt;

&lt;p&gt;To create a page extending the layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="c"&gt;&amp;lt;!-- resources/views/home.blade.php --&amp;gt;&lt;/span&gt;
@extends('layouts.app')

@section('title', 'Homepage')

@section('content')
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to my site!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is the homepage created with Blade.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
@endsection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Dynamic sections
&lt;/h3&gt;

&lt;p&gt;With &lt;code&gt;@section&lt;/code&gt; you can define different page areas, like SEO meta tags or page-specific scripts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'meta_description'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Welcome to this Blade example site'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Blade Components
&lt;/h3&gt;

&lt;p&gt;A component allows you to create reusable blocks.&lt;br&gt;
Example: &lt;code&gt;x-navbar&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/components/navbar.blade.php --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('home') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('about') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ route('contact') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;And you can call it simply with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-navbar&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Include vs Components
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;@include&lt;/code&gt; → useful for small static snippets.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Components&lt;/code&gt; → best for reusable and dynamic elements (e.g. navbar, cards, footer).&lt;/p&gt;




&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;p&gt;✅ Keep layouts simple.&lt;br&gt;
✅ Use clear file names (&lt;code&gt;layouts/app.blade.php&lt;/code&gt;, &lt;code&gt;components/navbar.blade.php&lt;/code&gt;).&lt;br&gt;
✅ Use variables in components (&lt;code&gt;&amp;lt;x-alert type="success" /&amp;gt;&lt;/code&gt;).&lt;br&gt;
✅ Avoid duplication: DRY (&lt;em&gt;Don’t Repeat Yourself&lt;/em&gt;).&lt;/p&gt;




&lt;h3&gt;
  
  
  📌 Conclusion
&lt;/h3&gt;

&lt;p&gt;Blade is an essential tool for organizing views in a Laravel project. With layouts, sections, and components, you can build modular, elegant, and easy-to-maintain interfaces.&lt;/p&gt;




&lt;center&gt;&lt;h3&gt;Traduzione&lt;/h3&gt;&lt;/center&gt;

&lt;blockquote&gt;
&lt;p&gt;Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>laravel</category>
      <category>beginners</category>
    </item>
    <item>
      <title>🧼 Laravel Form Request: valida come un professionista | 🧼 Validate Like a Pro with Laravel Form Request</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Sun, 20 Jul 2025 21:04:21 +0000</pubDate>
      <link>https://forem.com/roberto_celano/laravel-form-request-valida-come-un-professionista-validate-like-a-pro-with-laravel-form-5f06</link>
      <guid>https://forem.com/roberto_celano/laravel-form-request-valida-come-un-professionista-validate-like-a-pro-with-laravel-form-5f06</guid>
      <description>&lt;h3&gt;
  
  
  &lt;center&gt;Introduzione | Introduction&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;


&lt;h2&gt;
  
  
  🇮🇹 Laravel Form Request: guida pratica
&lt;/h2&gt;

&lt;p&gt;Se stai ancora validando i tuoi form &lt;strong&gt;direttamente nel controller&lt;/strong&gt;... è il momento di salire di livello.&lt;br&gt;&lt;br&gt;
Laravel ti offre una soluzione elegante: le &lt;strong&gt;Form Request class&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧠 Perché usare le Form Request?
&lt;/h3&gt;

&lt;p&gt;✅ Separano la logica di validazione dal controller&lt;br&gt;&lt;br&gt;
✅ Rendono il codice più leggibile e manutenibile&lt;br&gt;&lt;br&gt;
✅ Permettono autorizzazioni e logica custom&lt;br&gt;&lt;br&gt;
✅ Perfette per progetti professionali&lt;/p&gt;


&lt;h3&gt;
  
  
  ✨ Creazione di una Form Request
&lt;/h3&gt;

&lt;p&gt;Per creare una request personalizzata, usa Artisan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:request StorePostRequest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laravel genererà una classe in &lt;code&gt;app/Http/Requests&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛡️ Autorizzazione
&lt;/h3&gt;

&lt;p&gt;Nel metodo &lt;code&gt;authorize()&lt;/code&gt; puoi controllare se l’utente è autorizzato a eseguire l’azione:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;authorize&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// o true se vuoi bypassare&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧾 Regole di validazione
&lt;/h3&gt;

&lt;p&gt;Nel metodo &lt;code&gt;rules()&lt;/code&gt; definisci le regole:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;array&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="s1"&gt;'title'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'required|string|max:255'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'content'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'required|min:10'&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;h3&gt;
  
  
  🧩 Come usarla nel controller
&lt;/h3&gt;

&lt;p&gt;Nel tuo controller, invece di usare &lt;code&gt;Request $request&lt;/code&gt;, tipizza la classe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Http\Requests\StorePostRequest&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;StorePostRequest&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Se arrivi qui, i dati sono già validati&lt;/span&gt;
    &lt;span class="nc"&gt;Post&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;validated&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;h3&gt;
  
  
  📌 Suggerimenti extra
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Usa &lt;code&gt;messages()&lt;/code&gt; per messaggi personalizzati
&lt;/li&gt;
&lt;li&gt;Usa &lt;code&gt;attributes()&lt;/code&gt; per rinominare i campi nell'errore
&lt;/li&gt;
&lt;li&gt;Puoi usare &lt;code&gt;FormRequest&lt;/code&gt; anche per API&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🇬🇧 Laravel Form Request: a practical guide
&lt;/h2&gt;

&lt;p&gt;Still validating your form data directly in your controller?&lt;br&gt;&lt;br&gt;
It’s time to &lt;strong&gt;level up&lt;/strong&gt; and embrace &lt;strong&gt;Form Request classes&lt;/strong&gt; in Laravel.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧠 Why use Form Requests?
&lt;/h3&gt;

&lt;p&gt;✅ Separates validation logic from controller&lt;br&gt;&lt;br&gt;
✅ Makes code cleaner and easier to maintain&lt;br&gt;&lt;br&gt;
✅ Supports authorization and custom logic&lt;br&gt;&lt;br&gt;
✅ A professional approach to input handling&lt;/p&gt;


&lt;h3&gt;
  
  
  ✨ Create a Form Request
&lt;/h3&gt;

&lt;p&gt;Generate a request using Artisan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:request StorePostRequest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Laravel will place the file in &lt;code&gt;app/Http/Requests&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🛡️ Authorization
&lt;/h3&gt;

&lt;p&gt;Define authorization in the &lt;code&gt;authorize()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;authorize&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// or true to allow&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧾 Validation rules
&lt;/h3&gt;

&lt;p&gt;Define your rules in the &lt;code&gt;rules()&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;array&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="s1"&gt;'title'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'required|string|max:255'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s1"&gt;'content'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'required|min:10'&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;h3&gt;
  
  
  🧩 Use in the controller
&lt;/h3&gt;

&lt;p&gt;In your controller, type-hint the custom request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Http\Requests\StorePostRequest&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;StorePostRequest&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Post&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;validated&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;h3&gt;
  
  
  📌 Extra tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Customize error messages via &lt;code&gt;messages()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rename fields in errors via &lt;code&gt;attributes()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Works great for APIs too!&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ✅ Conclusione | Conclusion
&lt;/h3&gt;

&lt;p&gt;Separare la validazione dal controller rende il tuo codice &lt;strong&gt;più chiaro, sicuro e professionale&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Separating validation from your controller makes your code &lt;strong&gt;cleaner, safer, and more professional&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Traduzione:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Translation:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>10 comandi Artisan che ogni sviluppatore Laravel dovrebbe conoscere | 10 Artisan Commands Every Laravel Developer Should Know</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Thu, 17 Jul 2025 21:16:42 +0000</pubDate>
      <link>https://forem.com/roberto_celano/10-comandi-artisan-che-ogni-sviluppatore-laravel-dovrebbe-conoscere-10-artisan-commands-every-59nc</link>
      <guid>https://forem.com/roberto_celano/10-comandi-artisan-che-ogni-sviluppatore-laravel-dovrebbe-conoscere-10-artisan-commands-every-59nc</guid>
      <description>&lt;h3&gt;
  
  
  &lt;center&gt;Introduzione | Introduction&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇮🇹 I 10 comandi Artisan più utili in Laravel
&lt;/h2&gt;

&lt;p&gt;Laravel offre una CLI potentissima: &lt;strong&gt;Artisan&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Con pochi comandi puoi generare codice, gestire il database e molto altro.&lt;/p&gt;

&lt;p&gt;Ecco una selezione dei &lt;strong&gt;10 comandi che uso più spesso e che ti consiglio di imparare subito&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  1️⃣ &lt;code&gt;php artisan route:list&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Mostra tutte le rotte definite nella tua applicazione.&lt;br&gt;&lt;br&gt;
Utilissimo per debug o quando ereditate un progetto.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ &lt;code&gt;php artisan make:model Nome -mcr&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Crea un &lt;strong&gt;model&lt;/strong&gt; con:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-m&lt;/code&gt;: migration&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-c&lt;/code&gt;: controller&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt;: resource controller
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:model Post &lt;span class="nt"&gt;-mcr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3️⃣ &lt;code&gt;php artisan migrate&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Applica tutte le migrazioni al database.&lt;/p&gt;




&lt;h3&gt;
  
  
  4️⃣ &lt;code&gt;php artisan migrate:fresh --seed&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;⚠️ Attenzione! Cancella e ricrea tutto il database, poi esegue i seeder. &lt;/p&gt;

&lt;p&gt;Perfetto in sviluppo.Non adatto in produzione.&lt;/p&gt;




&lt;h3&gt;
  
  
  5️⃣ &lt;code&gt;php artisan db:seed&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Esegue solo i seeder definiti in &lt;code&gt;DatabaseSeeder.php&lt;/code&gt; (o altri).&lt;/p&gt;




&lt;h3&gt;
  
  
  6️⃣ &lt;code&gt;php artisan tinker&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Avvia una console interattiva dove puoi testare comandi Laravel, fare query sui modelli e molto altro. &lt;/p&gt;

&lt;p&gt;Perfetto per debug e prove rapide.&lt;/p&gt;




&lt;h3&gt;
  
  
  7️⃣ &lt;code&gt;php artisan make:request NomeRequest&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Crea una classe di validazione personalizzata.&lt;br&gt;&lt;br&gt;
Ottimo per validare le richieste &lt;code&gt;POST&lt;/code&gt; o &lt;code&gt;PUT&lt;/code&gt; in modo ordinato.&lt;/p&gt;




&lt;h3&gt;
  
  
  8️⃣ &lt;code&gt;php artisan config:cache&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Ricompila i file di configurazione e migliora le performance.&lt;br&gt;&lt;br&gt;
Utile dopo modifiche nei file &lt;code&gt;.env&lt;/code&gt; o in &lt;code&gt;config/&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  9️⃣ &lt;code&gt;php artisan storage:link&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Crea il link simbolico necessario per accedere ai file pubblici caricati (es. immagini).&lt;br&gt;&lt;br&gt;
Assicura che i file in &lt;code&gt;storage/app/public&lt;/code&gt; siano accessibili da &lt;code&gt;public/storage&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔟 &lt;code&gt;php artisan make:middleware NomeMiddleware&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Crea un middleware.&lt;br&gt;&lt;br&gt;
Perfetto per logica personalizzata come permessi, ruoli, filtri IP, ecc.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Conclusione
&lt;/h2&gt;

&lt;p&gt;Imparare a usare Artisan &lt;strong&gt;ti velocizza il lavoro&lt;/strong&gt; e ti rende &lt;strong&gt;più produttivo&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Non serve ricordare tutto a memoria, ma sapere &lt;strong&gt;cosa puoi fare&lt;/strong&gt; è già metà dell’opera.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇬🇧 10 Artisan Commands Every Laravel Developer Should Know
&lt;/h2&gt;

&lt;p&gt;Laravel offers a powerful CLI: &lt;strong&gt;Artisan&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
With just a few commands, you can generate code, manage the DB, and speed up your workflow.&lt;/p&gt;

&lt;p&gt;Here’s a selection of the &lt;strong&gt;10 Artisan commands I use most often&lt;/strong&gt; — and that you should know as well.&lt;/p&gt;




&lt;h3&gt;
  
  
  1️⃣ &lt;code&gt;php artisan route:list&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Displays all routes defined in your application.&lt;br&gt;&lt;br&gt;
Extremely useful for debugging or understanding legacy projects.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ &lt;code&gt;php artisan make:model Name -mcr&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Creates a &lt;strong&gt;model&lt;/strong&gt; with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-m&lt;/code&gt;: migration&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-c&lt;/code&gt;: controller&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-r&lt;/code&gt;: resource controller
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:model Post &lt;span class="nt"&gt;-mcr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3️⃣ &lt;code&gt;php artisan migrate&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Applies all migrations to the database.&lt;/p&gt;




&lt;h3&gt;
  
  
  4️⃣ &lt;code&gt;php artisan migrate:fresh --seed&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Warning!&lt;/strong&gt; This command drops all tables, re-runs all migrations,and then runs the seeders. &lt;/p&gt;

&lt;p&gt;Great for development, not for production.&lt;/p&gt;




&lt;h3&gt;
  
  
  5️⃣ &lt;code&gt;php artisan db:seed&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Runs only the seeders defined in &lt;code&gt;DatabaseSeeder.php&lt;/code&gt; (or other custom ones).&lt;/p&gt;




&lt;h3&gt;
  
  
  6️⃣ &lt;code&gt;php artisan tinker&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Launches an interactive REPL where you can run Laravel commands, test model queries, or play with collections in real time.&lt;/p&gt;




&lt;h3&gt;
  
  
  7️⃣ &lt;code&gt;php artisan make:request CustomRequest&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Generates a custom request validation class.&lt;br&gt;&lt;br&gt;
Perfect for cleanly validating &lt;code&gt;POST&lt;/code&gt; or &lt;code&gt;PUT&lt;/code&gt; inputs.&lt;/p&gt;




&lt;h3&gt;
  
  
  8️⃣ &lt;code&gt;php artisan config:cache&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Rebuilds the configuration cache to boost performance.&lt;br&gt;&lt;br&gt;
Use it after changing &lt;code&gt;.env&lt;/code&gt; or &lt;code&gt;config/*.php&lt;/code&gt; files.&lt;/p&gt;




&lt;h3&gt;
  
  
  9️⃣ &lt;code&gt;php artisan storage:link&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Creates the symbolic link from &lt;code&gt;public/storage&lt;/code&gt; to &lt;code&gt;storage/app/public&lt;/code&gt;,&lt;br&gt;&lt;br&gt;
allowing access to uploaded files via browser.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔟 &lt;code&gt;php artisan make:middleware ExampleMiddleware&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Generates a new middleware class.&lt;br&gt;&lt;br&gt;
Ideal for handling custom logic like user roles, permissions, request filtering, etc.&lt;/p&gt;




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

&lt;p&gt;Learning how to use Artisan makes your workflow &lt;strong&gt;faster and more efficient&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
You don’t need to memorize everything — just knowing &lt;strong&gt;what exists&lt;/strong&gt; gives you a big advantage.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Traduzione:&lt;/strong&gt;&lt;br&gt;Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Translation:&lt;/strong&gt;&lt;br&gt;This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Django vs FastAPI: primi passi e differenze chiave | Django vs FastAPI: first steps and key differences</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Mon, 14 Jul 2025 07:14:44 +0000</pubDate>
      <link>https://forem.com/roberto_celano/django-vs-fastapi-primi-passi-e-differenze-chiave-django-vs-fastapi-first-steps-and-key-cc5</link>
      <guid>https://forem.com/roberto_celano/django-vs-fastapi-primi-passi-e-differenze-chiave-django-vs-fastapi-first-steps-and-key-cc5</guid>
      <description>&lt;h3&gt;
  
  
  &lt;center&gt;Introduzione | Introduction&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇮🇹 Italiano
&lt;/h2&gt;

&lt;p&gt;Dopo aver studiato Django per mesi, ho deciso di dare un’occhiata a &lt;strong&gt;FastAPI&lt;/strong&gt;, un framework sempre più popolare nel mondo Python.&lt;br&gt;&lt;br&gt;
Non ho ancora usato FastAPI in progetti reali, ma ho cominciato a esplorarlo per capirne la filosofia e le differenze rispetto a Django.&lt;/p&gt;

&lt;p&gt;Questo articolo raccoglie i miei &lt;strong&gt;primi appunti, impressioni e confronti&lt;/strong&gt; — pensato soprattutto per chi, come me, arriva da Django.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 1. Approccio minimalista (ma potente)
&lt;/h3&gt;

&lt;p&gt;La prima cosa che colpisce è quanto FastAPI sia &lt;strong&gt;snello&lt;/strong&gt;. Niente ORM integrato, niente admin, niente sistema di template: solo ciò che serve per costruire API in modo rapido e moderno.&lt;/p&gt;

&lt;p&gt;In Django sei abituato ad avere tutto preconfigurato. In FastAPI, invece, sei tu a decidere cosa usare e come integrarlo.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 2. Le performance sono davvero notevoli
&lt;/h3&gt;

&lt;p&gt;FastAPI si basa su &lt;strong&gt;Starlette&lt;/strong&gt; e supporta nativamente &lt;strong&gt;async/await&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Questo significa prestazioni molto elevate, soprattutto per API ad alta concorrenza. Anche solo lanciare l’app con &lt;code&gt;uvicorn&lt;/code&gt; ti dà subito la sensazione di velocità.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 3. La tipizzazione è protagonista
&lt;/h3&gt;

&lt;p&gt;Una delle cose più interessanti è l’uso dei &lt;strong&gt;type hints&lt;/strong&gt; Python per generare automaticamente:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;validazioni&lt;/li&gt;
&lt;li&gt;documentazione OpenAPI/Swagger&lt;/li&gt;
&lt;li&gt;suggerimenti editor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Questo è un punto di forza enorme rispetto a Django, dove la tipizzazione è molto più limitata.&lt;/p&gt;




&lt;h3&gt;
  
  
  📁 4. Manca l'admin, ma puoi costruirlo
&lt;/h3&gt;

&lt;p&gt;In Django è facilissimo usare l’admin per gestire i modelli. FastAPI non ha nulla del genere integrato.&lt;br&gt;&lt;br&gt;
Ma puoi collegarlo a &lt;strong&gt;Tortoise ORM&lt;/strong&gt;, &lt;strong&gt;SQLModel&lt;/strong&gt; o altri tool, e persino creare una tua interfaccia admin con un frontend custom.&lt;/p&gt;




&lt;h3&gt;
  
  
  👨‍💻 5. La curva di apprendimento è strana (facile e difficile allo stesso tempo)
&lt;/h3&gt;

&lt;p&gt;FastAPI sembra semplice all’inizio: poche righe e l’API funziona.&lt;br&gt;&lt;br&gt;
Ma quando cerchi di costruire un'app completa, ti accorgi che serve &lt;strong&gt;strutturare bene&lt;/strong&gt; il codice, scegliere ORM, strumenti di migrazione, gestione delle rotte... È un po’ come partire con Flask, ma moderno.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧭 Conclusione
&lt;/h3&gt;

&lt;p&gt;FastAPI mi ha colpito per la &lt;strong&gt;velocità, flessibilità e modernità&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Non è un sostituto diretto di Django (soprattutto per progetti fullstack), ma è perfetto per microservizi, API REST e architetture moderne.&lt;/p&gt;

&lt;p&gt;Il mio prossimo obiettivo? Creare un piccolo progetto API con autenticazione e database per metterlo alla prova sul campo.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇬🇧 English
&lt;/h2&gt;

&lt;p&gt;After months of studying Django, I decided to take a look at &lt;strong&gt;FastAPI&lt;/strong&gt;, a framework that's becoming increasingly popular in the Python world.&lt;br&gt;&lt;br&gt;
I haven’t used FastAPI in real-world projects yet, but I’ve started exploring it to understand its philosophy and how it compares to Django.&lt;/p&gt;

&lt;p&gt;This post summarizes my &lt;strong&gt;first notes, impressions, and comparisons&lt;/strong&gt; — especially for those coming from Django like me.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧠 1. A minimalist (yet powerful) approach
&lt;/h3&gt;

&lt;p&gt;The first thing that struck me was how &lt;strong&gt;lightweight&lt;/strong&gt; FastAPI is.&lt;br&gt;&lt;br&gt;
No built-in ORM, no admin interface, no template engine — just the essentials for building APIs quickly and cleanly.&lt;/p&gt;

&lt;p&gt;With Django, everything is preconfigured. With FastAPI, you get to decide what to use and how to structure your project.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 2. Performance really stands out
&lt;/h3&gt;

&lt;p&gt;FastAPI is built on &lt;strong&gt;Starlette&lt;/strong&gt; and supports &lt;strong&gt;async/await&lt;/strong&gt; out of the box.&lt;br&gt;&lt;br&gt;
This leads to excellent performance, especially for concurrent API calls.&lt;br&gt;&lt;br&gt;
Even just launching the app with &lt;code&gt;uvicorn&lt;/code&gt; feels fast.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 3. Type hints play a central role
&lt;/h3&gt;

&lt;p&gt;One of the coolest things is the use of &lt;strong&gt;Python type hints&lt;/strong&gt; to automatically generate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;validation&lt;/li&gt;
&lt;li&gt;OpenAPI/Swagger docs&lt;/li&gt;
&lt;li&gt;editor autocomplete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a huge plus compared to Django, where typing is more limited.&lt;/p&gt;




&lt;h3&gt;
  
  
  📁 4. No admin panel, but you can build it
&lt;/h3&gt;

&lt;p&gt;Django’s admin is incredibly convenient. FastAPI doesn’t have one.&lt;br&gt;&lt;br&gt;
However, you can integrate it with &lt;strong&gt;Tortoise ORM&lt;/strong&gt;, &lt;strong&gt;SQLModel&lt;/strong&gt;, or even build your own custom admin interface.&lt;/p&gt;




&lt;h3&gt;
  
  
  👨‍💻 5. The learning curve is weird (easy and hard at once)
&lt;/h3&gt;

&lt;p&gt;FastAPI feels easy at first: a few lines and your API is working.&lt;br&gt;&lt;br&gt;
But when you try building a complete app, you quickly realize you need to &lt;strong&gt;structure things well&lt;/strong&gt;, choose your ORM, set up migrations, route management…&lt;br&gt;&lt;br&gt;
It feels a bit like Flask, but more modern.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧭 Conclusion
&lt;/h3&gt;

&lt;p&gt;FastAPI impressed me with its &lt;strong&gt;speed, flexibility, and modern design&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
It’s not a 1-to-1 replacement for Django, especially for fullstack apps, but it’s ideal for microservices, REST APIs, and modern architectures.&lt;/p&gt;

&lt;p&gt;My next goal? Build a small API project with auth and a database to test it in the real world.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Traduzione:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>backend</category>
      <category>learning</category>
    </item>
    <item>
      <title>5 lezioni che ho imparato con Django (che nessuno dice) | 5 lessons I learned with Django (no one tells you)</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Fri, 11 Jul 2025 08:19:24 +0000</pubDate>
      <link>https://forem.com/roberto_celano/5-lezioni-che-ho-imparato-con-django-che-nessuno-dice-5-lessons-i-learned-with-django-no-one-4fik</link>
      <guid>https://forem.com/roberto_celano/5-lezioni-che-ho-imparato-con-django-che-nessuno-dice-5-lessons-i-learned-with-django-no-one-4fik</guid>
      <description>&lt;h3&gt;
  
  
  &lt;center&gt;Introduzione | Introduction&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇮🇹 Italiano
&lt;/h2&gt;

&lt;p&gt;Quando ho iniziato a studiare Django venivo da un background classico PHP/MySQL, e all’inizio ho pensato: "Va bene, è solo un altro framework." Poi ho capito quanto fosse diverso l’approccio di Django. In questo post voglio condividere &lt;strong&gt;5 cose che ho imparato studiandolo da zero&lt;/strong&gt;, che potrebbero essere utili a chi si avvicina per la prima volta a questo potente framework.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;Il sistema delle migrazioni è potente, ma va capito&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;All'inizio pensavo che bastasse modificare un modello e lanciare &lt;code&gt;makemigrations&lt;/code&gt; + &lt;code&gt;migrate&lt;/code&gt; per sistemare tutto. In realtà, se non si ha chiaro come funzionano le migrazioni, si rischia di compromettere la struttura del database. Ho imparato a non sottovalutare il comando &lt;code&gt;showmigrations&lt;/code&gt; e a usare con attenzione &lt;code&gt;--fake&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Le view non sono controller: sono più flessibili (ma serve disciplina)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In Django non esistono veri controller come in altri framework MVC. Le view possono essere funzioni o classi, e questa libertà è un’arma a doppio taglio: puoi fare quasi tutto, ma se non sei ordinato diventa un caos. Ho iniziato a usare le &lt;strong&gt;CBV (Class-Based Views)&lt;/strong&gt; solo dopo aver capito bene le &lt;strong&gt;FBV (Function-Based Views)&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Il sistema di template è semplice... finché non ti servono cose complesse&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Il template engine di Django è chiaro, ma appena vuoi fare qualcosa di più dinamico (cicli annidati, logica condizionale complessa), capisci che non è pensato per “pensare troppo”. Django ti spinge a &lt;strong&gt;mantenere la logica nel backend&lt;/strong&gt; e non nel template. Una scelta saggia, seppur limitante.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;La shell interattiva è la tua migliore amica&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;python manage.py shell&lt;/code&gt; è uno strumento potentissimo per testare rapidamente modelli, query e oggetti. All’inizio la ignoravo, ma poi l’ho usata per risolvere bug, capire il comportamento dei manager, e fare esperimenti con i dati. È come avere un laboratorio sempre a disposizione.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;L’admin è magico, ma non è la tua dashboard&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;L’admin di Django è fenomenale per il debug e la gestione veloce dei dati, ma non è pensato per l’utente finale. All’inizio volevo usarlo come “backend admin”, ma poi ho capito che per il pannello vero serve &lt;strong&gt;una dashboard personalizzata&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  🎯 Conclusione
&lt;/h3&gt;

&lt;p&gt;Studiare Django è stato più che imparare un framework: è stato cambiare mentalità. Django impone ordine, struttura, e un modo preciso di pensare al backend. È stato difficile all’inizio, ma ora non ne farei a meno.&lt;/p&gt;

&lt;p&gt;Se stai iniziando, il mio consiglio è: &lt;strong&gt;non saltare i concetti base&lt;/strong&gt;, soprattutto modelli, migrazioni e view. Ti ringrazierai più avanti.&lt;/p&gt;




&lt;h2&gt;
  
  
  🇬🇧 English
&lt;/h2&gt;

&lt;p&gt;When I started studying Django, I came from a classic PHP/MySQL background, and at first I thought, "Alright, just another framework." Then I realized how different Django's philosophy is. In this post I’ll share &lt;strong&gt;5 things I learned while studying Django from scratch&lt;/strong&gt;, which might help anyone starting out with this powerful framework.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;The migration system is powerful, but you need to understand it&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At first, I thought modifying a model and running &lt;code&gt;makemigrations&lt;/code&gt; + &lt;code&gt;migrate&lt;/code&gt; would fix everything. In reality, if you don’t understand how migrations work, you can mess up your database structure. I learned not to underestimate &lt;code&gt;showmigrations&lt;/code&gt; and to use &lt;code&gt;--fake&lt;/code&gt; cautiously.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Views are not controllers: they’re flexible (but require discipline)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Django doesn’t have traditional controllers like other MVC frameworks. Views can be functions or classes, which gives you flexibility — but also chaos if you’re not disciplined. I only started using &lt;strong&gt;Class-Based Views (CBVs)&lt;/strong&gt; after understanding &lt;strong&gt;Function-Based Views (FBVs)&lt;/strong&gt; well.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;The template system is simple... until you need complex logic&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Django’s template engine is clear, but as soon as you want to do nested loops or advanced conditions, you realize it’s not built for “heavy thinking.” Django encourages you to &lt;strong&gt;keep logic in the backend&lt;/strong&gt;, which is wise, though sometimes limiting.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;The interactive shell is your best friend&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;python manage.py shell&lt;/code&gt; is a powerful tool to test models, queries, and objects quickly. I ignored it at first, but later used it to fix bugs, explore model behavior, and experiment with data. It’s like having a lab at your fingertips.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;The admin is magical, but it’s not your dashboard&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Django’s admin is great for debugging and quick data management, but it’s not designed for end users. At first I wanted to use it as an “admin panel,” but eventually realized you need a &lt;strong&gt;custom dashboard&lt;/strong&gt; for that.&lt;/p&gt;




&lt;h3&gt;
  
  
  🎯 Conclusion
&lt;/h3&gt;

&lt;p&gt;Studying Django wasn’t just about learning a framework — it was a mindset shift. Django enforces order, structure, and a precise way of thinking about the backend. It was tough at first, but now I wouldn’t go back.&lt;/p&gt;

&lt;p&gt;If you’re starting out, my advice is: &lt;strong&gt;don’t skip the fundamentals&lt;/strong&gt;, especially models, migrations, and views. Your future self will thank you.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Traduzione:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>learning</category>
      <category>backend</category>
    </item>
    <item>
      <title>📲 Canale WhatsApp per devs | 📲 WhatsApp channel for developers</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Thu, 10 Jul 2025 21:27:16 +0000</pubDate>
      <link>https://forem.com/roberto_celano/canale-whatsapp-per-devs-whatsapp-channel-for-developers-58ad</link>
      <guid>https://forem.com/roberto_celano/canale-whatsapp-per-devs-whatsapp-channel-for-developers-58ad</guid>
      <description>&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;  

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;




&lt;p&gt;🇮🇹 Italiano&lt;/p&gt;

&lt;p&gt;Negli ultimi mesi ho iniziato a condividere devlog, trucchi di codice, progetti personali e risorse utili tramite un nuovo canale WhatsApp che ho chiamato “Dev Logs”.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 L’idea è semplice: condividere contenuti utili e ispirazionali in pochi secondi, direttamente dove molti di noi già passano tempo — su WhatsApp.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Nel canale troverai:&lt;/p&gt;

&lt;p&gt;🧠 Tips rapidi su Laravel, React, Bootstrap, ecc.&lt;/p&gt;

&lt;p&gt;💡 Tool, estensioni e plugin che uso ogni giorno&lt;/p&gt;

&lt;p&gt;📆 Devlog settimanali dei progetti su cui sto lavorando&lt;/p&gt;

&lt;p&gt;🎁 Risorse gratuite, checklist e mini-template&lt;/p&gt;

&lt;p&gt;🔍 Piccole riflessioni sulla vita da developer freelance&lt;/p&gt;

&lt;p&gt;Per chi è questo canale?&lt;/p&gt;

&lt;p&gt;Per chiunque sia:&lt;/p&gt;

&lt;p&gt;All’inizio del percorso come dev&lt;/p&gt;

&lt;p&gt;In cerca di ispirazione o motivazione&lt;/p&gt;

&lt;p&gt;Curioso di vedere cosa c’è “dietro le quinte” di un ecosistema dev&lt;/p&gt;

&lt;p&gt;📲 Vuoi unirti?&lt;br&gt;
Ecco il link diretto al canale WhatsApp:&lt;br&gt;
👇🏻 &lt;a href="https://whatsapp.com/channel/0029VbBAPWsGzzKYHKTOgw1E" rel="noopener noreferrer"&gt;https://whatsapp.com/channel/0029VbBAPWsGzzKYHKTOgw1E&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🇬🇧 English&lt;/p&gt;

&lt;p&gt;In the last few months, I’ve started sharing devlogs, code tricks, personal projects, and useful resources through a new WhatsApp channel I named “Dev Logs”.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🎯 The idea is simple: to share useful and inspirational content in seconds, directly on WhatsApp — where many of us already spend time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the channel, you’ll find:&lt;/p&gt;

&lt;p&gt;🧠 Quick tips on Laravel, React, Bootstrap, and more&lt;/p&gt;

&lt;p&gt;💡 Tools, extensions and plugins I use daily&lt;/p&gt;

&lt;p&gt;📆 Weekly devlogs of the projects I’m building&lt;/p&gt;

&lt;p&gt;🎁 Free resources, checklists and mini-templates&lt;/p&gt;

&lt;p&gt;🔍 Thoughts on life as a freelance developer&lt;/p&gt;

&lt;p&gt;Who is this channel for?&lt;/p&gt;

&lt;p&gt;Anyone who is:&lt;/p&gt;

&lt;p&gt;Starting out as a developer&lt;/p&gt;

&lt;p&gt;Looking for inspiration or motivation&lt;/p&gt;

&lt;p&gt;Curious about what’s behind the scenes of a dev ecosystem&lt;/p&gt;

&lt;p&gt;📲 Want to join?&lt;br&gt;
Here’s the direct link to the WhatsApp channel:&lt;br&gt;
👇🏻 &lt;a href="https://whatsapp.com/channel/0029VbBAPWsGzzKYHKTOgw1E" rel="noopener noreferrer"&gt;https://whatsapp.com/channel/0029VbBAPWsGzzKYHKTOgw1E&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Traduzione:&lt;br&gt;
Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>freelance</category>
      <category>development</category>
    </item>
    <item>
      <title>🎉 Unisciti al nostro nuovo server Discord per sviluppatori! 🎉 Join our new Discord server for developers!</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Tue, 24 Jun 2025 11:15:15 +0000</pubDate>
      <link>https://forem.com/roberto_celano/unisciti-al-nostro-nuovo-server-discord-per-sviluppatori-join-our-new-discord-server-for-5h8j</link>
      <guid>https://forem.com/roberto_celano/unisciti-al-nostro-nuovo-server-discord-per-sviluppatori-join-our-new-discord-server-for-5h8j</guid>
      <description>&lt;h3&gt;
  
  
  &lt;center&gt;👋 Benvenuti! | Welcome!&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ho creato un nuovo server Discord chiamato &lt;strong&gt;Web Dev &amp;amp; Tech Community&lt;/strong&gt;, pensato per sviluppatori, studenti, designer e appassionati di tecnologia. È uno spazio accogliente, dove puoi confrontarti con altri dev, condividere idee e crescere insieme.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cosa trovi nel server:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Canali dedicati a HTML, CSS, JavaScript, PHP, React, Python e altro&lt;/li&gt;
&lt;li&gt;Aiuto e confronto sui progetti personali&lt;/li&gt;
&lt;li&gt;Discussioni tech, articoli, risorse e tool utili&lt;/li&gt;
&lt;li&gt;Collaborazioni su progetti open source&lt;/li&gt;
&lt;li&gt;Canale per mostrare i tuoi progetti e ricevere feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Link per entrare:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://discord.gg/txUmXrRW7g" rel="noopener noreferrer"&gt;https://discord.gg/txUmXrRW7g&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scrivimi pure se vuoi contribuire come moderatore o aiutarmi a far crescere la community 💪&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;English:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I’ve created a new Discord server called &lt;strong&gt;Web Dev &amp;amp; Tech Community&lt;/strong&gt;, aimed at developers, students, designers and tech lovers. It’s a friendly space to connect with other devs, share ideas and grow together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you’ll find inside:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Channels for HTML, CSS, JavaScript, PHP, React, Python and more&lt;/li&gt;
&lt;li&gt;Help and feedback on personal projects&lt;/li&gt;
&lt;li&gt;Tech talks, articles, resources and useful tools&lt;/li&gt;
&lt;li&gt;Open-source collaboration&lt;/li&gt;
&lt;li&gt;A place to showcase your work and get feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌 &lt;strong&gt;Join here:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://discord.gg/txUmXrRW7g" rel="noopener noreferrer"&gt;https://discord.gg/txUmXrRW7g&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to message me if you’d like to help as a moderator or support the community growth 💪&lt;/p&gt;

</description>
      <category>discord</category>
      <category>community</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduzione alla Programmazione in Java: Guida per Principianti | Introduction to Java Programming: A Beginner's Guide</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Sun, 12 Jan 2025 21:16:33 +0000</pubDate>
      <link>https://forem.com/roberto_celano/introduzione-alla-programmazione-in-java-guida-per-principianti-introduction-to-java-884</link>
      <guid>https://forem.com/roberto_celano/introduzione-alla-programmazione-in-java-guida-per-principianti-introduction-to-java-884</guid>
      <description>&lt;blockquote&gt;
&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;center&gt;Versione Italiana&lt;/center&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;br&gt;Introduzione alla Programmazione in Java: Guida per Principianti&lt;/strong&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;&lt;center&gt;Introduzione&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Java è uno dei linguaggi di programmazione più popolari e utilizzati al mondo. Con la sua natura multipiattaforma, è ampiamente usato nello sviluppo di applicazioni desktop, mobile, web e persino IoT (Internet of Things). In questa guida, esploreremo i concetti fondamentali di Java, come configurare l'ambiente di sviluppo e scrivere il tuo primo programma.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;1. Cos'è Java?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Java è un linguaggio di programmazione &lt;strong&gt;orientato agli oggetti&lt;/strong&gt; e &lt;strong&gt;multipiattaforma&lt;/strong&gt;, il che significa che un programma scritto in Java può essere eseguito su qualsiasi sistema operativo che supporti la Java Virtual Machine (JVM). È stato progettato per essere:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semplice&lt;/strong&gt;: La sintassi è chiara e facile da apprendere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portabile&lt;/strong&gt;: Scrivi il codice una volta, eseguilo ovunque (principio "Write Once, Run Anywhere").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sicuro&lt;/strong&gt;: Include funzionalità avanzate per la gestione della sicurezza.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performante&lt;/strong&gt;: Con ottimizzazioni JVM, Java può eseguire operazioni complesse rapidamente.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Installare l'Ambiente di Sviluppo&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Prima di iniziare a programmare in Java, dobbiamo configurare il nostro ambiente.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 1: Installare il JDK&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Il &lt;strong&gt;Java Development Kit (JDK)&lt;/strong&gt; contiene tutti gli strumenti necessari per scrivere ed eseguire programmi Java. Puoi scaricarlo dal sito ufficiale di Oracle:&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Step 2: Configurare l'IDE&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Un IDE (Integrated Development Environment) semplifica la scrittura e il debug del codice. Alcuni IDE popolari per Java includono:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IntelliJ IDEA&lt;/strong&gt; (raccomandato per i principianti)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eclipse&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NetBeans&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Step 3: Configurare le Variabili di Ambiente&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Aggiungi il percorso del JDK alla variabile di ambiente &lt;code&gt;JAVA_HOME&lt;/code&gt; e aggiorna il &lt;code&gt;PATH&lt;/code&gt; per eseguire i comandi Java dal terminale.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;3. Scrivere il Primo Programma in Java&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Ecco un esempio di un semplice programma Java che stampa "Ciao, mondo!" sulla console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HelloWorld&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Ciao, mondo!"&lt;/span&gt;&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;
  
  
  &lt;strong&gt;&lt;br&gt;&lt;center&gt;Spiegazione del Codice&lt;/center&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;public class HelloWorld&lt;/strong&gt;: Definisce una classe pubblica chiamata HelloWorld.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;public static void main(String[] args)&lt;/strong&gt;: È il punto di ingresso del programma.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System.out.println&lt;/strong&gt;: Stampa il testo tra virgolette sulla console.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. Eseguire il Programma&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Per eseguire il tuo programma:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Salva il file come HelloWorld.java.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Apri il terminale, vai nella directory del file e compila il codice:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;javac HelloWorld.java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Esegui il programma compilato:
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;p&gt;Vedrai il messaggio Ciao, mondo! stampato sulla console.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. Concetti Chiave di Java&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Variabili e Tipi di Dati&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Le variabili sono utilizzate per memorizzare dati. Esempio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;numero&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Intero&lt;/span&gt;
&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;prezzo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;19.99&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Numero decimale&lt;/span&gt;
&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;nome&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Roberto"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Testo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Condizioni&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Esempio di una struttura if-else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numero&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Il numero è maggiore di 5"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Il numero è minore o uguale a 5"&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;p&gt;&lt;strong&gt;Cicli&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Esempio di un ciclo for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Valore di i: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&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;h2&gt;
  
  
  &lt;strong&gt;&lt;center&gt;Conclusione&lt;/center&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Java è un linguaggio versatile e potente, ideale per chi vuole iniziare a programmare. Con una solida comprensione dei concetti di base, sei pronto per esplorare argomenti più avanzati come la programmazione orientata agli oggetti, i framework e molto altro.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;center&gt;English Version&lt;/center&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;br&gt;Introduction to Java Programming: A Beginner's Guide&lt;/strong&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;br&gt;&lt;center&gt;Introduction&lt;/center&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Java is one of the most popular and widely used programming languages in the world. With its cross-platform nature, it is extensively used in desktop, mobile, web, and even IoT (Internet of Things) applications. In this guide, we’ll explore the fundamental concepts of Java, how to set up your development environment, and how to write your first program.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;1. What is Java?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Java is an &lt;strong&gt;object-oriented&lt;/strong&gt; and &lt;strong&gt;cross-platform programming language&lt;/strong&gt;, which means that a program written in Java can run on any operating system that supports the Java Virtual Machine (JVM). It is designed to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple&lt;/strong&gt;: The syntax is clear and easy to learn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portable&lt;/strong&gt;: Write the code once, run it anywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure&lt;/strong&gt;: Includes advanced security features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performant&lt;/strong&gt;: With JVM optimizations, Java can execute complex operations quickly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Setting Up the Development Environment&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;br&gt;Step 1: Install the JDK&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The Java Development Kit (JDK) contains all the tools needed to write and run Java programs. You can download it from Oracle’s official site:&lt;br&gt;
&lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Step 2: Set Up the IDE&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;An IDE (Integrated Development Environment) simplifies writing and debugging code. Popular Java IDEs include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IntelliJ IDEA&lt;/strong&gt; (recommended for beginners)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eclipse&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NetBeans&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Step 3: Configure Environment Variables&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Add the JDK path to the &lt;code&gt;JAVA_HOME&lt;/code&gt; environment variable and update the &lt;code&gt;PATH&lt;/code&gt; to run Java commands from the terminal.&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;3. Writing Your First Java Program&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here’s an example of a simple Java program that prints "Hello, World!" to the console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HelloWorld&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, World!"&lt;/span&gt;&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;
  
  
  &lt;strong&gt;&lt;br&gt;&lt;center&gt;Code Explanation&lt;/center&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;public class HelloWorld&lt;/strong&gt;: Defines a public class named HelloWorld.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;public static void main(String[] args)&lt;/strong&gt;: The program's entry point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System.out.println&lt;/strong&gt;: Prints the text between quotes to the console.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. Running Your Program&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;To run your program:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Save the file as HelloWorld.java.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the terminal, navigate to the file directory, and compile the code:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;javac HelloWorld.java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Execute the compiled program:
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;p&gt;You will see the message Hello, World! printed on the console.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. Key Concepts in Java&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Variables and Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables are used to store data. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Integer&lt;/span&gt;
&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;19.99&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Decimal number&lt;/span&gt;
&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Roberto"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Text&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conditions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example of an if-else statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The number is greater than 5"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The number is 5 or less"&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;p&gt;&lt;strong&gt;Loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example of a for loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Value of i: "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;i&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;h2&gt;
  
  
  &lt;strong&gt;&lt;center&gt;Conclusion&lt;/center&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Java is a versatile and powerful language, perfect for those starting their programming journey. With a solid understanding of the basics, you’re ready to explore more advanced topics like object-oriented programming, frameworks, and much more.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;center&gt;Traduzione | Translation&lt;/center&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>java</category>
      <category>webdev</category>
      <category>programming</category>
      <category>coding</category>
    </item>
    <item>
      <title>Guida all'Uso di Git e GitHub per Principianti | Getting Started with Git and GitHub: A Beginner's Guide</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Mon, 28 Oct 2024 00:40:31 +0000</pubDate>
      <link>https://forem.com/roberto_celano/guida-alluso-di-git-e-github-per-principianti-getting-started-with-git-and-github-a-beginners-guide-23p1</link>
      <guid>https://forem.com/roberto_celano/guida-alluso-di-git-e-github-per-principianti-getting-started-with-git-and-github-a-beginners-guide-23p1</guid>
      <description>&lt;blockquote&gt;
&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Italiano:&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;br&gt;
&lt;strong&gt;English:&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;u&gt;&lt;h4&gt;&lt;center&gt;Versione Italiana&lt;/center&gt;&lt;/h4&gt;
&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;


&lt;h3&gt;&lt;center&gt;Guida all'Uso di Git e GitHub per Principianti&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;&lt;br&gt;Per chi inizia nel mondo della programmazione e dello sviluppo software, Git e GitHub sono strumenti essenziali per la gestione del codice. In questa guida, esploreremo come installare e utilizzare Git per la gestione delle versioni e come utilizzare GitHub per collaborare su progetti, passo per passo.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Cos'è Git e Perché Utilizzarlo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git è un sistema di controllo di versione distribuito che permette di tenere traccia delle modifiche al codice e di lavorare con altri sviluppatori senza problemi. È essenziale per chiunque lavori su progetti di programmazione, in quanto offre sicurezza e organizzazione.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Installazione di Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Verifica dell'installazione&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prima di tutto, verifica se Git è già installato digitando:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Installazione&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Se non è installato, scarica Git dal sito ufficiale: &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;https://git-scm.com/downloads&lt;/a&gt; e segui le istruzioni.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Comandi di Base di Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ecco alcuni comandi essenziali per iniziare con Git:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git init&lt;/em&gt;&lt;/strong&gt;: Inizializza un nuovo repository Git.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git add &lt;/em&gt;&lt;/strong&gt;: Aggiunge un file specifico all'area di staging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git commit -m "messaggio"&lt;/em&gt;&lt;/strong&gt;: Conferma le modifiche nell'area di staging con un messaggio descrittivo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git status&lt;/em&gt;&lt;/strong&gt;: Mostra lo stato dei file nel repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git log&lt;/em&gt;&lt;/strong&gt;: Visualizza la cronologia dei commit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Esempio:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Primo commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Creazione di un Repository su GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Per lavorare con GitHub, crea un account su GitHub e accedi.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Fai clic su New repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assegna un nome al repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clicca su Create repository per generare il repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Collegare Git a GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dopo aver creato il repository, collega il repository locale a GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin 
https://github.com/username/nome-repo.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Comandi Essenziali per Collaborare su GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Per lavorare con altri, usa questi comandi:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git pull origin main&lt;/em&gt;&lt;/strong&gt;: Scarica le modifiche dal repository remoto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git push origin main&lt;/em&gt;&lt;/strong&gt;: Invia le modifiche al repository remoto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Esempio:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin main
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;







&lt;h3&gt;&lt;center&gt;Conclusione&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;Git e GitHub sono strumenti potenti per gestire il codice e collaborare su progetti. Seguendo questi passaggi, hai le basi per iniziare a usare Git e GitHub in modo efficace.&lt;/p&gt;



&lt;p&gt;&lt;u&gt;&lt;h4&gt;&lt;center&gt;English Version&lt;/center&gt;&lt;/h4&gt;
&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;


&lt;h3&gt;&lt;center&gt;Getting Started with Git and GitHub: A Beginner's Guide&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;&lt;br&gt;For those new to the world of programming and software development, Git and GitHub are essential tools for code management. In this guide, we’ll explore how to install and use Git for version control and how to use GitHub for project collaboration, step-by-step.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;What is Git and Why Use It&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git is a distributed version control system that allows you to track code changes and work with other developers seamlessly. It’s essential for anyone working on programming projects as it provides security and organization.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Installing Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check Installation&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, check if Git is already installed by typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Installation&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If it’s not installed, download Git from the official site: &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;https://git-scm.com/downloads&lt;/a&gt; and follow the instructions.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Basic Git Commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here are some essential commands to get started with Git:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git init&lt;/em&gt;&lt;/strong&gt;: Initializes a new Git repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git add &lt;/em&gt;&lt;/strong&gt;: Adds a specific file to the staging area.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git commit -m "message"&lt;/em&gt;&lt;/strong&gt;: Commits the changes in the staging area with a descriptive message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git status&lt;/em&gt;&lt;/strong&gt;: Shows the status of files in the repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git log&lt;/em&gt;&lt;/strong&gt;: Displays the commit history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"First commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Creating a Repository on GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To work with GitHub, create an account on GitHub and sign in.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click New repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give the repository a name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click Create repository to generate the repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Connecting Git to GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After creating the repository, connect the local repository to GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin 
https://github.com/username/repo-name.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Essential Commands for Collaborating on GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To work with others, use these commands:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git pull origin main&lt;/em&gt;&lt;/strong&gt;: Pull changes from the remote repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;git push origin main&lt;/em&gt;&lt;/strong&gt;: Push changes to the remote repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin main
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;







&lt;h3&gt;&lt;center&gt;Conclusion&lt;/center&gt;&lt;/h3&gt;

&lt;p&gt;Git and GitHub are powerful tools for managing code and collaborating on projects. By following these steps, you have the basics to start using Git and GitHub effectively.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Traduzione | Translation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Integrazione Bootstrap e Tailwind: Pro e Contro | Bootstrap and Tailwind: Pros and Cons</title>
      <dc:creator>Roberto Celano</dc:creator>
      <pubDate>Thu, 10 Oct 2024 20:47:05 +0000</pubDate>
      <link>https://forem.com/roberto_celano/integrazione-bootstrap-e-tailwind-pro-e-contro-bootstrap-and-tailwind-pros-and-cons-83g</link>
      <guid>https://forem.com/roberto_celano/integrazione-bootstrap-e-tailwind-pro-e-contro-bootstrap-and-tailwind-pros-and-cons-83g</guid>
      <description>&lt;blockquote&gt;
&lt;h3&gt;&lt;center&gt;Introduzione | Introduction&lt;/center&gt;&lt;/h3&gt;  

&lt;p&gt;&lt;br&gt;&lt;strong&gt;&lt;em&gt;Italiano:&lt;/em&gt;&lt;/strong&gt; Questo articolo è disponibile sia in italiano che in inglese. Scrolla verso il basso per la versione in inglese.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;English:&lt;/em&gt;&lt;/strong&gt; This article is available in both Italian and English. Scroll down for the English version.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;u&gt;&lt;h4&gt;&lt;center&gt;Versione Italiana&lt;/center&gt;&lt;/h4&gt;
&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;

&lt;h4&gt;Introduzione all'integrazione di Bootstrap e Tailwind&lt;/h4&gt;

&lt;p&gt;Negli ultimi anni, Bootstrap e Tailwind CSS sono diventati due dei framework più popolari per lo sviluppo front-end. Bootstrap è conosciuto per i suoi componenti predefiniti e la facilità di utilizzo, mentre Tailwind si distingue per il suo approccio utility-first, che offre una maggiore flessibilità nella personalizzazione del design.&lt;/p&gt;

&lt;p&gt;Ma cosa succede se decidessimo di usarli insieme nello stesso progetto? In questo articolo esploreremo le possibilità e le limitazioni di questa combinazione, valutando quando e perché potresti voler integrare entrambi i framework.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Perché potresti volerli combinare?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Combinare Bootstrap e Tailwind può sembrare ridondante, ma ci sono casi in cui può essere vantaggioso. Bootstrap accelera lo sviluppo di interfacce grazie ai suoi componenti predefiniti, mentre Tailwind ti permette di ottenere un design personalizzato senza dover sovrascrivere stili predefiniti. Potresti usare Bootstrap per parti più standard del sito (come la navbar o i form) e Tailwind per sezioni dove è richiesta una maggiore flessibilità.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Possibili problematiche e conflitti&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Una delle sfide principali nell'usare entrambi i framework è la potenziale sovrapposizione di classi CSS. Bootstrap include molti stili globali, che potrebbero entrare in conflitto con le classi utility di Tailwind. Per minimizzare questo rischio, puoi:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Personalizzare la build di Bootstrap:&lt;/em&gt; Utilizzare solo i componenti di Bootstrap che ti servono, eliminando il resto per ridurre il peso del CSS.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Purging CSS con Tailwind:&lt;/em&gt; Tailwind offre strumenti per rimuovere le classi inutilizzate, riducendo la dimensione finale del file CSS.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Strategia di implementazione&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Per gestire al meglio l'integrazione, una strategia efficace potrebbe essere quella di separare le due librerie in modo logico all'interno del progetto. Ad esempio:&lt;/p&gt;

&lt;p&gt;Utilizza Bootstrap per le strutture di base e i componenti di UI (come modali, card, e form).&lt;/p&gt;

&lt;p&gt;Utilizza Tailwind per creare stili personalizzati e flessibili, come layout complessi o elementi particolari che richiedono un controllo dettagliato sul design.&lt;/p&gt;

&lt;p&gt;Questa suddivisione ti consente di sfruttare la velocità di sviluppo di Bootstrap senza rinunciare alla personalizzazione offerta da Tailwind.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Esempio pratico: Navbar con Bootstrap, layout con Tailwind&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Un caso d'uso interessante potrebbe essere quello di utilizzare Bootstrap per la creazione di una navbar e Tailwind per il layout della pagina. La navbar, essendo un componente abbastanza standardizzato, può essere facilmente gestita con Bootstrap, mentre Tailwind può essere usato per personalizzare il layout della pagina, ottenendo un design più unico.&lt;/p&gt;




&lt;center&gt;&lt;h3&gt;Conclusione&lt;/h3&gt;&lt;/center&gt;

&lt;p&gt;In definitiva, l'integrazione di Bootstrap e Tailwind nello stesso progetto è possibile, ma richiede una pianificazione attenta. Se hai bisogno della rapidità e della struttura di Bootstrap, ma non vuoi rinunciare alla flessibilità di Tailwind, questa combinazione potrebbe essere la soluzione giusta. Assicurati di mantenere un'organizzazione chiara del CSS e di gestire le risorse in modo efficiente per evitare conflitti e migliorare le performance del sito.&lt;/p&gt;




&lt;p&gt;&lt;u&gt;&lt;h4&gt;&lt;center&gt;English Version&lt;/center&gt;&lt;/h4&gt;
&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;

&lt;h4&gt;Introduction to integrating Bootstrap and Tailwind&lt;/h4&gt;

&lt;p&gt;In recent years, Bootstrap and Tailwind CSS have become two of the most popular front-end frameworks. Bootstrap is known for its prebuilt components and ease of use, while Tailwind stands out for its utility-first approach, offering greater flexibility in design customization.&lt;/p&gt;

&lt;p&gt;But what happens if we decide to use them together in the same project? In this article, we will explore the possibilities and limitations of this combination, evaluating when and why you might want to integrate both frameworks.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Why might you want to combine them?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Combining Bootstrap and Tailwind might seem redundant, but there are cases where it can be advantageous. Bootstrap accelerates the development of interfaces thanks to its pre-built components, while Tailwind allows you to achieve a custom design without having to override predefined styles. You could use Bootstrap for more standard parts of the site (like the navbar or forms) and Tailwind for sections where more flexibility is needed.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Potential problems and conflicts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the main challenges of using both frameworks is the potential overlap of CSS classes. Bootstrap includes many global styles that could conflict with Tailwind’s utility classes. To minimize this risk, you can:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Customize Bootstrap’s build:&lt;/em&gt; Use only the Bootstrap components you need, eliminating the rest to reduce CSS bloat.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Purging CSS with Tailwind:&lt;/em&gt; Tailwind provides tools to remove unused classes, reducing the final CSS file size.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Implementation strategy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To best manage the integration, an effective strategy might be to logically separate the two libraries within the project. For example:&lt;/p&gt;

&lt;p&gt;Use Bootstrap for basic structures and UI components (like modals, cards, and forms).&lt;/p&gt;

&lt;p&gt;Use Tailwind to create custom and flexible styles, such as complex layouts or specific elements that require detailed design control.&lt;/p&gt;

&lt;p&gt;This division allows you to benefit from Bootstrap’s development speed without giving up on the customization offered by Tailwind.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Practical example: Navbar with Bootstrap, layout with Tailwind&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An interesting use case could be using Bootstrap to create a navbar and Tailwind for the page layout. The navbar, being a fairly standardized component, can be easily handled with Bootstrap, while Tailwind can be used to customize the page layout, achieving a more unique design.&lt;/p&gt;




&lt;center&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;/center&gt;

&lt;p&gt;Ultimately, integrating Bootstrap and Tailwind in the same project is possible but requires careful planning. If you need the speed and structure of Bootstrap but don't want to sacrifice the flexibility of Tailwind, this combination might be the right solution. Just be sure to keep the CSS well-organized and manage resources efficiently to avoid conflicts and improve site performance.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Traduzione:&lt;/strong&gt;&lt;br&gt;
Questo articolo è stato tradotto con l'ausilio di strumenti di traduzione professionali.&lt;br&gt;
This article was translated with the help of professional translation tools.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>css</category>
      <category>tailwindcss</category>
      <category>webdev</category>
      <category>bootstrap</category>
    </item>
  </channel>
</rss>
