<?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: Afshar</title>
    <description>The latest articles on DEV Community by Afshar (@afsharm).</description>
    <link>https://dev.to/afsharm</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%2F208437%2Fbfc4a69c-11b5-438b-aa0a-cf7c4963a365.png</url>
      <title>DEV Community: Afshar</title>
      <link>https://dev.to/afsharm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afsharm"/>
    <language>en</language>
    <item>
      <title>OAuth CodeFlow without redirection</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Wed, 16 Feb 2022 13:04:46 +0000</pubDate>
      <link>https://dev.to/afsharm/oauth-codeflow-without-redirection-3b49</link>
      <guid>https://dev.to/afsharm/oauth-codeflow-without-redirection-3b49</guid>
      <description>&lt;p&gt;I wanted to implement &lt;code&gt;OAuth 2 Code Flow with PKCE&lt;/code&gt; by help of &lt;code&gt;IdentityServer&lt;/code&gt;. Currently, mobile users put their user/password only in the mobile app. They do not redirect to other pages via browsers or popups. When I use Postman to test APIs, I just call some APIs to get access token. I want no major changes on this part too. I do not like a call back endpoint in my side or a popup window in the postman.&lt;br&gt;
Seems that &lt;code&gt;Code Flow&lt;/code&gt; cannot be implemented without redirections. In the other hands, the user/pass should be entered in the authentication provider directly. My searches for followings was not helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;identityserver oauth2 code flow login without redirect&lt;/li&gt;
&lt;li&gt;identityserver code flow embed login page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A work-around is to embed login page but not sure if it is possible. Postman has an internal mechanism for oauth 2 logging in. It includes entering clientId and client secret then a popup is opened to enter user/pass. However, I was in search of simulating this by several API calls. As my back-end is .Net, I tried to use IdentityServer. I used templates to create a sample application.&lt;/p&gt;

&lt;p&gt;Useful resources I found during this search:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Any ways to get authorization cookies without redirection to IS4 #3858 &lt;a href="https://github.com/IdentityServer/IdentityServer4/issues/3858" rel="noopener noreferrer"&gt;+&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/61325478/oauth2-flow-reason-for-sending-auth-code-via-redirect" rel="noopener noreferrer"&gt;OAuth2 Flow: Reason for sending auth code via redirect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/17427707/whats-the-right-oauth-2-0-flow-for-a-mobile-app" rel="noopener noreferrer"&gt;What's the right OAuth 2.0 flow for a mobile app&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/45887943/identityserver4-with-spa-without-redirecting-to-login-page" rel="noopener noreferrer"&gt;Identityserver4 with SPA without redirecting to Login Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=NRU_KdUSjD4" rel="noopener noreferrer"&gt;imgur oauth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://referbruv.com/blog/posts/implementing-authorization-code-grant-using-identityserver4-with-pkce" rel="noopener noreferrer"&gt;Identity server &amp;amp; oauth 2.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=K_xkWmebxew&amp;amp;t=491s" rel="noopener noreferrer"&gt;+&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://softwareengineering.stackexchange.com/questions/436677/is-it-possible-or-does-it-make-sense-to-use-oauth-2-0-codeflow-pkce-for-an-inter" rel="noopener noreferrer"&gt;Is it possible or does it make sense to use OAuth 2.0 CodeFlow PKCE for an internal authentication provider?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.postman.com/pkce-oauth-how-to/" rel="noopener noreferrer"&gt;OAuth 2.0: Implicit Flow is Dead, Try PKCE Instead&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hem/oauth-2-0-flows-explained-in-gifs-2o7a"&gt;OAuth 2.0 flows explained in GIFs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://auth0.com/docs/get-started/authentication-and-authorization-flow/which-oauth-2-0-flow-should-i-use" rel="noopener noreferrer"&gt;Which OAuth 2.0 Flow Should I Use?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>oauth</category>
      <category>codeflow</category>
      <category>pkce</category>
      <category>identityserver</category>
    </item>
    <item>
      <title>OAuth 2</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Tue, 08 Feb 2022 13:48:43 +0000</pubDate>
      <link>https://dev.to/afsharm/oauth-2-and-aspnet-49mm</link>
      <guid>https://dev.to/afsharm/oauth-2-and-aspnet-49mm</guid>
      <description>&lt;p&gt;&lt;strong&gt;OAuth&lt;/strong&gt; is an open standard to give access to somebody without using password on every request. It usually involves using tokens. &lt;em&gt;OAuth&lt;/em&gt; is published in two versions, &lt;code&gt;OAuth 1.0&lt;/code&gt; on 2009 and &lt;code&gt;OAuth 2.0&lt;/code&gt; on 2013. &lt;em&gt;OAuth&lt;/em&gt; is a service that is complementary to and distinct from OpenID. &lt;em&gt;OAuth&lt;/em&gt; is an authorization protocol, rather than an authentication protocol. &lt;sup&gt;&lt;a href="https://en.wikipedia.org/wiki/OAuth" rel="noopener noreferrer"&gt;[1]&lt;/a&gt;&lt;sup&gt;&lt;/sup&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The requesting, granting, and life management of this token is often referred to as a “flow”. Private clients are typically applications with a backend that can keep a secret to use for authenticating. Public clients have no means of securely keeping a secret, for instance, a single page application that usually doesn’t have a backend. &lt;sup&gt;&lt;a href="https://nordicapis.com/8-types-of-oauth-flows-and-powers/" rel="noopener noreferrer"&gt;[2]&lt;/a&gt;&lt;/sup&gt; Four basic flows are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Code Flow: for private clients, the server responds with a code.&lt;/li&gt;
&lt;li&gt;Implicit Flow: for public clients like SPAs, it is simpler and the server responds with an access token.&lt;/li&gt;
&lt;li&gt;Client Credentials Flow: designed for server-to-server, server responds with an access token, no refresh token exists here.&lt;/li&gt;
&lt;li&gt;Resource Owner Password Credentials Flow: password is entered to the client itself, very simple and designed for legacy and migration only&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Code Flow includes these steps &lt;sup&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2" rel="noopener noreferrer"&gt;[3]&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step 1 — Authorization Code Link&lt;/li&gt;
&lt;li&gt;Step 2 — User Authorizes Application&lt;/li&gt;
&lt;li&gt;Step 3 — Application Receives Authorization Code&lt;/li&gt;
&lt;li&gt;Step 4 — Application Requests Access Token&lt;/li&gt;
&lt;li&gt;Step 5 — Application Receives Access Token&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Proof Key for Code Exchange (PKCE) is an extension to the Code flow which allows it to be used over public clients.&lt;/p&gt;

</description>
      <category>oauth</category>
      <category>oauth2</category>
      <category>codeflow</category>
      <category>pkce</category>
    </item>
    <item>
      <title>Upload file in ASP.NET Core</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Tue, 25 Jan 2022 12:15:08 +0000</pubDate>
      <link>https://dev.to/afsharm/upload-file-in-aspnet-core-26a1</link>
      <guid>https://dev.to/afsharm/upload-file-in-aspnet-core-26a1</guid>
      <description>&lt;p&gt;One task of mine includes uploading file in &lt;code&gt;ASP.NET Core 5&lt;/code&gt;. Last time I did file upload in &lt;code&gt;ASP.NET&lt;/code&gt;, I did it with &lt;code&gt;IFormFile&lt;/code&gt;. However, this time I preferred to make a research if anything is changed so far. I came to sample code from &lt;a href="https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-6.0" rel="noopener noreferrer"&gt;&lt;em&gt;Microsoft&lt;/em&gt;&lt;/a&gt; which is based a non-argument action. I copied the &lt;em&gt;MS&lt;/em&gt; to following sample and put an &lt;code&gt;IFromFile&lt;/code&gt; sample besides it to be referenced together.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Http&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Mvc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.WebUtilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.Net.Http.Headers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Collections.Generic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.IO&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Linq&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Threading.Tasks&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;upload.Controllers&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UploaderController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ControllerBase&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"UploadModelBinding"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;UploadModelBinding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ICollection&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IFormFile&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//model binding or model validation&lt;/span&gt;

            &lt;span class="k"&gt;try&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;fileName&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetRandomFileName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;saveToPath&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Combine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetTempPath&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

                &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;formFile&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formFile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Length&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;FileStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;saveToPath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                        &lt;span class="p"&gt;{&lt;/span&gt;
                            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;formFile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CopyToAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                        &lt;span class="p"&gt;}&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;saveToPath&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Exception&lt;/span&gt; &lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;BadRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Exception generated when uploading file - "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"UploadNoArg"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;UploadNoArg&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//no-argument action&lt;/span&gt;

            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;HttpContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(!&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HasFormContentType&lt;/span&gt; &lt;span class="p"&gt;||&lt;/span&gt;
                &lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="n"&gt;MediaTypeHeaderValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;TryParse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ContentType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;mediaTypeHeader&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;||&lt;/span&gt;
                &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsNullOrEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mediaTypeHeader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Boundary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;UnsupportedMediaTypeResult&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;MultipartReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mediaTypeHeader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Boundary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;section&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReadNextSectionAsync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

            &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;section&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;hasContentDispositionHeader&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ContentDispositionHeaderValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;TryParse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;section&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ContentDisposition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;contentDisposition&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hasContentDispositionHeader&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;contentDisposition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DispositionType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Equals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"form-data"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
                    &lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsNullOrEmpty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contentDisposition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FileName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;fileName&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetRandomFileName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
                    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;saveToPath&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Combine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetTempPath&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

                    &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;targetStream&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IO&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;saveToPath&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                    &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;section&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CopyToAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;targetStream&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;

                    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;

                &lt;span class="n"&gt;section&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReadNextSectionAsync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;BadRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"No files data in the request."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I tested both methods using Postman. Both use &lt;code&gt;form-data&lt;/code&gt; and an entry of type &lt;code&gt;file&lt;/code&gt;. The only difference is that the &lt;code&gt;model binding&lt;/code&gt; method requires that the entry to be named &lt;code&gt;files&lt;/code&gt;. Consider that one methods is using &lt;strong&gt;model binding or model validation&lt;/strong&gt; and another one is using &lt;strong&gt;no-argument action&lt;/strong&gt; technique.&lt;/p&gt;

</description>
      <category>aspnet</category>
      <category>aspnetcore</category>
      <category>upload</category>
    </item>
    <item>
      <title>Running Lubuntu 21.04</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Sat, 22 May 2021 17:42:18 +0000</pubDate>
      <link>https://dev.to/afsharm/running-lubuntu-21-04-ekp</link>
      <guid>https://dev.to/afsharm/running-lubuntu-21-04-ekp</guid>
      <description>&lt;p&gt;I am a long term user of Ubuntu, 2 years recently and another 2 years about 5 years ago. My laptop is not old but it is not so powerful. It has 8 GB of RAM and an AMD A9 CPU. It’s very slow while running Ubuntu specially when using several tabs of Firefox or Chrome and while running applications like Skype. So I decided to give Lubuntu a try. I had ready a lot about how fast it is while being very similar to Ubuntu.&lt;br&gt;
Now it’s 10 days that I have installed Lubuntu 21.04 on my laptop. Simultaneously, I have added a 120 GB SSD storage to it. It’s very fast now. I cannot say it’s because of Lubuntu or SSD, either of them, it is very fast now. I run VS Code, Browsers and some of database management tools and do  React, .Net and Node.js development on daily basis. &lt;br&gt;
With all goodness, I have some problems with Lubuntu which I have listed below. For some of them, I have found some solutions by far, some of them will be solved soon and some of them may need far more knowledge to solve.&lt;br&gt;
First issue was that partitioning during installation did not give me option to determine swap size. Second issue but perhaps one of big issues was that shortcuts changed a lot and pre-installed apps changed a lot. It took a lot to get used to again. Third issue was that I could not find solution to avoid wake on laptop lid open. I spent some time on it but was not successful. Other issues are as follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Persian Keyboard was easy to install, but finding/defining a shortcut to switch between keyboard layouts was really though. Finally I find a work-around &lt;a href="https://forum.ubuntu.ir/index.php?topic=37672.0" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Sleep by closing lid causes crash. [SOLVED] by arbitrary changes and updates&lt;/li&gt;
&lt;li&gt;When using LibreOffice Calc/Writer I encountered several screen mess up in a way that nothing can be read. I forced  to window resize several time again. An update on LibreOffice solved the problem magically.&lt;/li&gt;
&lt;li&gt;A border has appeared on my desktop. It is a thick black one. It is not related to graphic card. Because some applications like Firefox and VS Code can easily toggle full screen and used all my screen.&lt;/li&gt;
&lt;li&gt;I saw some ACPI Error on startup in first days. It was something related to Graphic card. I did not say the error again.&lt;/li&gt;
&lt;li&gt;Wifi interface was not recognized in first place, but some hacks solved the problem. Open &lt;code&gt;software sources&lt;/code&gt;, open &lt;code&gt;Other Software&lt;/code&gt; tab. Check both &lt;code&gt;Canonical Partners&lt;/code&gt; options. Finally, in &lt;code&gt;Additional Drivers&lt;/code&gt; tab, select &lt;code&gt;Using DKMS source for the Realtek 8821C PCIe Wi-Fi driver from rtl8821ce-dkms (open source)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It seems that my webcam is not recognized yet.&lt;/li&gt;
&lt;li&gt;Cannot format/partition USB disk. All guides are about Ubuntu Disks. I need this option specially because my USB is bootable and now it needs to be partitioned again. [SOLVED] I realized that I should use KDE partition manager. Also I can install gnome-disk which is Ubuntu standard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyway, as far as I can program Nodes.js, React.js and ASP.NET Core, I am happy with it. Specially now that is fast enough (yet!)&lt;/p&gt;

</description>
      <category>lubuntu</category>
      <category>ubuntu</category>
      <category>linux</category>
    </item>
    <item>
      <title>Stuff mentioned in a microservice related job posting</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Wed, 23 Dec 2020 10:28:37 +0000</pubDate>
      <link>https://dev.to/afsharm/stuff-mentioned-in-a-microservice-related-job-posting-3ha4</link>
      <guid>https://dev.to/afsharm/stuff-mentioned-in-a-microservice-related-job-posting-3ha4</guid>
      <description>&lt;p&gt;When I was reading a job posting, I encountered a bunch of technologies and tools which they have had stated as requirements. I feel this is a lengthy list for a job posting, so I am going to review each one with a more detail. You can imagine this as a cheat sheet! Almost all technologies, tools and patterns are common in distributed and microservice architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zabbix
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Zabbix" rel="noopener noreferrer"&gt;Zabbix&lt;/a&gt; is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines (VMs) and cloud services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prometheus
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Prometheus_(software)" rel="noopener noreferrer"&gt;Prometheus&lt;/a&gt; is a free software application used for event monitoring and alerting.[2] It records real-time metrics in a time series database (allowing for high dimensionality) built using a HTTP pull model, with flexible queries and real-time alerting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grafana
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Grafana" rel="noopener noreferrer"&gt;Grafana&lt;/a&gt; is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kong
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Kong_Inc." rel="noopener noreferrer"&gt;Kong&lt;/a&gt; is an open-source API and Microservices gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Service Mesh
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Service_mesh" rel="noopener noreferrer"&gt;Service mesh&lt;/a&gt; is a dedicated infrastructure layer for facilitating service-to-service communications between microservices, often using a sidecar proxy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharding
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Shard_(database_architecture)" rel="noopener noreferrer"&gt;A database shard&lt;/a&gt;, or simply a shard, is a horizontal partition of data in a database or search engine. Each shard is held on a separate database server instance, to spread load. Some data within a database remains present in all shards,[notes 1] but some appears only in a single shard. Each shard (or server) acts as the single source for this subset of data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replica Set
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/mongodb/mongodb_replication.htm" rel="noopener noreferrer"&gt;A replica set&lt;/a&gt; is a group of &lt;code&gt;mongod&lt;/code&gt; instances that host the same data set. In a replica, one node is primary node that receives all write operations. All other instances, such as secondaries, apply operations from the primary so that they have the same data set. Replica set can have only one primary node.&lt;/p&gt;

&lt;h2&gt;
  
  
  SAGA Pattern
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/saga/saga" rel="noopener noreferrer"&gt;The Saga Pattern&lt;/a&gt; is as microservices architectural pattern to implement a transaction that spans multiple services.&lt;/p&gt;

&lt;h2&gt;
  
  
  2PC (Two-phase commit protocol)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Two-phase_commit_protocol" rel="noopener noreferrer"&gt;It is a distributed algorithm&lt;/a&gt; that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction (it is a specialized type of consensus protocol).&lt;/p&gt;

&lt;h2&gt;
  
  
  Istio
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.redhat.com/en/topics/microservices/what-is-istio" rel="noopener noreferrer"&gt;Istio&lt;/a&gt; is an open source service mesh platform that provides a way to control how microservices share data with one another. It includes APIs that let Istio integrate into any logging platform, telemetry, or policy system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linkerd
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/linkerd/linkerd" rel="noopener noreferrer"&gt;Linkerd&lt;/a&gt; is a transparent service mesh, designed to make modern applications safe and sane by transparently adding service discovery, load balancing, failure handling, instrumentation, and routing to all inter-service communication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kafka
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Apache_Kafka" rel="noopener noreferrer"&gt;Apache Kafka&lt;/a&gt; is an open-source stream-processing software platform. The project aims to provide a unified, high-throughput, low-latency platform for handling real-time data feeds.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebSocket
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/WebSocket" rel="noopener noreferrer"&gt;The WebSocket protocol&lt;/a&gt; enables interaction between a web browser (or other client application) and a web server with lower overhead than half-duplex alternatives such as HTTP polling, facilitating real-time data transfer from and to the server. This is made possible by providing a standardized way for the server to send content to the client without being first requested by the client, and allowing messages to be passed back and forth while keeping the connection open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Socket.IO
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Socket.IO" rel="noopener noreferrer"&gt;Socket.IO&lt;/a&gt; is a JavaScript library for realtime web applications. It enables realtime, bi-directional communication between web clients and servers. It has two parts: a client-side library that runs in the browser, and a server-side library for Node.js. Both components have a nearly identical API. Like Node.js, it is event-driven.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sentry
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/getsentry/sentry" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt; is a service that helps you monitor and fix crashes in realtime. The server is in Python, but it contains a full API for sending events from any language, in any application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jaeger
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/jaegertracing/jaeger" rel="noopener noreferrer"&gt;Jaeger&lt;/a&gt; can be used for monitoring microservices-based distributed systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Distributed context propagation&lt;/li&gt;
&lt;li&gt;Distributed transaction monitoring&lt;/li&gt;
&lt;li&gt;Root cause analysis&lt;/li&gt;
&lt;li&gt;Service dependency analysis&lt;/li&gt;
&lt;li&gt;Performance / latency optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Envoy
&lt;/h2&gt;

&lt;p&gt;As on the ground microservice practitioners quickly realize, the majority of operational problems that arise when moving to a distributed architecture are ultimately grounded in two areas: networking and observability. It is simply an orders of magnitude larger problem to network and debug a set of intertwined distributed services versus a single monolithic application. Originally built at Lyft, &lt;a href="https://www.envoyproxy.io/" rel="noopener noreferrer"&gt;Envoy&lt;/a&gt; is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kiali
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://kiali.io/" rel="noopener noreferrer"&gt;Kiali&lt;/a&gt; is a management console for Istio-based service mesh. It provides dashboards, observability and lets you to operate your mesh with robust configuration and validation capabilities. It shows the structure of your service mesh by inferring traffic topology and displays the health of your mesh. Kiali provides detailed metrics, powerful validation, Grafana access, and strong integration for distributed tracing with Jaeger.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitFlow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html" rel="noopener noreferrer"&gt;GitFlow&lt;/a&gt; is a branching model for Git.&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>interview</category>
      <category>servicemesh</category>
      <category>apigateway</category>
    </item>
    <item>
      <title>Coding websites</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Mon, 21 Dec 2020 08:43:17 +0000</pubDate>
      <link>https://dev.to/afsharm/coding-websites-4abj</link>
      <guid>https://dev.to/afsharm/coding-websites-4abj</guid>
      <description>&lt;p&gt;Most companies use coding challenges to asses candidate's technical abilities. In most cases, they put this assessment prior than any other interview or discussion. Many developers have gone through processes of a few challenges like this.&lt;/p&gt;

&lt;p&gt;Process usually starts with decision of developer about what programming language they are comfortable with. People may prefer JavaScript, C++, Python or anything else. Then a problem is presented in a task format. Candidate is asked to solve the problem with the preferred language. Usually this is a pure problem solving effort which finally leads to develop an algorithm.&lt;/p&gt;

&lt;p&gt;The whole process is taking place in a special website. Such websites may provide an online IDE with some features like intellisense or just provide a way to upload the final source code. Some of them have automated tests which indicate if your code works expectedly or not.&lt;/p&gt;

&lt;p&gt;Coding websites are not dedicated to interview questions only. Many of them have an assessment path which is like a learning course or like a tournament. People can register for, and follow each step. By this, they increase both their coding skills and their rank. It's common for companies to hire from high rank members of the website.&lt;/p&gt;

&lt;p&gt;Not all coding challenges are problem-solving only. Some challenges are based on technologies rather than algorithms. For instance, they may be based on React.js, Laravel or Django.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.hackerrank.com/" rel="noopener noreferrer"&gt;HankerRank&lt;/a&gt; is one of coding website which support most of the features described here. Another ones are &lt;a href="https://skillenza.com/" rel="noopener noreferrer"&gt;Skillenza&lt;/a&gt;, &lt;a href="https://www.codechef.com/" rel="noopener noreferrer"&gt;CodeChef&lt;/a&gt;, &lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;LeetCode&lt;/a&gt; and, &lt;a href="https://quera.ir/" rel="noopener noreferrer"&gt;Quera&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do you know any other coding website?&lt;/p&gt;

</description>
      <category>hackerrank</category>
      <category>coding</category>
      <category>codingwebsite</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>An API Gateway</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Wed, 16 Dec 2020 15:51:48 +0000</pubDate>
      <link>https://dev.to/afsharm/an-api-gateway-4ioj</link>
      <guid>https://dev.to/afsharm/an-api-gateway-4ioj</guid>
      <description>&lt;p&gt;Liquid syntax error: 'raw' tag was never closed&lt;/p&gt;
</description>
      <category>apigateway</category>
      <category>microservices</category>
      <category>dotnet</category>
      <category>valdis</category>
    </item>
    <item>
      <title>My second try on Ubuntu</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Tue, 15 Dec 2020 12:53:20 +0000</pubDate>
      <link>https://dev.to/afsharm/my-second-try-on-ubuntu-2jco</link>
      <guid>https://dev.to/afsharm/my-second-try-on-ubuntu-2jco</guid>
      <description>&lt;h2&gt;
  
  
  First try
&lt;/h2&gt;

&lt;p&gt;Well, I am a software engineer for years, and I'm used to &lt;strong&gt;Microsoft&lt;/strong&gt; technologies. During 2016, I decided to migrate to &lt;strong&gt;Ubuntu&lt;/strong&gt; from &lt;strong&gt;Windows&lt;/strong&gt;. Mainly because of two reasons. Firstly, I wanted to diversify my tech stack, and add non-Microsoft technologies to my portfolio. Secondly, because I was in the belief that stacks like Python, Ruby or Node enable developers to make things more rapidly.&lt;/p&gt;

&lt;p&gt;I did the migration but never was successful on migrating to development stacks other than Microsoft. It was due a fact that my startup at the time failed and I joined a company with a die-hard Microsoft only boss! Finally, I gave up and switched back to Windows after a so 1.5 years. During that period I leaned many thing about Linux and Ubuntu. More importantly, I gained enough confidence on daily usage of Ubuntu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second try
&lt;/h2&gt;

&lt;p&gt;Years passed and I felt love of Django/Node in my heart again. As same as the first time, my reason was increasing the diversity in my resume. In addition to this motivation, I had another factor to make another move toward Linux. Yes, it was performance. My new Laptop which is an AMD A9-9425, is not fast enough to run Windows 10. In other words, this time I was forced to install Ubuntu on my machine because of its poor performance.&lt;/p&gt;

&lt;p&gt;After all, I gave in to the temptation and made my machine a dual boot of Windows 10 and Ubuntu 20.04. I'm now happy with the performance. And fortunately, .Net has a far better support of Ubuntu that its early days of .Net Core 1.x. Now, I am getting used to PostgreSQL which runs smoothly in the Ubuntu. Also, I am getting more comfortable with LibreOffice. Thanks you Visual Studio Code, I wish no other IDE here. I have both FireFox and Chrome on my machine as same as on Windows 10.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tricks that worked
&lt;/h2&gt;

&lt;p&gt;In addition to PostgreSQL, I did another change in my habits which let me be more successful in this migration. I am still dual boot and time to time run Windows. I have put all my documents, source codes, videos, music files, etc in a NTFS partition. As Ubuntu can read/write NTFS partitions easily, I have access to all my files from both OS easily. Before this, I was forced to consider one the operating system as the main one. So does not have access to the filer in another OS.&lt;/p&gt;

&lt;p&gt;As the third trick I can mention the same tool policy across two parts. I use Visual Studio Code, LibreOffice, GIMP, FireFox, Chrome, Skype, Thunderbird, Kdenlive and DropBox (in the first try) in both Windows and Ubuntu. Many other services are same as they are delivered via web not desktop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unresolved issue
&lt;/h2&gt;

&lt;p&gt;By they, I still have some unresolved issue with Linux/Ubuntu:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Network configuration in Ubuntu is different than Windows. Whenever I am in need of configuration of a VPN, I burst into tears. More of guides and tool are Windows based and I have not enough to master network in Linux.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have a HP LaserJet M1212nf MFP printer-scanner which is not working properly in Ubuntu. Some it prints a page full of black and white bars instead of the image I have to requested to be printed. Unfortunately, I have found no more than one driver for it. Also I am restricted to USB gateway only.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have not found a free alternative to Microsoft SQL Server Management Studio tool yet. Once I explored DataGrip, but it is not as good as Management Studio. Still missing my huge friend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As far as I'm doing development tasks, everything is almost OK. However, once I try to use other tools, I bang to the wall. I can not run many tools which other people run as non developers. For example, I can not easily utilize Adobe Connect or AutoCAD.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would be very glad if some day I can resolve the remaining issues.&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>linux</category>
      <category>windows</category>
      <category>dualboot</category>
    </item>
    <item>
      <title>Answering StackOverflow questions</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Sat, 12 Dec 2020 15:05:15 +0000</pubDate>
      <link>https://dev.to/afsharm/answering-stackoverflow-questions-4en0</link>
      <guid>https://dev.to/afsharm/answering-stackoverflow-questions-4en0</guid>
      <description>&lt;p&gt;By now, it is several years that StackOverflow is one of highest ranked resource of questions and answers for developers. Many of us, visit StackOverflow at least once a week. Codes and solutions posted on StackOverflow has been entered many code based world wide. Rather than its usage as a source of information, it is also a play ground for competitors who fight for higher reputation. Everybody loves those numbers in front of their user names, especially when it is shown with a K character.&lt;/p&gt;

&lt;p&gt;Personally, I am too a fun of StackOverflow reputation. I feel it enriches my resume. Also, I feel it shows how I am a master of some field in spite of the fact some people believe that StackOverflow is not a good metric to show someone's expertise. By the way, I spend some of my time answering StackOverflow questions in an irregular manner. Some days I feel lucky because I found some good questions, answers them and hopefully they are accepted. When I am really lucky, I even answer out-of-my-skills questions. But some days, I read many questions and review many answers, however, I do not find a question to answer. The tougher problem is that my reputation does not get raised much by increasing amounts of just 10 or 20. I'd like a reputation of 50K which needs thousand of accepted answers.&lt;/p&gt;

&lt;p&gt;The more I tries, the more work-arounds I find. I found that it is better to do my answering effort base on North America's timezones rather Middle East or even Europe's timezones. During working hours of Middle East, the frequency of questions are very low. It gets better when working hours of Europe begins and, it is in its highest rate when working hours of North America begins. Same is true for working days of the week. In most parts of the Middle East, Sunday is a working day. On Sundays, there are little question to answer despite the fact that Middle Eastern are on work.&lt;/p&gt;

&lt;p&gt;I have created a list of watched and ignored tags. But they do help a lot. As soon as I try to answer a question, someone else has posted theirs. And the other way, when a question remains un-answered for a long time, it usually means it is not a simple question to answer.&lt;/p&gt;

&lt;p&gt;Today, I did &lt;a href="https://meta.stackexchange.com/questions/17204/six-simple-tips-to-get-stack-overflow-reputation-fast" rel="noopener noreferrer"&gt;some search and learnt some tips&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid Wall-of-Text questions. They take way too much effort for little reward. And usually are syntax errors or bad structure.&lt;/li&gt;
&lt;li&gt;Post an answer even if the question already has 1–2 or even 3 answers. In these cases, take your time and answer well. This will usually net you a good sum of rep.&lt;/li&gt;
&lt;li&gt;Learn when to edit. Post a short answer at first and then edit. You have &amp;lt;5 minutes to make that answer shine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am still hopeful to find some ways to earn &lt;a href="https://stackoverflow.com/users/167670/" rel="noopener noreferrer"&gt;reputations&lt;/a&gt; rapidly!&lt;/p&gt;

</description>
      <category>stackoverflow</category>
      <category>reputation</category>
    </item>
    <item>
      <title>Django and Heroku</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Thu, 10 Dec 2020 13:02:04 +0000</pubDate>
      <link>https://dev.to/afsharm/django-and-heroku-2dif</link>
      <guid>https://dev.to/afsharm/django-and-heroku-2dif</guid>
      <description>&lt;p&gt;I have used Heroku for hosting a Node.js/Express application once before. It was really easy. I created a project in Heroku, chained it to my Github project and indicated it as an automatic build. All I did was this. I just saw Heroku identifying my language and platform correctly, building and deploying it. Adding a PostgreSQL instance was not problematic too. I read the connection string from the environment, restored a backup and app get run instantly. Based on this experience, I decided to go the same path for a Django/Python project.&lt;/p&gt;

&lt;p&gt;It did not work in the first try. Soon, I realized that I should add many stuff to project so Heroku can run my app. Additionally, as it was the first time that this project was going to be hosted in production, I did some work to get it to work. For instance, used &lt;code&gt;dj_database_url&lt;/code&gt; for parsing PostgreSQL's connection URL. Then enabled correct &lt;code&gt;CORS&lt;/code&gt; policy and and set &lt;code&gt;ALLOWED_HOSTS&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After set the project to run correctly in a production instance, I added some stuff required by Heroku. It included &lt;code&gt;Procfile&lt;/code&gt; and &lt;code&gt;requirements.txt&lt;/code&gt; and their proper content. While searching online, I found &lt;a href="https://github.com/heroku/python-getting-started" rel="noopener noreferrer"&gt;Heroku's formal sample for a bare minimum Django project for Heroku&lt;/a&gt;. It helped me a lot. Finally, I saw my project's API run correctly and happily.&lt;/p&gt;

&lt;p&gt;My Django/Python had an app which was based on server side rendering. I just tried that part and, oh my god! it was not working! &lt;code&gt;CSS&lt;/code&gt; and &lt;code&gt;JS&lt;/code&gt; files were not served correctly. I just saw a bunch of &lt;code&gt;404&lt;/code&gt; errors in the browser's console. Investigating the problem, I realized that it is because of static file not configured correctly. My local had not any problem, But Heroku one showed either 404 error or Heroku build errors. I did about &lt;a href="https://github.com/afsharm/wps/" rel="noopener noreferrer"&gt;10 commits&lt;/a&gt; so the problem solved.&lt;/p&gt;

&lt;p&gt;I have many experiences with ASP.NET/IIS, it was not surprising me if the IIS configuration is hard. But I expected an easier process with Django/Python. By the way, project is now running in Heroku based on PostgreSQL happily!&lt;/p&gt;

</description>
      <category>django</category>
      <category>heroku</category>
      <category>python</category>
      <category>experience</category>
    </item>
    <item>
      <title>Two weeks of code, challenge and interview questions</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Tue, 08 Dec 2020 16:27:54 +0000</pubDate>
      <link>https://dev.to/afsharm/two-weeks-of-code-challenge-and-interview-questions-2hna</link>
      <guid>https://dev.to/afsharm/two-weeks-of-code-challenge-and-interview-questions-2hna</guid>
      <description>&lt;p&gt;It's about two weeks from last writing here. I have been busy doing various tasks during the time. None tasks were really related to each other. Indeed, I used different tech stack for each one, attended business meetings from different projects and, read articles in much different subjects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Django/Python
&lt;/h2&gt;

&lt;p&gt;After an interesting period of automated CI/CD with Heroku and Netlify, I, temporarily, switched to Python. I had a &lt;a href="https://github.com/afsharm/wps/" rel="noopener noreferrer"&gt;sandbox project on Django/Python&lt;/a&gt; from 5 years ago. In first step, I upgraded it to the current version of Django as some APIs were retired or changes. To be honest, it was a much easier migration than those similar ones in ASP.NET universe. Seems that change speed in Python/Django is much slower than ASP.NET/C#. I remember similar feeling when comparing .Net to Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code challenge
&lt;/h2&gt;

&lt;p&gt;I had one strange code challenge last week. They provided me with a challenge which looked pretty weird. An ASP.NET project that should have call an API and calculate a special number. In the way I'm used to, I didn't spend a complete week on it, but just dedicated 10 hours. Naturally, the final code was no way complete. However, they told me that my code has several issues. They told that the code does not contains any unit tests, DI principle is not completely followed and no sub-projects has been established. While the code has just few files and classes, it was not logical that I spread 4 or 5 files into several sub projects like .API, .Core and .Tests projects. I can argue that using interfaces is not a good idea when only one implementation exists for now and in the future, so why introduce redundant interfaces and injecting it into DI system? Same reasoning is true when we say each 5 line DTO class should have a dedicated file. So, what about a lean project structure? Not to mention that the goal was to create back-end for a small startup, not a fancy enterprise application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blockchain
&lt;/h2&gt;

&lt;p&gt;While I feel it's too early to see blockchain projects in the list of small teams, startups and companies, I meet someone who was trying to find a team to create a blockchain project. I read some articles on blockchain, explored &lt;a href="https://github.com/hyperledger" rel="noopener noreferrer"&gt;Hyperledger&lt;/a&gt;, and realized that it is Python, Rust and Go that dominants this world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other opportunities
&lt;/h2&gt;

&lt;p&gt;Well, I have a long term exposure to ERP in my career history. In addition, ERP and enterprise solutions have a big share in IT market in the country. This week I reviewed some solutions again and, analyzed how can we develop or implement some parts of an enterprise solution.&lt;/p&gt;

&lt;p&gt;For years, I'm having security, polyglottery, distributed computing and soft skills in my mastering list. However, after focusing on interview questions and processes, I feel I should add algorithm with a high priority to this list. It seems that companies have great passion on algorithms, more than design and architectural subjects like DDD and SOLID and, even more than problem solving, team participating and even more than personality and learning skills.&lt;/p&gt;

</description>
      <category>codechallenge</category>
      <category>blockchain</category>
      <category>erp</category>
      <category>interview</category>
    </item>
    <item>
      <title>Experiencing polyglottery</title>
      <dc:creator>Afshar</dc:creator>
      <pubDate>Mon, 23 Nov 2020 11:24:41 +0000</pubDate>
      <link>https://dev.to/afsharm/experiencing-polyglottery-1ae1</link>
      <guid>https://dev.to/afsharm/experiencing-polyglottery-1ae1</guid>
      <description>&lt;h2&gt;
  
  
  Perks of being a polygot
&lt;/h2&gt;

&lt;p&gt;A polygot software engineer is someone who can develop with multiple programming languages. It can be extended to platforms or technologies which someone utilize to create software.&lt;/p&gt;

&lt;p&gt;In the last couple of days, I've been working on different pieces of two projects. Each piece belongs to a different platform or technology, hence I can claim that I've been trying to be a polygot software engineer! While some people prefer to focus on one technology/language at a time rather than polyglottery, I enjoy practicing this. Whenever I can switch easily between stacks, I feel I am a powerful software engineer. Being able to code in different programming languages enters me to more professional communities. Rather than its pleasure, being a polygot improves your resume. When you can develop on different platforms, number of projects you can participate or number of team you can join, increases. Furthermore, people who wish to be a CTO or even a technical lead, should try polyglottery, because this way, they can make better decisions on the stack they will use in their team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stacks which I used
&lt;/h2&gt;

&lt;p&gt;I'm, simultaneously, working on two projects. One project in &lt;strong&gt;.Net&lt;/strong&gt; which tends to be implemented with microservice architecture, and another one which is developing with &lt;strong&gt;Node.js/Express&lt;/strong&gt; as back-end, &lt;strong&gt;PostgreSQL&lt;/strong&gt; as database and &lt;strong&gt;Vue.js&lt;/strong&gt; as front-end. Both project have a good degree of variety.&lt;/p&gt;

&lt;p&gt;I am originally a back-end developer coming from &lt;em&gt;Microsoft&lt;/em&gt; universe. However, the &lt;strong&gt;.Net&lt;/strong&gt; project has its own challenges for me. I am totally developing and debugging on a Linux machine rather than Windows. Additionally, I am using &lt;em&gt;PostgreSQL&lt;/em&gt; as the database rather &lt;strong&gt;MSSQL&lt;/strong&gt;. Not to forget xUnit which I am using for first time.&lt;/p&gt;

&lt;p&gt;As a &lt;strong&gt;C#&lt;/strong&gt; developer, I found &lt;strong&gt;JavaScript&lt;/strong&gt; as the most helpful language as an alternative to &lt;em&gt;C#&lt;/em&gt;. I have used &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;Ruby&lt;/strong&gt; in short periods of time, but &lt;em&gt;JavaScript&lt;/em&gt; is more useful in my situation. It is the dominant language in front-end development. As I am very excited about front-end development, it helps me to move faster. Consequently, I chose a &lt;em&gt;JavaScript&lt;/em&gt; based technologies for development. &lt;em&gt;Nodes.js&lt;/em&gt;, &lt;em&gt;Express.js&lt;/em&gt; and &lt;em&gt;PostgreSQL&lt;/em&gt; as back-end, and &lt;em&gt;Vue.js&lt;/em&gt; as front-end.&lt;/p&gt;

&lt;h2&gt;
  
  
  .Net project
&lt;/h2&gt;

&lt;p&gt;The project is based on &lt;em&gt;.Net Core 3.1&lt;/em&gt; which will be upgraded to &lt;em&gt;.Net 5&lt;/em&gt; soon. I'm using &lt;strong&gt;xUnit.net&lt;/strong&gt; for first time in this project. It's being used for both unit testing and integration testing. The unit testing part was not hard. However, as the integration tester, it took a lot of time to set up correctly. Test web server, which is an in-memory web server running instead of actual one, was refusing my settings about database and injected services. However, finally I found some way to utilize all its power. Now, my project have several integration tests which test &lt;em&gt;API&lt;/em&gt; endpoints smoothly on an in-memory &lt;em&gt;Entity Framework&lt;/em&gt; database. It also allows me to resolve services from test web server to test additional aspects of the code. During the tests, I get used to &lt;em&gt;C# dynamic&lt;/em&gt; feature alongside appropriate JSON serializer/deserializer which helped a lot in writing clean tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Microservice architecture
&lt;/h3&gt;

&lt;p&gt;The .Net project which I am working on is not alone. It's part of a group of project which form a big solution. There are at lease one another .Net project, a &lt;strong&gt;React.js&lt;/strong&gt; front-end, a &lt;strong&gt;React Native&lt;/strong&gt; mobile app, and a &lt;strong&gt;PWA&lt;/strong&gt; yet to emerge. Considering back-end, I was in the dilemma to merge all back-end projects, mine and current another project, into one project with a single startup, or run each one in its own process. I chose the latter option because, there is little communication between me as the sole developer of my project and the team working on the other project. As other projects and teams may join in future, I decided to use microservice architecture here.&lt;/p&gt;

&lt;p&gt;I checked &lt;a href="https://dotnet.microsoft.com/apps/aspnet/microservices" rel="noopener noreferrer"&gt;Microsoft guide for microservice architecture&lt;/a&gt; and read &lt;a href="https://dotnet.microsoft.com/download/e-book/microservices-architecture/pdf" rel="noopener noreferrer"&gt;their e-book on microservice architecture architecture&lt;/a&gt;. Also, dedicate some times to know more about &lt;strong&gt;Docker&lt;/strong&gt; and &lt;strong&gt;RabbitMQ&lt;/strong&gt;. Finally, chose &lt;strong&gt;REST HTTP&lt;/strong&gt; as the communication channel between projects. As the first project is playing &lt;em&gt;API Gateway&lt;/em&gt; too, I created a bridge middleware to proxy requests to the other project after authorization and logging.&lt;/p&gt;

&lt;p&gt;Also, a process is running to implement &lt;strong&gt;JWT&lt;/strong&gt; as the security token and possibly, using &lt;strong&gt;Redis&lt;/strong&gt; for black-listing revoked tokens. I'm also considering &lt;a href="https://github.com/paragonie/paseto" rel="noopener noreferrer"&gt;PASETO&lt;/a&gt; as a modern alternative for &lt;em&gt;JWT&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript stack
&lt;/h2&gt;

&lt;p&gt;This part is more interesting for me. Many parts of the work is new to me including JavaScript itself, Express.js, Vue.js, PostgreSQL, PWA, front-end development in general and CI/CD provided by &lt;strong&gt;GitHub&lt;/strong&gt;, &lt;strong&gt;Heroku&lt;/strong&gt; and &lt;strong&gt;Netlify&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Node.js/Express.js
&lt;/h2&gt;

&lt;p&gt;This is the easiest part. I am used to &lt;em&gt;Node.js&lt;/em&gt; from other development environments including &lt;em&gt;React.js&lt;/em&gt;. Additionally, Express.js as the back-end part behind APIs is not far from &lt;em&gt;ASP.NET Core API&lt;/em&gt;. The only part which I feel uncomfortable with yet is lack of structure which I'm used to from &lt;em&gt;C#&lt;/em&gt;. Moreover, I had some struggles setting up PostgreSQL. It's a relational database like MS-SQL, but syntaxes and routines are not same. Backing up and restoring were the most challenging part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vue.js
&lt;/h2&gt;

&lt;p&gt;Last year, on another project, I chose &lt;em&gt;React.js&lt;/em&gt; over &lt;em&gt;Angular&lt;/em&gt; as it was, in my opinion, easier to learn. Most people know at least something about JavaScript. They are more open to it rather than &lt;strong&gt;TypeScript&lt;/strong&gt;. Additionally, &lt;em&gt;React.js&lt;/em&gt; had, and may still have, broader job market meaning that finding new developers on &lt;em&gt;React.js&lt;/em&gt; is more feasible than developers on &lt;em&gt;Angular&lt;/em&gt;. That time, I withdrew &lt;em&gt;Vue.js&lt;/em&gt; in spite of the fact that it was easier to learn, and also had higher speed of development making it more suitable for &lt;a href="https://en.wikipedia.org/wiki/Minimum_viable_product" rel="noopener noreferrer"&gt;MVP&lt;/a&gt;. This time I chose &lt;em&gt;Vue.js&lt;/em&gt; for some of reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I need its rapid development to create a minimum product quickly&lt;/li&gt;
&lt;li&gt;Learning &lt;em&gt;Vue.js&lt;/em&gt; alongside my current acquittance with &lt;em&gt;React.js&lt;/em&gt; is enriching my resume&lt;/li&gt;
&lt;li&gt;Its job market has grew substantially from last year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've started to code my project based on a boilerplate code which I've found on internet. To get started, I read essential parts of &lt;strong&gt;Vue.js 3&lt;/strong&gt; from its &lt;a href="https://v3.vuejs.org/guide/" rel="noopener noreferrer"&gt;official guide&lt;/a&gt;. Taking components structure aside, methods, JavaScript and &lt;a href="https://github.com/axios/axios" rel="noopener noreferrer"&gt;axios&lt;/a&gt; are sweet to work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  PWA
&lt;/h2&gt;

&lt;p&gt;PWA, &lt;strong&gt;Progressive Web Application&lt;/strong&gt;, is the buzz word of the day. They are marketed as an alternative of native apps. For me, it is a cheaper way to conquer users' smart phones. Before considering PWA, I was researching about &lt;strong&gt;Flutter&lt;/strong&gt; as my potential choice for mobile development. PWA can be a great re-use of your current front-end codebase specially if you are not heavily dependant on device's hardware and offline usage. Adding a &lt;strong&gt;manifest&lt;/strong&gt; and registering a &lt;strong&gt;service worker&lt;/strong&gt; is not hard stuff to do.&lt;/p&gt;

&lt;p&gt;My experience of PWA is based on a yet simple &lt;em&gt;Vue.js&lt;/em&gt; codebase. Taking &lt;em&gt;manifest&lt;/em&gt;, &lt;em&gt;service worker&lt;/em&gt; and a simple responsive template aside, I enjoyed using &lt;strong&gt;Local Storage&lt;/strong&gt; to add some offline functionality. An unresolved problem exists which causes not automatic update of added to home screen app.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD
&lt;/h2&gt;

&lt;p&gt;My projects are hosted on &lt;em&gt;GitHub&lt;/em&gt;. Curiosity tempted to test &lt;em&gt;Netlify&lt;/em&gt; as the automated host for the front-end. It was not hard at all. After signing up to the &lt;em&gt;Netlify&lt;/em&gt; and integration with &lt;em&gt;GitHub&lt;/em&gt;, &lt;em&gt;Netlify&lt;/em&gt; detected &lt;em&gt;Vue.js&lt;/em&gt; automatically, and dedicated a temporarily &lt;em&gt;CDN&lt;/em&gt; for my project. Now, I'm very comfortable: I just push to GitHub and wait some seconds. After a while I'm delighted with a published version of my source code under &lt;em&gt;HTTPS&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Same process happened for &lt;em&gt;Node/Express&lt;/em&gt; part. I found a free hosting of &lt;em&gt;PostgreSQL&lt;/em&gt; on &lt;em&gt;Heroku&lt;/em&gt;. Then, paired &lt;em&gt;Heroku&lt;/em&gt; with my &lt;em&gt;GitHub&lt;/em&gt; repository to make automatic publishes happen. Again, backup/restore data with cloud-hosted &lt;em&gt;PostgreSQL&lt;/em&gt; came with some struggles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally
&lt;/h2&gt;

&lt;p&gt;I am doing all of this on an &lt;em&gt;Ubuntu 20.04&lt;/em&gt;, AMD A9 machine during &lt;em&gt;COVID-19&lt;/em&gt; pandemic. &lt;strong&gt;Visual Studio Code&lt;/strong&gt; is perfectly satisfying all my need of a code editor. Also, it is serving my debugging requirements.&lt;/p&gt;

</description>
      <category>polygot</category>
      <category>express</category>
      <category>vue</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
