<?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: Carlos Lima</title>
    <description>The latest articles on DEV Community by Carlos Lima (@carloslimasis).</description>
    <link>https://dev.to/carloslimasis</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%2F211064%2F81f64b8b-fcc3-4f60-9e3b-9654d4a5c7fe.jpeg</url>
      <title>DEV Community: Carlos Lima</title>
      <link>https://dev.to/carloslimasis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carloslimasis"/>
    <language>en</language>
    <item>
      <title>Initial thoughts about Svelte</title>
      <dc:creator>Carlos Lima</dc:creator>
      <pubDate>Mon, 04 May 2020 00:35:57 +0000</pubDate>
      <link>https://dev.to/carloslimasis/initial-thoughts-about-svelte-4oga</link>
      <guid>https://dev.to/carloslimasis/initial-thoughts-about-svelte-4oga</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In a front-end frameworks jungle, that arises the Svelte to spice a little more this dispute. In a scenario where exists already know alternatives like a: Vue, Angular and React the Svelte comes up with the idea that rethinking the reactivity.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is &lt;strong&gt;Svelte&lt;/strong&gt;?
&lt;/h1&gt;

&lt;p&gt;According to the &lt;strong&gt;Svelte&lt;/strong&gt; &lt;a href="https://svelte.dev/blog/svelte-3-rethinking-reactivity#What_is_Svelte"&gt;documentation&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Svelte is a component framework — like React or Vue — but with an important difference. Traditional frameworks allow you to write declarative state-driven code, but there's a penalty: the browser must do extra work to convert those declarative structures into DOM operations, using techniques like that eat into your frame budget and tax the garbage collector.&lt;/p&gt;

&lt;p&gt;Instead, Svelte runs at build time, converting your components into highly efficient imperative code that surgically updates the DOM. As a result, you're able to write ambitious applications with excellent performance characteristics.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  But, what means be reactive?
&lt;/h1&gt;

&lt;p&gt;A reactive system is &lt;strong&gt;responsive&lt;/strong&gt;, &lt;strong&gt;resilient&lt;/strong&gt;, &lt;strong&gt;elastic&lt;/strong&gt;, and use the &lt;strong&gt;message-driven&lt;/strong&gt; concept.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://www.reactivemanifesto.org/"&gt;Reactive Manifesto&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Responsive&lt;/strong&gt; systems focus on providing rapid and consistent response times, establishing reliable upper bounds so they deliver a consistent quality of service. This consistent behaviour in turn simplifies error handling, builds end user confidence, and encourages further interaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resilient&lt;/strong&gt; systems stay responsive in the face of failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elastic&lt;/strong&gt; systems stay responsive under varying workloads. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs.&lt;/p&gt;

&lt;p&gt;Reactive Systems rely on asynchronous &lt;strong&gt;message-passing&lt;/strong&gt; to establish a boundary between components that ensures loose coupling, isolation and location transparency.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Reactive Programming
&lt;/h1&gt;

&lt;p&gt;According to &lt;a href="https://en.wikipedia.org/wiki/Reactive_programming"&gt;Wikipedia&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In computing, &lt;strong&gt;reactive programming&lt;/strong&gt; is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Therefore, the &lt;strong&gt;reactive programming&lt;/strong&gt; paradigm applies the reactive manifest concepts to programming.&lt;/p&gt;

&lt;h1&gt;
  
  
  Reactivity with &lt;strong&gt;Svelte&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In this simple example, I receive user input and use the &lt;strong&gt;Svelte&lt;/strong&gt; reactivity to show some text-based on this input. You can see that the Svelte automatically updates the DOM when my component's state changes.&lt;/p&gt;

&lt;p&gt;For example, given the App.svelte code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fYKdj-2C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l7b1ljdjmc3mnaga21uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fYKdj-2C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l7b1ljdjmc3mnaga21uu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I give the wrong answer, the &lt;strong&gt;Svelte&lt;/strong&gt; identifies the &lt;strong&gt;rightAnwser&lt;/strong&gt; variable state and show the text &lt;strong&gt;Wrong answer!&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QPYhioA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n1y7sy5opf2hlqt6j0c4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QPYhioA1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n1y7sy5opf2hlqt6j0c4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I give the right answer, the &lt;strong&gt;Svelte&lt;/strong&gt; identifies the &lt;strong&gt;rightAnwser&lt;/strong&gt; variable state and show the text &lt;strong&gt;Right answer!&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bHzvODU8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nd2xxfxle1wdp93hm77l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bHzvODU8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nd2xxfxle1wdp93hm77l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was a simple example that about Svelte reactivity use. If you want to learn more about &lt;strong&gt;Svelte&lt;/strong&gt; I suggest starts by &lt;a href="https://svelte.dev/tutorial/basics"&gt;tutorial&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;The development experience is very great. It's easier to do awesome things with little code. I know that the frameworks like React, Vue, and Angular are already consolidated but, I think that Svelte has your space.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://svelte.dev/tutorial/basics"&gt;https://svelte.dev/tutorial/basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://svelte.dev/blog/svelte-3-rethinking-reactivity#What_is_Svelte"&gt;https://svelte.dev/blog/svelte-3-rethinking-reactivity#What_is_Svelte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/AdNJ3fydeao"&gt;https://youtu.be/AdNJ3fydeao&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reactivemanifesto.org/"&gt;https://www.reactivemanifesto.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>svelte</category>
      <category>reactive</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
