<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: eleonorarocchi</title>
    <description>The latest articles on DEV Community by eleonorarocchi (@eleonorarocchi).</description>
    <link>https://dev.to/eleonorarocchi</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%2F886966%2Fe7384b4e-0bff-4739-bd9a-a796b6ef7110.png</url>
      <title>DEV Community: eleonorarocchi</title>
      <link>https://dev.to/eleonorarocchi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eleonorarocchi"/>
    <language>en</language>
    <item>
      <title>Getting Started with the Gemini API: A Practical Guide</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Fri, 03 Apr 2026 15:39:41 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/getting-started-with-the-gemini-api-a-practical-guide-3hhd</link>
      <guid>https://dev.to/eleonorarocchi/getting-started-with-the-gemini-api-a-practical-guide-3hhd</guid>
      <description>&lt;h1&gt;
  
  
  Getting Started with the Gemini API: A Practical Guide for Students
&lt;/h1&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Getting access to the Gemini API takes less than 15 minutes: a Google Cloud account, an API key, and a Python library are enough to produce your first working prompt.&lt;/li&gt;
&lt;li&gt;The free tier is sufficient for educational projects, experiments, and portfolio work: you don’t need a credit card to start building real things.&lt;/li&gt;
&lt;li&gt;The barrier to entry is lower than it seems: the difficult part is not the technical setup, but knowing what to build once the model starts responding.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Context
&lt;/h2&gt;

&lt;p&gt;Whenever a junior developer asks me how to approach AI in a practical way, my answer is always the same: stop watching YouTube tutorials and write a line of code that calls a real model.&lt;/p&gt;

&lt;p&gt;The problem is that “getting started” seems more complicated than it actually is. Dense official documentation, terminology that isn’t always clear, and the feeling that you need months of theory before touching something that actually works. That’s not the case.&lt;/p&gt;

&lt;p&gt;Google’s Gemini API is currently one of the most accessible tools for anyone who wants to take their first steps with applied artificial intelligence. It supports text, images, and code, has a real free tier, and integrates with Python in just a few minutes. It’s not the only option on the market, but for a student or someone starting from scratch it’s probably the entry point with the best balance between simplicity and power.&lt;/p&gt;

&lt;p&gt;This guide has a single goal: to take you from zero to your first working prompt in the shortest time possible.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Create an account and enable the API
&lt;/h3&gt;

&lt;p&gt;The starting point is &lt;a href="https://aistudio.google.com" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;. You don’t need to configure a full Vertex AI project to begin: AI Studio is the most direct interface for developers who want to prototype quickly.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign in with your Google account.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;AI Studio&lt;/strong&gt; and click &lt;em&gt;Get API Key&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Create a new API key or associate it with an existing Google Cloud project.&lt;/li&gt;
&lt;li&gt;Copy the key and store it safely: you’ll need it in a moment.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Operational note: never put the API key directly in your source code, especially if you’re working with Git. Use an environment variable or a &lt;code&gt;.env&lt;/code&gt; file excluded from the repository.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 2 — Install the Python library
&lt;/h3&gt;

&lt;p&gt;Open your terminal and install the official package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;google-generativeai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you work in a virtual environment (which I always recommend, even for small projects):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv gemini-env
&lt;span class="nb"&gt;source &lt;/span&gt;gemini-env/bin/activate  &lt;span class="c"&gt;# on Windows: gemini-env\Scripts\activate&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;google-generativeai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3 — Configure the API key
&lt;/h3&gt;

&lt;p&gt;The cleanest way is to use an environment variable. On Linux/macOS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key-here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Windows (PowerShell):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key-here"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can use a &lt;code&gt;.env&lt;/code&gt; file with the &lt;code&gt;python-dotenv&lt;/code&gt; library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;python-dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in the &lt;code&gt;.env&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your-key-here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4 — Write your first working prompt
&lt;/h3&gt;

&lt;p&gt;This is the moment when you stop reading guides and actually see something happen. Create a file called &lt;code&gt;first_prompt.py&lt;/code&gt; with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;contents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Explain what an API is in three simple sentences.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python first_prompt.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything is configured correctly, you’ll see a text response from the model in your terminal. This is the starting point: from here you can build anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Add a bit of structure
&lt;/h3&gt;

&lt;p&gt;Once the model responds, the next step is to make the code interactive. Here is a minimal example of a terminal chatbot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Chatbot active. Type &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;exit&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; to quit.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;history&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;user_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;exit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;

    &lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;contents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;history&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Gemini: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Twenty lines of code, a working chatbot with conversation memory. The &lt;code&gt;start_chat&lt;/code&gt; model automatically maintains message history.&lt;/p&gt;




&lt;h2&gt;
  
  
  Practical Observations
&lt;/h2&gt;

&lt;p&gt;A few things worth knowing before moving forward, which the official documentation tends to mention only in passing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About the free tier.&lt;/strong&gt; It exists and it’s real, but it has rate limits (requests per minute and per day). For small projects and prototypes this is not a problem. It becomes one if you build something that must handle continuous load or many simultaneous users. Keep an eye on your quota in the Google Cloud Console.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About choosing the model.&lt;/strong&gt; At the moment &lt;code&gt;gemini-2.5-flash&lt;/code&gt; is the best balance for beginners: fast, inexpensive (in terms of quota), and capable enough for most educational projects. &lt;code&gt;gemini-2.5-pro&lt;/code&gt; is more powerful but consumes more quota. For your first project, use Flash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About error handling.&lt;/strong&gt; API calls fail. Always, sooner or later. Quota exhausted, timeouts, unexpected responses. Get your code used to handling exceptions right away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Your prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Error during API call: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s not elegant, but it’s the bare minimum to avoid scripts crashing silently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About prompts.&lt;/strong&gt; The quality of the output depends enormously on how you formulate the request. A vague prompt produces vague answers. If you’re building a specific tool — a text analyzer, a quiz generator, a code corrector — invest time in defining the system prompt well. The difference between a mediocre result and a useful one often lies there, not in the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About API key security.&lt;/strong&gt; I repeat this because it matters: the API key is a credential. If it ends up in a public GitHub repository, someone will use it in your place and you’ll receive the bill. Use &lt;code&gt;.gitignore&lt;/code&gt; to exclude &lt;code&gt;.env&lt;/code&gt; files, and if you’ve already committed a key by mistake, revoke it immediately from Google.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gemini</category>
      <category>google</category>
    </item>
    <item>
      <title>Different types of mobile app</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Sat, 08 Jul 2023 10:09:29 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/different-types-of-mobile-app-h7k</link>
      <guid>https://dev.to/eleonorarocchi/different-types-of-mobile-app-h7k</guid>
      <description>&lt;h2&gt;
  
  
  What is an app
&lt;/h2&gt;

&lt;p&gt;Mobile applications, often simply called apps, are special software designed to run on mobile devices such as smartphones and tablets. Usually they are downloaded through the stores, or digital platforms where it is possible to access a catalog of apps that can be installed on the device in use. Surely you've heard of Apple's AppStore for iOS devices and Google Play for Android devices: these are just the most famous, but there are many others, such as the Amazon Appstore or the Huawei AppGallery. In fact, they in turn consist of an app pre-installed on the device, through which you can search for the various applications available, developed by the most diverse vendors.&lt;/p&gt;

&lt;p&gt;The stores are not the only possibility of distribution.&lt;/p&gt;

&lt;p&gt;For example, in Android systems, the apk of the app can be installed directly, downloading it from any link, for example by making it available on a website. This process, known as sideloading, can be dangerous for the end user, as the applications distributed in this way are not verified and the sources may not be reliable. At the same time it can be disadvantageous for the app owner to distribute their software in this manner because visibility and exposure are obviously reduced.&lt;/p&gt;

&lt;p&gt;There is a third way: if the app consists of a PWA (Progressive Web App), it is sufficient to open the website and add it to the Home page.&lt;/p&gt;

&lt;h2&gt;
  
  
  What types of apps can be developed
&lt;/h2&gt;

&lt;p&gt;Apps can be developed using a native, hybrid or web approach.&lt;/p&gt;

&lt;p&gt;Native development is based on specific native platforms of an operating system, mainly for iOS or for Android. The application code in this case is written using different programming languages and different development tools. For example for iOs, the programmer uses XCode from Apple, and languages like objective-c or swift; for Android instead use Android Studio and languages like Java or Kotlin. This type of choice clearly requires the separate development of an application version for each platform, but it is highly recommended when you need to offer high performance and access to all the device's features.&lt;/p&gt;

&lt;p&gt;Hybrid development streamlines development by allowing you to write code once and then compile it into a native app for each platform. The price to pay is the performance, lower than native developed apps, and limited access to the device's features. The development is very close to a web development, and can be based on different frameworks such as Ionic, React Native, Flutter or MAUI. Therefore, depending on the choice, different languages are used, for example Typescript, Dart, C#.&lt;/p&gt;

&lt;p&gt;Instead, in the case of Progressive Web Apps (PWA), we actually proceed with a development based on standard web technologies (HTML, Javascript/Typescript, CSS) but still managing to provide the user with a series of more features than a page traditional website. In fact, a PWA is also accessible offline, thanks to the pre-fetching of resources and local storage of data. It may also be able to receive push notifications, albeit with limited options compared to a native development.&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>native</category>
      <category>hybrid</category>
      <category>pwa</category>
    </item>
    <item>
      <title>AI: how to include AI in software projects</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Wed, 21 Jun 2023 20:12:37 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/ai-how-to-include-ai-in-software-projects-2ep0</link>
      <guid>https://dev.to/eleonorarocchi/ai-how-to-include-ai-in-software-projects-2ep0</guid>
      <description>&lt;p&gt;Artificial intelligence is now within everyone's reach. You don't need to be an expert in data analytics or machine learning to exploit its potential in software projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  In which areas to use AI in my software projects.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Speech Recognition to convert audio into text and to transcribe conversations or voice commands.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Artificial vision for image analysis and classify objects, detect faces, read images text (other than OCR!).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Natural language analysis and understanding, automatic translation into other languages, sentiment analysis, keyword extraction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improvement information search with Cognitive Search for greater efficiency and accuracy in information search.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creation and management of interactive knowledge bases and intelligent chatbots that can answer user questions and offer automated assistance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Which products can I use to include AI in my projects
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Speech Recognition: Amazon Polly, Microsoft Azure Cognitive Services, Google Cloud Speech-to-Text&lt;/li&gt;
&lt;li&gt; Artificial vision: Amazon Rekognition, Microsoft Azure Cognitive Services, Google Cloud Vision&lt;/li&gt;
&lt;li&gt; Knowledge: Amazon Lex, Microsoft Azure Cognitive Services, Google Dialogflow&lt;/li&gt;
&lt;li&gt; Natural language analysis: Amazon Comprehend, Amazon Translate, Microsoft Azure Cognitive Services, Google Cloud Natural Language, Google Cloud Translation &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>azure</category>
      <category>aws</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>AI: what else is in AI besides machine learning</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Thu, 15 Jun 2023 20:38:46 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/ai-what-else-is-in-ai-besides-machine-learning-16f6</link>
      <guid>https://dev.to/eleonorarocchi/ai-what-else-is-in-ai-besides-machine-learning-16f6</guid>
      <description>&lt;p&gt;Artificial intelligence is a very ample field, its birth is not as recent as one thinks, however it is constantly evolving. We talked about machine learning in a &lt;a href="https://dev.to/eleonorarocchi/ai-what-is-machine-learning-472n"&gt;previous article&lt;/a&gt;, which is one of the fields of AI, but it is only one.&lt;/p&gt;

&lt;p&gt;We have said that artificial intelligence is a field of study that deals with developing systems or machines capable of performing activities as human intelligence would perform them, i.e. reasoning, learning, applying problem-solving and making decisions.&lt;/p&gt;

&lt;p&gt;Machine learning is a specific approach to AI that focuses on the ability of a machine to learn from data without being explicitly programmed. In fact, algorithms and training data are provided so that the machine learns from them so as to make predictions or make decisions based on this data. Machine learning relies on identifying patterns and trends in data and using algorithms to adjust and improve model performance based on those patterns.&lt;/p&gt;

&lt;p&gt;However, there are other approaches, let's see some of them together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Symbolic logic
&lt;/h2&gt;

&lt;p&gt;This approach is based on formal logic, that is a branch of logic which, rather than on the meaning of prepositions or their semantic content, analyzes their structure and the relationships between them.&lt;/p&gt;

&lt;p&gt;Formal logic is also called symbolic logic, precisely because it involves representing prepositions with symbols and using logical connectors to connect them.&lt;/p&gt;

&lt;p&gt;Through the rules of logic, new prepositions can then be derived from existing ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule-based reasoning
&lt;/h2&gt;

&lt;p&gt;In this case, rules are predefined so as to define specific actions to be taken when certain situations occur.&lt;/p&gt;

&lt;p&gt;These are logical rules, which link premises to actions or conclusions.&lt;/p&gt;

&lt;p&gt;The AI system applies these rules to the available inputs, thus evaluating the conditions and determining which rules are satisfied, then performs the corresponding actions associated with the satisfied rules.&lt;/p&gt;

&lt;p&gt;This approach is preferable when there is great knowledge of the application domain. Conversely it is not particularly suitable for very complex or ambiguous situations, when the conditions are not deterministic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Neural networks
&lt;/h2&gt;

&lt;p&gt;This approach uses a network of nodes, called neurons, connected to each other with the aim of exchanging information through weighted connections, where the associated weight represents the importance of that connection in the processing process.&lt;/p&gt;

&lt;p&gt;Neurons are organized into layers, usually divided into three main parts: the input layer, the (optional) hidden layers, and the output layer.&lt;/p&gt;

&lt;p&gt;The training takes place by alternating two phases.&lt;/p&gt;

&lt;p&gt;Input data is presented to the neural network through the input layer, from here each neuron in a subsequent layer receives inputs from neurons in previous layers, processes them and produces an output using an activation function, so up to the output layer , which provides the final result of the network. This phase is called &lt;em&gt;forward propagation&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Once the output is obtained, the discrepancy between the expected output and the desired output value is calculated. This error is then back-propagated through the network, changing connection weights to reduce it. Consequently, during this phase, the weights of the connections are updated based on the extent of the error committed. This phase is called &lt;em&gt;backpropagation&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The two phases are repeated for a certain number of iterations to ensure that the neural network learns and improves its performance.&lt;/p&gt;

&lt;p&gt;Neural networks are used to make predictions or decisions about new input data.&lt;/p&gt;

&lt;p&gt;This approach is widely used in image recognition, machine translation, text classification, speech recognition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case-based reasoning
&lt;/h2&gt;

&lt;p&gt;This approach relies on using previous cases as a knowledge base for solving new problems.&lt;/p&gt;

&lt;p&gt;It generally includes four main phases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve: The system searches its database of previous cases for those relevant to the current problem, determined based on similar characteristics of the problem or desired outcomes.&lt;/li&gt;
&lt;li&gt;Reuse: The system uses the recovered cases to find solutions or suggestions applicable to the current problem.&lt;/li&gt;
&lt;li&gt;Review (Revise): the solution or suggestion is examined and evaluated, possibly changes or adaptations can be made to address the specifics of the problem or to improve the solution.&lt;/li&gt;
&lt;li&gt;Retain: The current case or solution is added to the database of previous cases.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The approach is indicated when there is no direct algorithmic solution or the environment is subject to frequent changes.&lt;/p&gt;

&lt;p&gt;The main use cases are medical diagnostics, industrial maintenance, user assistance, process planning and many others, where experience and adaptation to new scenarios are important to achieve good results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimization and research
&lt;/h2&gt;

&lt;p&gt;Optimization and search are approaches used in AI to solve complex problems and find optimal solutions. These approaches involve mathematical modeling of a problem and applying specific algorithms to find the best possible solution.&lt;/p&gt;

&lt;p&gt;Optimization aims to find the best solution in a set of alternatives that meet the desired criteria.&lt;/p&gt;

&lt;p&gt;Some common optimization algorithms used in AI include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Genetic algorithms inspired by the theory of biological evolution&lt;/li&gt;
&lt;li&gt;Local search algorithms that iteratively explore nearby solutions trying to improve the target&lt;/li&gt;
&lt;li&gt;Linear programming algorithms used to solve linear optimization problems&lt;/li&gt;
&lt;li&gt;Combinatorial optimization algorithms designed to solve optimization problems where the solutions are sequences or combinations of discrete elements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Search instead focuses on the systematic exploration of a set of possible solutions to find the one that satisfies the specific requirements of the problem and is based on different search algorithms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inductive learning
&lt;/h2&gt;

&lt;p&gt;Inductive learning is an approach in AI that involves acquiring general knowledge and rules from specific examples or training data with the aim of extracting hidden patterns, relationships or structures from the training data and applying them to new data or similar problems.&lt;/p&gt;

&lt;p&gt;This approach is used in cases of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Classification, to train a model to distinguish between different classes or categories.&lt;/li&gt;
&lt;li&gt;Regression, to model relationships between variables and predict continuous or numerical values.&lt;/li&gt;
&lt;li&gt;Knowledge extraction, so to extract knowledge and rules implicit in the data.&lt;/li&gt;
&lt;li&gt;Clustering, to identify natural structures or groups in the data without the need for predefined labels.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inductive learning algorithms include decision trees, random forests, support vector machines, neural networks, and many more. These algorithms try to find models or functions that minimize error or otherwise maximize accuracy while learning, allowing the model to generalize and make predictions or knowledge extraction on new data.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>AI: what is Machine Learning</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Fri, 09 Jun 2023 10:40:45 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/ai-what-is-machine-learning-472n</link>
      <guid>https://dev.to/eleonorarocchi/ai-what-is-machine-learning-472n</guid>
      <description>&lt;p&gt;In recent months, everywhere there is talk of artificial intelligence. Sometimes with knowledge of the facts, sometimes by slipping it a little haphazardly into conversations. It's definitely not a new concept, but it's not an easy topic of discussion, for several reasons. It is difficult to understand the basics, it is difficult to understand the concrete areas of use, it is difficult to enter into the ethical implications.&lt;/p&gt;

&lt;p&gt;As a technician, however, I feel the need to understand how this branch of information technology can enter into my work routine, so I started training me to be able to understand a little better the limits and potential. &lt;/p&gt;

&lt;p&gt;So now I want to start sharing with you what I have learned and I am learning, so as to help those wishing to learn more to get a better idea of the current evolutionary state.&lt;/p&gt;

&lt;p&gt;The first question that I had, was what means "machine learning".&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Machine Learning?
&lt;/h2&gt;

&lt;p&gt;Machine learning (ML for friends) is a discipline of artificial intelligence (AI for friends).&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the goal of ML?
&lt;/h2&gt;

&lt;p&gt;The goal of ML is the creation of systems capable of learning independently starting from data analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it do it?
&lt;/h2&gt;

&lt;p&gt;ML is based on algorithms that simulate the learning process of human beings, going to refine results and performances from time to time.&lt;/p&gt;

&lt;p&gt;ML uses mathematical algorithms applied to large amounts of data with the aim of producing models applicable to those same data that can be replicated on the data itself in order to be able to produce predictions.&lt;/p&gt;

&lt;p&gt;The need for a similar technology is given by the fact that a problem cannot always be solved by programmed software, either because it is too complex or because it evolves too quickly.&lt;/p&gt;

&lt;p&gt;For example for facial recognition, or language translation, but also for medical diagnoses.&lt;/p&gt;

&lt;p&gt;To solve these complex problems, a large amount of data is fed to the system, and the algorithms are left to work on it by recognizing patterns, rules, relationships between the data themselves, so as to obtain a model which can then also be applicable in future.&lt;/p&gt;

&lt;p&gt;Everything therefore starts from a training phase, precisely because it is not the programmer who defines the algorithm, but it is the system itself which autonomously analyzes the data provided and discovers how to use them to solve specific problems.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to start with OramaSearch</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Sun, 04 Jun 2023 20:52:17 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/how-to-start-with-oramasearch-4fic</link>
      <guid>https://dev.to/eleonorarocchi/how-to-start-with-oramasearch-4fic</guid>
      <description>&lt;p&gt;In this last week, I wanted to try OramaSearch, a new library that is really easy to use to implement fulltext searches.&lt;/p&gt;

&lt;p&gt;I wanted to do two simple tests to verify its ease of use and if indeed, as the authors promise, provide results so quickly.&lt;/p&gt;

&lt;p&gt;The first test was to create an Angular project, add a service that downloaded a structured JSON of data (in my case related to a list of states of the world), and then use Orama to filter the data based on a text string.&lt;/p&gt;

&lt;p&gt;The steps to include and use Orama are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;create an angular project
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7oi65spoqooefk4zqz9.png" alt="Create an angular project" width="258" height="32"&gt;
&lt;/li&gt;
&lt;li&gt;install OramaSearch
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl6vz4ym9548udbulihq7.png" alt="Install OramaSearch" width="412" height="34"&gt;
&lt;/li&gt;
&lt;li&gt;create a service to download data from a webservice
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3tu2e5a2gxc1hega7cbb.png" alt="Create a service to download data from a webservice" width="800" height="460"&gt;
In my case I used &lt;a href="https://restcountries.com" rel="noopener noreferrer"&gt;https://restcountries.com&lt;/a&gt;, an Open Source project and free to use, to get country information via a RESTful API.&lt;/li&gt;
&lt;li&gt;create a database with the desired schema
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iyst2gyrcffvylgu0we.png" alt="Create a database with the desired schema" width="548" height="770"&gt;
&lt;/li&gt;
&lt;li&gt;through the service, populate the database
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdhxakhtq9eevji14i7b3.png" alt="Through the service, populate the database" width="800" height="398"&gt;
&lt;/li&gt;
&lt;li&gt;create an interface to display the data list, including search fields (in my case I used AngularMaterial to speed up writing the UI)&lt;/li&gt;
&lt;li&gt;implement search method
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Falvuf1n0qos8fg74njd1.png" alt="Implement search method" width="800" height="246"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to see the complete project, you can find it here &lt;a href="https://github.com/eleonorarocchi/oramaDemo" rel="noopener noreferrer"&gt;https://github.com/eleonorarocchi/oramaDemo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second test was to implement a NodeJs project. &lt;br&gt;
As in the previous example, I tried including CountryREST to populate the database, and implement a search method.&lt;/p&gt;

&lt;p&gt;The steps to include and use Orama are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;initialize it as an npm project:
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7zrc5u7dhany1kjwv7x2.png" alt="Initialize it as an npm project" width="182" height="38"&gt;
&lt;/li&gt;
&lt;li&gt;install and set up TypeScript
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foyhfcvoqtztzkny11zjg.png" alt="Install and set up TypeScript" width="484" height="38"&gt;
&lt;/li&gt;
&lt;li&gt;create tsconfig.json
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6o9doogr4v95qvrdo54.png" alt="Create tsconfig.json" width="486" height="406"&gt;
&lt;/li&gt;
&lt;li&gt;install the Express framework and create a minimal server
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhsxugffd74z3ckuxc1dd.png" alt="Install the Express framework" width="608" height="62"&gt;
&lt;/li&gt;
&lt;li&gt;create src/app.ts file&lt;/li&gt;
&lt;li&gt;in the app.listen method, add the code for initialize the database definition, as in the previous project, and the code for populate database
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jfxpgad6rrfmmg730ok.png" alt="Populate db" width="800" height="757"&gt;
&lt;/li&gt;
&lt;li&gt;create a method for see all data
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2dwp067hlx4ltn1zoe0.png" alt="See all data" width="772" height="342"&gt;
&lt;/li&gt;
&lt;li&gt;create a method for see filtered data, by a parameter
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjbp7im5mw97c6e0q0ezi.png" alt="Filter data" width="750" height="252"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's really simple to integrate and fast to deliver results!&lt;/p&gt;

&lt;p&gt;If you want to see the complete project, you can find it here &lt;a href="https://github.com/eleonorarocchi/oramaNodeDemo" rel="noopener noreferrer"&gt;https://github.com/eleonorarocchi/oramaNodeDemo&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;You can find more information directly on the project website: &lt;a href="https://www.oramasearch.com" rel="noopener noreferrer"&gt;https://www.oramasearch.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>node</category>
      <category>orama</category>
    </item>
    <item>
      <title>Where publish nodeJs+Angular app for free</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Thu, 23 Feb 2023 13:44:19 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/where-publish-nodejsangular-app-for-free-43g1</link>
      <guid>https://dev.to/eleonorarocchi/where-publish-nodejsangular-app-for-free-43g1</guid>
      <description>&lt;p&gt;I needed to publish a simple web application composed of Angular frontend and Node backend on a server to make it accessible on the network. I was looking for a hosting service for this architecture, perhaps free, and I discovered &lt;a href="https://www.render.com" rel="noopener noreferrer"&gt;https://www.render.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Render.com is a fully-managed cloud platform, which can host sites, backend APIs, databases, cron jobs and all applications in one place.&lt;/p&gt;

&lt;p&gt;Static site publishing is completely free on Render and includes the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Continuous, automatic builds &amp;amp; deploys from GitHub and GitLab.&lt;/li&gt;
&lt;li&gt;Automatic SSL certificates through Let's Encrypt.&lt;/li&gt;
&lt;li&gt;Instant cache invalidation with a lightning fast, global CDN.&lt;/li&gt;
&lt;li&gt;Unlimited contributors.&lt;/li&gt;
&lt;li&gt;Unlimited custom domains.&lt;/li&gt;
&lt;li&gt;Automatic Brotli compression for faster sites.&lt;/li&gt;
&lt;li&gt;Native HTTP/2 support.&lt;/li&gt;
&lt;li&gt;Pull Request Previews.&lt;/li&gt;
&lt;li&gt;Automatic HTTP → HTTPS redirects.&lt;/li&gt;
&lt;li&gt;Custom URL redirects and rewrites.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have a github account, it is very convenient to release updates, as you can directly link a repository to render.com, and automate the deployment.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>No code mobile app? BravoStudio is the answer</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Sun, 25 Dec 2022 19:45:26 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/no-code-mobile-app-bravostudio-is-the-answer-3g0d</link>
      <guid>https://dev.to/eleonorarocchi/no-code-mobile-app-bravostudio-is-the-answer-3g0d</guid>
      <description>&lt;p&gt;BravoStudio is a zero code tool that allows you to obtain iOS and Android apps starting from a prototype.&lt;br&gt;
I find it to be a great tool to get POC for your projects and to show to the customers a really working app.&lt;/p&gt;

&lt;p&gt;Combining it together with other tools such as Figma and AirTable, you get an app that allows you to show not only the navigation between the various sections, but also to view and even send data to external services.&lt;/p&gt;

&lt;p&gt;An example? Let's say we are drawing a mobile app interface with Figma, consisting of two screens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;one with a list of items, for example for a todo-list of operations to be divided among colleagues in the office&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;one with a form, for example to create a new item in the list&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;complete with keys and navigation between them.&lt;/p&gt;

&lt;p&gt;Let's then create a table on AirTable that allows you to record the items in the list. Using AirTable to save data allows it to be easily displayed on a completely stand-alone web page, for example to display on a monitor hanging in a common room, quick to implement with typescript frameworks or alternatively with other zero code tools.&lt;/p&gt;

&lt;p&gt;Well, BravoStudio fits in between Figma and AirTable: it feeds the Figma project, connects it to the specific AirTable apps and allows you to generate an application that can be installed on a mobile device, even publishable on the stores.&lt;/p&gt;

&lt;p&gt;it is possible to obtain such a POC in a few hours of work.&lt;/p&gt;

&lt;p&gt;This set of tools can be used for any project in reality but in my opinion the purpose and the target must be considered.&lt;/p&gt;

&lt;p&gt;I definitely recommend it for a POC or an MVP or for projects where a temporary use of the solution is expected. I haven't had experience with more complex projects yet, where for now I prefer to have more control by writing all the code and being able to manage it as I prefer.&lt;/p&gt;

&lt;p&gt;For more information: &lt;br&gt;
&lt;a href="https://www.bravostudio.app" rel="noopener noreferrer"&gt;BravoStudio&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.figma.com/community/file/1037076871042398895" rel="noopener noreferrer"&gt;Integration with Figma tutorial&lt;/a&gt;&lt;br&gt;
&lt;a href="https://airtable.com" rel="noopener noreferrer"&gt;AirTable&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=N3_fmexrxIs&amp;amp;ab_channel=BravoStudio" rel="noopener noreferrer"&gt;Airtable basics for Bravo Studio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>ai</category>
    </item>
    <item>
      <title>Lit: what is public reactive properties</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Sat, 10 Sep 2022 13:42:33 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/lit-what-is-public-reactive-properties-3mcl</link>
      <guid>https://dev.to/eleonorarocchi/lit-what-is-public-reactive-properties-3mcl</guid>
      <description>&lt;p&gt;Lit components receive input and store a state.&lt;br&gt;
Reactive properties are properties that can trigger the reactive update cycle when changed, re-rendering the component, and can optionally be read or written to attributes.&lt;/p&gt;

&lt;p&gt;Lit manages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reactive Updates&lt;/strong&gt;: Lit generates a getter / setter pair for each reactive property. When a reactive property changes, the component schedules an update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Attribute management&lt;/strong&gt;: By default, Lit sets an observed attribute corresponding to the property and updates the property when the attribute changes. Property values can also, optionally, be reflected in the attribute.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Superclass Property&lt;/strong&gt;: Lit automatically applies property options declared by a superclass. You don't need to declare the properties again unless you want to change the options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Element update&lt;/strong&gt;: If a Lit component is defined after the element is already in the DOM, Lit manages the update logic, ensuring that any property set on an element before it was updated triggers the correct reactive side effects when the element is updated.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Public properties are part of the component's public API. In particular, public reactive properties should be treated as inputs.&lt;/p&gt;

&lt;p&gt;The component should not change its public properties, except in response to user input.&lt;/p&gt;

&lt;p&gt;Lit also supports internal reactive state, which refers to reactive properties that are not part of the component API. &lt;/p&gt;

&lt;p&gt;These properties do not have a corresponding attribute and are typically marked as secure or private in TypeScript.&lt;/p&gt;

&lt;p&gt;The component is capable of manipulating its own internal reactive state.&lt;/p&gt;

&lt;p&gt;In some cases, the internal reactive state can be initialized from public properties, for example if there is an expensive transformation between the user-visible property and the internal state.&lt;/p&gt;

&lt;p&gt;As with public reactive properties, updating the internal reactive state triggers an update cycle.&lt;/p&gt;

&lt;p&gt;Public reactive properties are declared using the @property decorator, possibly with a set of options.&lt;/p&gt;

&lt;p&gt;Alternatively you can use a static property.&lt;/p&gt;

&lt;p&gt;Class fields have a problematic interaction with reactive properties, because they are defined in the element instance.&lt;/p&gt;

&lt;p&gt;Reactive properties are defined as ancillary on the element prototype.&lt;/p&gt;

&lt;p&gt;According to the rules of JavaScript, an instance property takes precedence and effectively hides a prototype property.&lt;/p&gt;

&lt;p&gt;This means that reactive property accessors don't work when class fields are used.&lt;/p&gt;

&lt;p&gt;When a property is set, the element is not updated.&lt;/p&gt;

&lt;p&gt;In JavaScript, it is not necessary to use class fields when declaring reactive properties. Instead, the properties must be initialized in the element constructor.&lt;/p&gt;

&lt;p&gt;In TypeScript, you can use class fields to declare responsive properties as long as you use one of these templates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;With setting useDefineForClassFields in tsconfig to false.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By adding the declare keyword to the field and entering&lt;br&gt;
the initializer of the field in the constructor.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When compiling JavaScript with Babel, you can use class fields to declare reactive properties as long as you set setPublicClassFields to true in your babelrc's assumptions configuration.&lt;/p&gt;

&lt;p&gt;The options object can have the following properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;attribute&lt;/strong&gt;: Whether the property is associated with an attribute or a custom name for the associated attribute. Default: true. If the attribute is false, the converter, reflect, and type options are ignored.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;converter&lt;/strong&gt;: custom converter for converting between properties and attributes. If not specified, use the default attribute converter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;hasChanged&lt;/strong&gt;: Function called whenever the property is set to determine if it has been changed and should trigger an update. If not specified, LitElement uses a strict inequality check (newValue! == oldValue) to determine if the property value has changed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;noAccessor&lt;/strong&gt;: Set to true to avoid generating default property accessors. This option is rarely needed. Default: false.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;reflect&lt;/strong&gt;: if the property value is reflected in the associated attribute. Default: false.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;state&lt;/strong&gt;: to be set to true to declare the property as an internal responsive state. The internal reactive state triggers updates like public reactive properties, but Lit doesn't generate an attribute for it and users don't have to access it from outside the component. Equivalent to using the @state decorator. Default: false.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;type&lt;/strong&gt;: When converting a string-valued attribute to a property, Lit's default attribute converter will parse the string into the specified type and vice versa when reflecting a property into an attribute. If the converter is set, this field is passed to the converter. If the type is not specified, the default converter treats it as a type: String. When using TypeScript, it should generally match the TypeScript type declared for the field. However, the type option is used by the Lit runtime for string serialization / deserialization and should not be confused with a type checking mechanism.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Omitting the options object or specifying an empty options object is the same as specifying the default value for all options.&lt;/p&gt;

&lt;p&gt;If you want to read this content in italian, &lt;a href="https://www.slideshare.net/EleonoraRocchi1/lit3pdf" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>lit</category>
      <category>google</category>
      <category>webcomponents</category>
    </item>
    <item>
      <title>Blackboards, for all tastes and budgets</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Tue, 23 Aug 2022 20:41:28 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/blackboards-for-all-tastes-and-budgets-m7d</link>
      <guid>https://dev.to/eleonorarocchi/blackboards-for-all-tastes-and-budgets-m7d</guid>
      <description>&lt;p&gt;Over the past couple of years, we've all been experimenting with new ways of working. &lt;/p&gt;

&lt;p&gt;We have had many meetings with colleagues, clients and consultants all over the world and it is not always easy to explain yourself only in words.&lt;/p&gt;

&lt;p&gt;I want to share with you the best tools I have discovered and tried.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Miro
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhg8lpd96ihlv9f16oa6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhg8lpd96ihlv9f16oa6s.png" alt=" " width="800" height="457"&gt;&lt;/a&gt; &lt;br&gt;
It is a digital whiteboard that allows you to create different projects and organize notes. You propose a series of predefined templates but you can define your own in a very easy way. Miro has a very convenient feature to allow users to stick notes as PostIt.&lt;br&gt;
See: &lt;a href="https://miro.com" rel="noopener noreferrer"&gt;miro.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Mural
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fonzxqkl4594jqu64q9mh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fonzxqkl4594jqu64q9mh.png" alt=" " width="310" height="163"&gt;&lt;/a&gt; &lt;br&gt;
Like Miro, it's a digital whiteboard. Also in this case it is possible to use the proposed example templates or model your own. The board can be accessed by several people at the same time and the work is shared in real time.&lt;br&gt;
Like a Miro, you can stick notes as PostIt in a very simple way. &lt;br&gt;
When working with large groups of people, a Mural feature called "Summon" comes in handy, which allows the facilitator can force all participants to look at his own view.&lt;br&gt;
See: &lt;a href="https://www.mural.co" rel="noopener noreferrer"&gt;mural.co&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Trello
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm72cn5v8zhx8e099meti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm72cn5v8zhx8e099meti.png" alt=" " width="576" height="324"&gt;&lt;/a&gt; &lt;br&gt;
This is a tool that allows you to organize projects and everything related in message boards. The organization is structured with respect to the instruments listed above.&lt;br&gt;
Through cards and lists it allows the subdivision of activities organized into checklists, assigned to different people. Thanks to this tool you can keep track of deadlines, assignments, progress.&lt;br&gt;
See: &lt;a href="https://trello.com" rel="noopener noreferrer"&gt;trello.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Azure Boards
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa7a6c3ctruv3ug5w3z2e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa7a6c3ctruv3ug5w3z2e.png" alt=" " width="800" height="634"&gt;&lt;/a&gt;&lt;br&gt;
Azure Board allows you to create workflows, problem types, epics and many other typical components of Application Life Cycle Management (ALM). It allows you to monitor the capacity of the team, plan development sprints, create and update activities efficiently, collaborate with team members through real-time updates thanks to the use of an interactive and versatile dashboard, obtain a personalized reporting experience based on customer needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Excalidraw
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxucta3radbi9p93azml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxucta3radbi9p93azml.png" alt=" " width="640" height="392"&gt;&lt;/a&gt; &lt;br&gt;
Last but not least, this is a virtual whiteboard for sketching hand-drawn. For example, it makes it easier to share diagrams during meetings.&lt;br&gt;
See: &lt;a href="https://excalidraw.com" rel="noopener noreferrer"&gt;excalidraw.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blackboard</category>
      <category>projectmanagement</category>
      <category>teamwork</category>
      <category>remotework</category>
    </item>
    <item>
      <title>Lit: how can a lit component be defined</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Fri, 12 Aug 2022 19:45:19 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/lit-how-can-a-lit-component-be-defined-1ggn</link>
      <guid>https://dev.to/eleonorarocchi/lit-how-can-a-lit-component-be-defined-1ggn</guid>
      <description>&lt;p&gt;Creating a Lit component involves a number of concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is implemented as a custom element and registered in the browser.&lt;/li&gt;
&lt;li&gt;It has a render method called to render the component content, in which you define a template.&lt;/li&gt;
&lt;li&gt;Properties maintain the state of the component. The modification of one or more reactive properties of the components triggers an update cycle that takes care of re-rendering the component.&lt;/li&gt;
&lt;li&gt;A component can define encapsulated styles to control its appearance.&lt;/li&gt;
&lt;li&gt;Lit defines a set of callbacks that can be overridden to hook into the component lifecycle, for example to run code when the element is added to a page or whenever the component is updated.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to define a Lit component
&lt;/h2&gt;

&lt;p&gt;A class that extends LitElement must be created and registered in the browser:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisdtx46kboatrlnr8d1i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisdtx46kboatrlnr8d1i.png" alt=" " width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The @customElement decorator is an abbreviation for calling customElements.define, which registers a custom element class with the browser and binds it to an element name (in this case, simple-greeting).&lt;/p&gt;

&lt;p&gt;Using JavaScript, or without using decorators, you can call define() directly:&lt;/p&gt;

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

&lt;p&gt;A Lit component is an HTML element.&lt;/p&gt;

&lt;p&gt;When defining a Lit component, you are defining a custom HTML element which can then be used as any integrated element:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxoe781ghbh5jvkwn3b92.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxoe781ghbh5jvkwn3b92.png" alt=" " width="800" height="141"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx9r6ikxppc7mp693z5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyx9r6ikxppc7mp693z5s.png" alt=" " width="800" height="117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The base class LitElement is a subclass of HTMLElement, therefore a Lit component inherits all properties of standard methods by HTMLElement.&lt;/p&gt;

&lt;p&gt;Specifically, LitElement inherits from ReactiveElement, which implements reactive properties, and in turn inherits from HTMLElement. &lt;/p&gt;

&lt;p&gt;We know that TypeScript is able to infer the class of an HTML element returned by some DOM APIs based on the tag name.&lt;/p&gt;

&lt;p&gt;For example, document.createElement ('img') returns an HTMLImageElement instance with a src: string property.&lt;/p&gt;

&lt;p&gt;You can achieve the same behavior on custom elements by adding to HTMLElementTagNameMap as follows:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fohpzdq7neap034qa5i8q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fohpzdq7neap034qa5i8q.png" alt=" " width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this way, the following code performs the type checks correctly:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fscuut8uz9x7ugiiqy2tx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fscuut8uz9x7ugiiqy2tx.png" alt=" " width="800" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is always a good idea to add an HTMLElementTagNameMap entry to elements created in TypeScript and publish the .d.ts types in the npm package.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the Render does
&lt;/h2&gt;

&lt;p&gt;You can add a template to the component to define what should be displayed.&lt;/p&gt;

&lt;p&gt;Templates can include expressions, which are placeholders for dynamic content.&lt;/p&gt;

&lt;p&gt;To define a template for a Lit component, a render() method must be added:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphokhbkqj00e4oox647q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphokhbkqj00e4oox647q.png" alt=" " width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You write the HTML template inside a Javascript tagged template literal using the Lit html tag function.&lt;/p&gt;

&lt;p&gt;Template literals are a special type of string symbols that can contain Javascript expressions and span multiple lines. They use backtick characters instead of double quotes. It also accepts arbitrary expressions internally.&lt;/p&gt;

&lt;p&gt;These templates can also be used as functions, by putting a keyword in front of the template string to "tag" it.&lt;/p&gt;

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

&lt;p&gt;Lit templates can include JavaScript expressions.&lt;/p&gt;

&lt;p&gt;You can use expressions to set text content, attributes, properties, and event listeners.&lt;/p&gt;

&lt;p&gt;The render () method can also include any JavaScript, for example, you can create local variables for use in expressions.&lt;/p&gt;

&lt;p&gt;Typically, the component's render () method returns a single TemplateResult object (the same type returned by the html tag function).&lt;/p&gt;

&lt;p&gt;However, it can return anything that Lit can render:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primitive values such as string, numbers or booleans.&lt;/li&gt;
&lt;li&gt;TemplateResult objects created by the html function.&lt;/li&gt;
&lt;li&gt;DOM nodes.&lt;/li&gt;
&lt;li&gt;Arrays or iterables of any of the supported types.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To take full advantage of Lit's functional rendering model, the render () method should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid changing the component state.&lt;/li&gt;
&lt;li&gt;Avoid producing side effects.&lt;/li&gt;
&lt;li&gt;Use only component properties as input.&lt;/li&gt;
&lt;li&gt;Return the same result when the same property values are assigned.&lt;/li&gt;
&lt;li&gt;Avoid making DOM updates outside of render ().&lt;/li&gt;
&lt;li&gt;Express the component model according to its state and acquire its state in the properties.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can compose Lit templates from other templates.&lt;/p&gt;

&lt;p&gt;For example, you can compose a template for a component called  from smaller templates for the header, footer, and main content of the page.&lt;/p&gt;

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

&lt;p&gt;In this example, individual templates are defined as instance methods, so a subclass could extend this component and override one or more templates.&lt;/p&gt;

&lt;p&gt;You can also compose a template by importing other elements and using them in the template itself.&lt;/p&gt;

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

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

&lt;p&gt;A Lit component renders its model initially when it is added to the DOM on a page.&lt;/p&gt;

&lt;p&gt;After the initial rendering, any change to the component's reactive properties triggers an update cycle, re-rendering the component.&lt;/p&gt;

&lt;p&gt;Lit updates in batches to maximize performance and efficiency.&lt;/p&gt;

&lt;p&gt;Setting multiple properties simultaneously triggers a single update, performed asynchronously at the time of the microtask.&lt;/p&gt;

&lt;p&gt;During an update, only the parts of the DOM that change are re-rendered.&lt;/p&gt;

&lt;p&gt;Although Lit patterns resemble string interpolation, Lit parses and creates static HTML once, then only updates modified values in expressions, making updates very efficient.&lt;/p&gt;

&lt;p&gt;Lit uses the shadow DOM to encapsulate the DOM that a component renders.&lt;/p&gt;

&lt;p&gt;The shadow DOM allows an element to create its own isolated DOM tree, separate from the main document tree.&lt;/p&gt;

&lt;p&gt;It is a key feature of the web component specification that enables interoperability, style encapsulation, and other benefits.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is the shadow DOM
&lt;/h2&gt;

&lt;p&gt;The shadow DOM allows web developers to create compartmentalized DOMs and CSS for web components.&lt;/p&gt;

&lt;p&gt;The shadow DOM removes some of the frailties typical of building web apps, which stem from the global nature of HTML, CSS, and JS.&lt;/p&gt;

&lt;p&gt;For example, when using a new HTML class / ID, it is not possible to tell if it will conflict with an existing name used by the page.&lt;/p&gt;

&lt;p&gt;! Important multiplies in CSS, style selectors grow out of control, and performance can suffer.&lt;/p&gt;

&lt;p&gt;The shadow DOM fixes CSS and DOM, introducing scoped styles.&lt;/p&gt;

&lt;p&gt;Without tools or naming conventions, you can bundle CSS with markup, hide implementation details, and create self-contained components in vanilla JavaScript.&lt;/p&gt;

&lt;p&gt;When the browser loads a web page, among other things, it transforms the HTML into a live document.&lt;/p&gt;

&lt;p&gt;To understand the page structure, the browser parses the HTML (static text strings) into a data model (objects / nodes).&lt;/p&gt;

&lt;p&gt;The browser preserves the HTML hierarchy by creating a tree of these nodes: the DOM, which is a live representation of a page. Unlike static HTML, the nodes produced by the browser contain properties, methods and can be manipulated by programs using JavaScript.&lt;/p&gt;

&lt;p&gt;The Shadow DOM is simply a normal DOM with two differences:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;how it is created / used&lt;/li&gt;
&lt;li&gt;how it behaves relative to the rest of the page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Normally, you create DOM nodes and add them as children of another element.&lt;/p&gt;

&lt;p&gt;With Shadow DOM, you create a scoped DOM tree that is attached to the element, but separate from its actual children. This scoped subtree is called a shadow tree. The element it is attached to is its shadow host. Anything added in the shadows becomes local to the hosting element, including .&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;This is how the shadow DOM gets the css style scope.&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;If you want to read this content in italian, see &amp;lt;a href="https://www.slideshare.net/EleonoraRocchi1/lit2pdf"&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;
&lt;/p&gt;

</description>
      <category>lit</category>
      <category>web</category>
      <category>component</category>
      <category>google</category>
    </item>
    <item>
      <title>UI: some useful resources</title>
      <dc:creator>eleonorarocchi</dc:creator>
      <pubDate>Tue, 09 Aug 2022 20:08:58 +0000</pubDate>
      <link>https://dev.to/eleonorarocchi/ui-some-useful-resources-43fd</link>
      <guid>https://dev.to/eleonorarocchi/ui-some-useful-resources-43fd</guid>
      <description>&lt;p&gt;Even developers sometimes, for various reasons, have to design some interfaces by themselves, without the help of design and graphics experts.&lt;/p&gt;

&lt;p&gt;Here is a collection of online resources that may come in handy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generation of backgrounds (gradients and not)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cssgradient.io" rel="noopener noreferrer"&gt;https://cssgradient.io&lt;/a&gt;&lt;br&gt;
&lt;a href="https://webgradients.com" rel="noopener noreferrer"&gt;https://webgradients.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.svgbackgrounds.com" rel="noopener noreferrer"&gt;https://www.svgbackgrounds.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://bgjar.com" rel="noopener noreferrer"&gt;https://bgjar.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  svg icons
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://icons.getbootstrap.com" rel="noopener noreferrer"&gt;https://icons.getbootstrap.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.svgrepo.com" rel="noopener noreferrer"&gt;https://www.svgrepo.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://fontawesome.com/icons" rel="noopener noreferrer"&gt;https://fontawesome.com/icons&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  svg illustrations
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://drawkit.com" rel="noopener noreferrer"&gt;https://drawkit.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://undraw.co" rel="noopener noreferrer"&gt;https://undraw.co&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.opendoodles.com" rel="noopener noreferrer"&gt;https://www.opendoodles.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.glazestock.com" rel="noopener noreferrer"&gt;https://www.glazestock.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.humaaans.com" rel="noopener noreferrer"&gt;https://www.humaaans.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://icons8.com/illustrations" rel="noopener noreferrer"&gt;https://icons8.com/illustrations&lt;/a&gt;&lt;br&gt;
&lt;a href="https://weareskribbl.com" rel="noopener noreferrer"&gt;https://weareskribbl.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ui8.net" rel="noopener noreferrer"&gt;https://ui8.net&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Animated illustrations
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://storyset.com" rel="noopener noreferrer"&gt;https://storyset.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Generation of faces
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://generated.photos/face-generator/new" rel="noopener noreferrer"&gt;https://generated.photos/face-generator/new&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Images
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://unsplash.com" rel="noopener noreferrer"&gt;https://unsplash.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://burst.shopify.com" rel="noopener noreferrer"&gt;https://burst.shopify.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freeimages.com" rel="noopener noreferrer"&gt;https://www.freeimages.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://pixabay.com" rel="noopener noreferrer"&gt;https://pixabay.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.freeimages.com" rel="noopener noreferrer"&gt;https://www.freeimages.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kaboompics.com" rel="noopener noreferrer"&gt;https://kaboompics.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.flickr.com/photos/wocintechchat" rel="noopener noreferrer"&gt;https://www.flickr.com/photos/wocintechchat&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dribbble.com" rel="noopener noreferrer"&gt;https://dribbble.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://lookup.design" rel="noopener noreferrer"&gt;https://lookup.design&lt;/a&gt;&lt;br&gt;
&lt;a href="https://screenlane.com" rel="noopener noreferrer"&gt;https://screenlane.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.figma.com/community" rel="noopener noreferrer"&gt;https://www.figma.com/community&lt;/a&gt;&lt;br&gt;
&lt;a href="https://scrnshts.club" rel="noopener noreferrer"&gt;https://scrnshts.club&lt;/a&gt;&lt;br&gt;
&lt;a href="https://uiverse.io" rel="noopener noreferrer"&gt;https://uiverse.io&lt;/a&gt;&lt;br&gt;
&lt;a href="https://codepen.io" rel="noopener noreferrer"&gt;https://codepen.io&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Font
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://fonts.google.com" rel="noopener noreferrer"&gt;https://fonts.google.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you? Do you have other resources to report?&lt;/p&gt;

</description>
      <category>ui</category>
      <category>resources</category>
    </item>
  </channel>
</rss>
