<?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: Igor Soares</title>
    <description>The latest articles on DEV Community by Igor Soares (@rogigs).</description>
    <link>https://dev.to/rogigs</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%2F548875%2Fd6b9abbe-2c96-41d6-90b6-c9da8924a8e8.jpeg</url>
      <title>DEV Community: Igor Soares</title>
      <link>https://dev.to/rogigs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rogigs"/>
    <language>en</language>
    <item>
      <title>How Routed States can improve the usability of web applications</title>
      <dc:creator>Igor Soares</dc:creator>
      <pubDate>Fri, 08 Nov 2024 01:31:03 +0000</pubDate>
      <link>https://dev.to/rogigs/how-routed-states-can-improve-the-usability-of-web-applications-3mm9</link>
      <guid>https://dev.to/rogigs/how-routed-states-can-improve-the-usability-of-web-applications-3mm9</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/rogigs/como-routed-states-podem-melhorar-a-usabilidade-de-aplicacoes-web-4epo"&gt;Read in Brazilian Portuguese&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many developers who work with web applications have faced the challenge of managing state through the URL. This is often needed on different pages within the same context; for example, product and product detail pages, where the URL contains the product ID to be shown to the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000/products
http://localhost:3000/products/123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, Routed States affect not only the way we share data within our application. In the example above, SEO is also impacted; that is, search engines will recognize both your product listing page and the details of your products. Additionally, usability is improved, as this approach allows an advanced user to navigate through the system by knowing only the product IDs, while less experienced users can share the product with others simply by using a link.&lt;/p&gt;

&lt;p&gt;Nevertheless, the example above is widely known, but there are other scenarios where the state of your application would be better reflected in the URL.&lt;/p&gt;

&lt;p&gt;Imagine the following scenario: you are involved in a project where users are inexperienced and struggle with systems and their concepts. Because of this, new users need to be trained to use it. At a certain point, a new user was created with generic data and will need to update it with the help of an experienced user. The page for updating profile data is as follows:&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%2F4d1hf0dsi03akbhe78kh.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%2F4d1hf0dsi03akbhe78kh.png" alt="example-with-states-modifying-the-current-component" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many developers, when creating this page, will choose to manage component states. The solution will look like the design shown above. However, this approach does not help the experienced user in assisting the novice user, as each interaction on this page will require further instructions. In this example, it will be necessary to specify the path &lt;a href="http://localhost:3000/profile" rel="noopener noreferrer"&gt;http://localhost:3000/profile&lt;/a&gt; and the action of clicking on the "Security" menu to access the form for changing the password.&lt;/p&gt;

&lt;p&gt;To address this issue, we should make the AccountForm and SecurityForm components accessible via the URL. This way, the experienced user only needs to provide the path &lt;a href="http://localhost:3000/profile/security" rel="noopener noreferrer"&gt;http://localhost:3000/profile/security&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%2Fesgttrhygptpk6sj90yq.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%2Fesgttrhygptpk6sj90yq.png" alt="example-with-url-modifying-the-current-component" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web</category>
      <category>seo</category>
      <category>performance</category>
      <category>webperf</category>
    </item>
    <item>
      <title>Como Routed States podem melhorar a usabilidade de aplicações web</title>
      <dc:creator>Igor Soares</dc:creator>
      <pubDate>Fri, 08 Nov 2024 01:23:07 +0000</pubDate>
      <link>https://dev.to/rogigs/como-routed-states-podem-melhorar-a-usabilidade-de-aplicacoes-web-4epo</link>
      <guid>https://dev.to/rogigs/como-routed-states-podem-melhorar-a-usabilidade-de-aplicacoes-web-4epo</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/rogigs/how-routed-states-can-improve-the-usability-of-web-applications-3mm9"&gt;Ler em Inglês&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quem está envolvido no mundo de aplicações web já enfrentou o desafio de trafegar estados através da URL. Geralmente em páginas diferentes mas no mesmo contexto, por exemplo, páginas de produtos e de produtos detalhados a qual recebe qual o produto(id) que deve ser mostrado ao usuário pela URL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:3000/products
http://localhost:3000/products/123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mas Routed States afetam não apenas a forma como compartilhamos dados na nossa aplicação. No exemplo acima, questões de SEO são impactadas, ou seja, os mecanismos de busca reconhecerão tanto a página de listagem de produtos quanto a página de detalhes dos produtos. Além disso, a usabilidade é aprimorada, pois, dessa forma, um usuário avançado consegue navegar pelo sistema apenas conhecendo os IDs dos produtos, enquanto usuários leigos podem compartilhar um produto com outros usuários simplesmente utilizando um link.&lt;/p&gt;

&lt;p&gt;No entanto, o exemplo acima é amplamente conhecido, mas existem outros cenários em que o estado da sua aplicação seria melhor refletido pela URL.&lt;/p&gt;

&lt;p&gt;Imagine o seguinte cenário: você está envolvido em um projeto no qual os usuários são leigos e possuem dificuldades com sistemas e seus conceitos. Por conta disso, novos usuários precisam ser treinados para usá-lo. Em certo momento, um novo usuário foi criado com dados genéricos e precisará alterá-los com a ajuda de um usuário experiente. A página para alterar os dados do perfil é a seguinte:&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%2F4d1hf0dsi03akbhe78kh.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%2F4d1hf0dsi03akbhe78kh.png" alt="exemplo-com-states-modificando-o-atual-component" width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Muitos desenvolvedores, ao criarem essa página, optarão por controlar os componentes via estados. A solução ficará como mostrado no desenho acima. Entretanto, dessa forma, não estaremos ajudando o usuário experiente a auxiliar o novato, pois, sempre que houver uma interação nessa página, será necessário informar novas ações. No exemplo, será necessário indicar a rota &lt;a href="http://localhost:3000/profile" rel="noopener noreferrer"&gt;http://localhost:3000/profile&lt;/a&gt; e a ação de clicar no menu "Security" para acessar o formulário que permite alterar a senha.&lt;/p&gt;

&lt;p&gt;Para contornarmos esse problema, devemos fazer com que os componentes AccountForm e SecurityForm sejam acessíveis via URL. Dessa forma, o usuário experiente precisará apenas informar o caminho &lt;a href="http://localhost:3000/profile/security" rel="noopener noreferrer"&gt;http://localhost:3000/profile/security&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%2Fesgttrhygptpk6sj90yq.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%2Fesgttrhygptpk6sj90yq.png" alt="exemplo-com-rotas-modificando-o-atual-component" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>seo</category>
      <category>performance</category>
      <category>webperf</category>
    </item>
  </channel>
</rss>
