<?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: Arun Yadav</title>
    <description>The latest articles on DEV Community by Arun Yadav (@enggaruny).</description>
    <link>https://dev.to/enggaruny</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%2F599736%2F195bfd86-a47e-47d6-a272-cc39f4495297.jpeg</url>
      <title>DEV Community: Arun Yadav</title>
      <link>https://dev.to/enggaruny</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/enggaruny"/>
    <language>en</language>
    <item>
      <title>Part 01 - Clean Architecture Overview</title>
      <dc:creator>Arun Yadav</dc:creator>
      <pubDate>Mon, 06 Feb 2023 11:58:40 +0000</pubDate>
      <link>https://dev.to/enggaruny/part-01-clean-architecture-overview-387m</link>
      <guid>https://dev.to/enggaruny/part-01-clean-architecture-overview-387m</guid>
      <description>&lt;p&gt;Clean Architecture: Maintainable, Testable, and Scalable Applications&lt;/p&gt;

&lt;p&gt;Originally Posted on: &lt;a href="https://www.arunyadav.in/codehacks/blogs/post/20/part-01-clean-architecture-overview" rel="noopener noreferrer"&gt;https://www.arunyadav.in/codehacks/blogs/post/20/part-01-clean-architecture-overview&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In software development, creating a well-designed and organized application is crucial for success. Clean Architecture is a software design principle that can help you achieve this goal by separating an application into distinct parts. This makes it easier to &lt;code&gt;maintain&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt;, and &lt;code&gt;scale&lt;/code&gt; the application over time.&lt;/p&gt;

&lt;p&gt;The main idea behind Clean Architecture is to keep the business logic of an application isolated from external factors, such as presentation, infrastructure, and persistence. This separation of concerns makes it easier to change and maintain the application, as well as test it without affecting other parts of the code.&lt;/p&gt;

&lt;p&gt;Clean Architecture consists of several circles or layers, each with a specific responsibility. The &lt;code&gt;innermost&lt;/code&gt; circle is the business logic, which is the core of the application. This layer is isolated from external factors and communicates with other layers through well-defined interfaces. The business logic should not depend on the outer layers, and instead should rely on abstractions.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;next layer&lt;/code&gt; is the interface adapters, which are responsible for converting data between the business logic and the outer layers. This layer includes things like presentation logic, data access, and infrastructure.&lt;/p&gt;

&lt;p&gt;Finally, the &lt;code&gt;outer layer&lt;/code&gt; is the frameworks and drivers, which are responsible for providing external services to the application. This layer includes things like databases, web servers, and operating systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's understand by Onion View
&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%2Feawafstpf7jghlp43fkz.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%2Feawafstpf7jghlp43fkz.png" alt="Clean Architecture Onion View" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The flow of dependencies in the diagram moves towards the center. The centermost point is referred to as the Application Core, which acts as the nucleus of the diagram and is not dependent on any other layers. The entities and interfaces occupy the central position while domain services, which provide implementation to the central interfaces, surround them. The UI and Infrastructure layers, located on the exterior, are both dependent on the Application Core.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's understand by Horizontal View
&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%2Ft3yampttxy1jq5b2xmsd.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%2Ft3yampttxy1jq5b2xmsd.png" alt="Clean Architecture Horizontal View" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the clean architecture, the direction of solid arrows indicates compile-time dependencies, while the dashed arrow signifies a dependency that only exists at runtime. The UI layer interacts with the interfaces specified in the Application Core during compilation, without having knowledge of the concrete implementations in the Infrastructure layer. At runtime, these implementations become necessary for the operation of the app, and must be connected to the Application Core interfaces through dependency injection.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's understand by ASP.NET Core architecture diagram following Clean Architecture.
&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%2Fo54pfoyzrn4wnx54rhwz.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%2Fo54pfoyzrn4wnx54rhwz.png" alt="Clean Architecture ASP.NET Core View" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Support For Docker
&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%2Fxwi8127n9jzbi7xi8lyl.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%2Fxwi8127n9jzbi7xi8lyl.png" alt="Clean Architecture Docker" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is forked Gihub &lt;a href="https://github.com/engg-aruny/CleanArchitecture" rel="noopener noreferrer"&gt;https://github.com/engg-aruny/CleanArchitecture&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Organizing code in Clean Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Application Core types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Entities (business model classes that are persisted)&lt;/li&gt;
&lt;li&gt;Aggregates (groups of entities)&lt;/li&gt;
&lt;li&gt;Interfaces/Contracts&lt;/li&gt;
&lt;li&gt;Domain Services&lt;/li&gt;
&lt;li&gt;Specifications&lt;/li&gt;
&lt;li&gt;Custom Exceptions and Guard Clauses&lt;/li&gt;
&lt;li&gt;Domain Events and Handlers&lt;/li&gt;
&lt;li&gt;Behaviours&lt;/li&gt;
&lt;li&gt;Mappers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure Types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identity Services&lt;/li&gt;
&lt;li&gt;File Storage&lt;/li&gt;
&lt;li&gt;Queue Storage&lt;/li&gt;
&lt;li&gt;Payment Services&lt;/li&gt;
&lt;li&gt;Third-party services&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;li&gt;Email Services&lt;/li&gt;
&lt;li&gt;Sms Services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;UI Layer&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Controllers&lt;/li&gt;
&lt;li&gt;Custom Filters&lt;/li&gt;
&lt;li&gt;Custom Middleware&lt;/li&gt;
&lt;li&gt;Views&lt;/li&gt;
&lt;li&gt;ViewModels&lt;/li&gt;
&lt;li&gt;Startup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Persistence Types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Context&lt;/li&gt;
&lt;li&gt;Repositories&lt;/li&gt;
&lt;li&gt;Data Seeding&lt;/li&gt;
&lt;li&gt;Data Migrations&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Domain Types&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Entities&lt;/li&gt;
&lt;li&gt;Domain Events&lt;/li&gt;
&lt;li&gt;Value Objects&lt;/li&gt;
&lt;li&gt;Aggregates&lt;/li&gt;
&lt;li&gt;Enums&lt;/li&gt;
&lt;li&gt;Constants&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Here is the diagram of all types into layers
&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%2Fbeg2nkwyh70mwmoubj2f.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%2Fbeg2nkwyh70mwmoubj2f.png" alt="Clean Architecture View" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source from &lt;a href="https://medium.com/dotnet-hub/clean-architecture-with-dotnet-and-dotnet-core-aspnetcore-overview-introduction-getting-started-ec922e53bb97" rel="noopener noreferrer"&gt;https://medium.com/dotnet-hub/clean-architecture-with-dotnet-and-dotnet-core-aspnetcore-overview-introduction-getting-started-ec922e53bb97&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/common-web-application-architectures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/dotnet-hub/clean-architecture-with-dotnet-and-dotnet-core-aspnetcore-overview-introduction-getting-started-ec922e53bb97" rel="noopener noreferrer"&gt;https://medium.com/dotnet-hub/clean-architecture-with-dotnet-and-dotnet-core-aspnetcore-overview-introduction-getting-started-ec922e53bb97&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://martinfowler.com/tags/domain%20driven%20design.html" rel="noopener noreferrer"&gt;https://martinfowler.com/tags/domain%20driven%20design.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jeffreypalermo.com/2008/07/the-onion-architecture-part-1/" rel="noopener noreferrer"&gt;https://jeffreypalermo.com/2008/07/the-onion-architecture-part-1/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>softwaredevelopment</category>
      <category>cleaning</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What are the essential skills of a .NET developer?</title>
      <dc:creator>Arun Yadav</dc:creator>
      <pubDate>Thu, 02 Feb 2023 15:30:12 +0000</pubDate>
      <link>https://dev.to/enggaruny/what-are-the-essential-skills-of-a-net-developer-6ka</link>
      <guid>https://dev.to/enggaruny/what-are-the-essential-skills-of-a-net-developer-6ka</guid>
      <description>&lt;p&gt;Originally Posted: &lt;a href="https://www.arunyadav.in/blogs/post/21/what-are-the-essential-skills-of-a-net-developer" rel="noopener noreferrer"&gt;https://www.arunyadav.in/codehacks/blogs/post/21/what-are-the-essential-skills-of-a-net-developer&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Having a constant positive attitude is key…”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fvyfnprq758piwvc8mw6x.gif" 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%2Fvyfnprq758piwvc8mw6x.gif" alt="Cartoon Banner" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  General Prospective for looking .Net Developer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A .Net developer must include proficiency in C# and .Net framework, and knowledge of web development technologies such as HTML, CSS, and Javascript with database management. He/She must understand the Agile development process, with some level of a good level of understanding of source control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debugging is also an essential skill i.e. someone who has attention to detail to examine their code for errors, and fix it accordingly. Also, be prepared that things might not work the first time around (see positive attitude above). &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Additionally, great .NET developers are often self-driven and self-motivated so they don’t need a boss to hand hold them through the development process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Doesn’t Chase the Hottest New Tech Stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do They Know Their Limits? &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Means, always seeking help and advice from other developers who have accomplished something similar to the project at hand.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Business looking Prospective for looking .Net Developer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Listens to the customer.&lt;/li&gt;
&lt;li&gt;Asks enough questions to know – and gets the customer to identify what they want to accomplish.&lt;/li&gt;
&lt;li&gt;Explains what they’re going to do and answers customer questions in terms the customer can understand.&lt;/li&gt;
&lt;li&gt;Doesn’t reinvent the wheel when there are existing scripts or tools to get things done.&lt;/li&gt;
&lt;li&gt;Gives a reasonable (i.e., reasonably accurate) estimate of the cost and time to do a project.&lt;/li&gt;
&lt;li&gt;Gets the project done on time.&lt;/li&gt;
&lt;li&gt;Alerts the customer if it will go significantly over budget – and tells them why.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Essentials tech skills
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Proficiency in C# and the .NET Framework&lt;/li&gt;
&lt;li&gt;Web Development Technologies&lt;/li&gt;
&lt;li&gt;Database management and SQL&lt;/li&gt;
&lt;li&gt;Software Development Principles&lt;/li&gt;
&lt;li&gt;Agile Methodologies&lt;/li&gt;
&lt;li&gt;Version Control Systems&lt;/li&gt;
&lt;li&gt;Problem-solving and Teamwork&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some of the best-skilled .NET developers couldn’t do things alone. As mentioned many times in this article, collaboration and teamwork is important. Moreover, to smooth and sharpen your top .NET developer skills, one should also show proactiveness and continuous learning in development.&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>How to Create SEO-Friendly URLs in angular?</title>
      <dc:creator>Arun Yadav</dc:creator>
      <pubDate>Thu, 02 Feb 2023 15:22:05 +0000</pubDate>
      <link>https://dev.to/enggaruny/how-to-create-seo-friendly-urls-in-angular-bk9</link>
      <guid>https://dev.to/enggaruny/how-to-create-seo-friendly-urls-in-angular-bk9</guid>
      <description>&lt;p&gt;Originally Posted: &lt;a href="https://www.arunyadav.in/blogs/post/17/how-to-create-seofriendly-urls-in-angular" rel="noopener noreferrer"&gt;https://www.arunyadav.in/codehacks/blogs/post/17/how-to-create-seofriendly-urls-in-angular&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;Search engines recognize hyphens as word separators, making it easier for them to understand the structure of the URL.&lt;/p&gt;

&lt;h3&gt;
  
  
  What do you mean by SEO-friendly URL?
&lt;/h3&gt;

&lt;p&gt;SEO-friendly URLs (also known as "search engine friendly" URLs) are URLs that are structured in a way that makes them easy for search engines to understand and index. These URLs are designed to be both user-friendly and search-engine friendly by using clear, concise, and descriptive keywords.&lt;/p&gt;

&lt;h3&gt;
  
  
  What do you mean by SEO-friendly URL?
&lt;/h3&gt;

&lt;p&gt;SEO-friendly URLs (also known as "search engine friendly" URLs) are URLs that are structured in a way that makes them easy for search engines to understand and index. These URLs are designed to be both user-friendly and search-engine friendly by using clear, concise, and descriptive keywords.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some of the key characteristics of SEO-friendly URLs include:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Use of keywords in the URL:&lt;/strong&gt; URLs that include relevant keywords are more likely to rank well in search engine results pages (SERPs).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use of hyphens to separate words:&lt;/strong&gt; Search engines recognize hyphens as word separators, making it easier for them to understand the structure of the URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Short and concise URLs&lt;/strong&gt; are easier for users to read and remember and more likely to be indexed by search engines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoiding special characters:&lt;/strong&gt; Special characters like question marks, ampersands, and equal signs can make URLs more difficult for search engines to understand.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to make Angular SEO-friendly URLs?
&lt;/h3&gt;

&lt;p&gt;Here is a &lt;a href="https://stackblitz.com/edit/angular-ivy-y7dyns" rel="noopener noreferrer"&gt;stackblitz&lt;/a&gt; example&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://github.com/engg-aruny/Seo-Friendly-url" rel="noopener noreferrer"&gt;Github&lt;/a&gt; example&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app.component.html&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This code is an example of an HTML template for the ProductComponent in Angular. It displays two links, one labeled as "Best Practice - SEO friendly" and the other labeled as "Bad Practice - Not SEO friendly".&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The first link&lt;/strong&gt; is an anchor tag with the &lt;strong&gt;routerLink&lt;/strong&gt; directive, which is used to navigate to a route in an Angular application. The &lt;strong&gt;routerLink&lt;/strong&gt; directive is bound to the &lt;strong&gt;seoFrendlyUrl&lt;/strong&gt; variable, which is a &lt;strong&gt;SEO-friendly URL&lt;/strong&gt; that includes the product id and a hyphenated version of the product name. There is also an image of a dummy user next to the link and the text &lt;strong&gt;"Go to Product Detail"&lt;/strong&gt; to indicate the purpose of the link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second link&lt;/strong&gt; is an anchor tag with a click event bound to the &lt;strong&gt;goToProductDetail&lt;/strong&gt; function. This function navigates to the product detail page using the &lt;strong&gt;router.navigate&lt;/strong&gt; method, which takes an array of route parameters as its argument. However, this link is not &lt;strong&gt;SEO **friendly as it uses a JavaScript click event to navigate, and search engines **can't crawl&lt;/strong&gt; it. The link also includes an image of a dummy user and the text &lt;strong&gt;"Go to Product Detail"&lt;/strong&gt; to indicate the purpose of the link.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;product works!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Both Example Works Similar&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Best Practice - SEO frendly --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Best Practice - SEO frendly&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;routerLink=&lt;/span&gt;&lt;span class="s"&gt;"{{seoFrendlyUrl}}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"../../assets/img/dummy-user.jpg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Go to Product Detail
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt; &lt;span class="ni"&gt;&amp;amp;nbsp;&lt;/span&gt;


&lt;span class="c"&gt;&amp;lt;!-- Bad Practice - Not SEO frendly --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Bad Practice - Not SEO frendly&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"cursor: pointer;"&lt;/span&gt; &lt;span class="na"&gt;(click)=&lt;/span&gt;&lt;span class="s"&gt;"goToProductDetail()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"../../assets/img/dummy-user.jpg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Go to Product Detail
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;app.routing.module.ts&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The routes constant is defined as an array of route configurations, where each configuration is an object that defines the path of the route and the component that will be displayed when the route is navigated to. The routes defined here include 'home', 'about', 'products' and 'products/:id/:name'. The :id and :name are path parameters, they are dynamic segments of the url.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RouterModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/router&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AboutComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./about/about.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HomeComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./home/home.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ProductDetailComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./product/product-detail/product-detail.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ProductComponent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./product/product.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;home&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HomeComponent&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;about&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AboutComponent&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;products&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ProductComponent&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;products/:id/:name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ProductDetailComponent&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="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;RouterModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forRoot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt;
  &lt;span class="na"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;RouterModule&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppRoutingModule&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;&lt;strong&gt;app.component.ts&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This code is an example of a &lt;strong&gt;ProductComponent&lt;/strong&gt; in an Angular application. The component is responsible for displaying product details, including the product name and an SEO-friendly URL. (Notice browser)&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;seoFrendlyUrl&lt;/strong&gt; variable with a string that includes the product id and a hyphenated version of the product name. The &lt;strong&gt;goToProductDetail&lt;/strong&gt; function is used to navigate to the product detail page using the &lt;strong&gt;router.navigate&lt;/strong&gt; method, which takes an array of route parameters as its argument. The &lt;strong&gt;getHyphenatedString&lt;/strong&gt; function is used to format the product name into an &lt;strong&gt;SEO-friendly&lt;/strong&gt; format by replacing certain characters, removing spaces, and converting it to lowercase.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Router&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/router&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-product&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./product.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./product.component.scss&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ProductComponent&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;productName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fake blush, glow and sheet (mask)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;seoFrendlyUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Router&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="nf"&gt;ngOnInit&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;seoFrendlyUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`/products/2/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getHyphenatedString&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;


  &lt;span class="nf"&gt;goToProductDetail&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;products&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getHyphenatedString&lt;/span&gt;&lt;span class="p"&gt;()])&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;


  &lt;span class="nf"&gt;getHyphenatedString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;limitedTitle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;productName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;substring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;hyphenatedString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;limitedTitle&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[^\w\s]&lt;/span&gt;&lt;span class="sr"&gt;/gi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[\(\)]&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;-&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;hyphenatedString&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Output
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Notice:&lt;/strong&gt; products/2/fake-blush-glow-and-sheet-mask&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%2Ftewmji2k0bn29mfpf4kq.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%2Ftewmji2k0bn29mfpf4kq.png" title="Notice SEO URL" alt="Notice SEO URL" width="656" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://stackblitz.com/edit/angular-ivy-y7dyns" rel="noopener noreferrer"&gt;stackblitz&lt;/a&gt; example&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://github.com/engg-aruny/Seo-Friendly-url" rel="noopener noreferrer"&gt;Github&lt;/a&gt; example&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Screenshot of sample example&lt;/strong&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%2F3ylsajbl48qc0nkte4e9.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%2F3ylsajbl48qc0nkte4e9.png" title="Demo Screen Shot" alt="Demo Screen Shot" width="411" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall this code is showing the difference between an SEO-friendly link and a non-SEO-friendly link, The SEO-friendly link uses the routerLink directive, which allows search engines to crawl the link and index the corresponding page, while the non-SEO-friendly link uses a JavaScript click event to navigate, which search engines can't crawl.&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>cryptocurrency</category>
      <category>airdrop</category>
      <category>web3</category>
    </item>
    <item>
      <title>Build your own Dockerfile, Image, and Container</title>
      <dc:creator>Arun Yadav</dc:creator>
      <pubDate>Mon, 16 Jan 2023 10:16:38 +0000</pubDate>
      <link>https://dev.to/enggaruny/build-your-own-dockerfile-image-and-container-15aj</link>
      <guid>https://dev.to/enggaruny/build-your-own-dockerfile-image-and-container-15aj</guid>
      <description>&lt;p&gt;Follow me in my blogs website (&lt;a href="https://www.arunyadav.in/blogs" rel="noopener noreferrer"&gt;https://www.arunyadav.in/blogs&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Linux containers are the way to build a self-contained environment that includes software, libraries, and other tools. This guide describes how to build a docker image that you can use for the running container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite&lt;/strong&gt;&lt;br&gt;
Follow the previous article if you need to understand "&lt;a href="https://www.arunyadav.in/blogs/post/MTE%3D" rel="noopener noreferrer"&gt;What is Docker?&lt;/a&gt;" &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.docker.com/desktop/install/windows-install/" rel="noopener noreferrer"&gt;Install Docker on Windows&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;u&gt;Once installation is finished and your environment setup is completed.&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;An image contains all the software you need to run within your container. Container images can be stored locally on your machine, as well as in a container registry. There are public registries, such as &lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;Docker Hub&lt;/a&gt;, or private registries such as ACR (Azure Container Registries).&lt;/p&gt;

&lt;p&gt;You can pull existing images from the docker hub or private registries using &lt;code&gt;docker pull&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the following example, we will pull an image from the public Docker Hub repository and run the actual container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#First, we will pull an image
docker pull docker/whalesay
#We can then look at which images are stored locally
docker images
#Then we will run our container
docker run docker/whalesay cowsay boo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Following is the command output&lt;/strong&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%2Fkozu9x9g8cbbmuu6edk2.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%2Fkozu9x9g8cbbmuu6edk2.png" alt="CommandOutput" width="677" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's look at what happing behind the scene.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker first pulled your image in multiple parts and stored it locally on the machine it was running on.&lt;/li&gt;
&lt;li&gt;When you run the actual application, it used that local image to start a container.&lt;/li&gt;
&lt;li&gt;If we look at the command in detail, you will see that docker pull took in a single parameter, docker/whalesay. if you don't provide a private container registry, Docker will look into the public Docker Hub for images.&lt;/li&gt;
&lt;li&gt;The docker run command took in a couple of arguments, first docker/whalesay, which is the reference to the image. The next two arguments, cowsay boo, are the commands that were passed to the running container to execute &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the previous example, you saw that it is possible to run a container without building an image first. however, it is very common in the practical world that you will want to build an image first. To do this, you use a Dockerfile.&lt;/p&gt;

&lt;p&gt;Docker images can be created using a special file format called a “Dockerfile”. This file has commands that allow you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use a pre-existing Docker image as a base&lt;/li&gt;
&lt;li&gt;add files to the image&lt;/li&gt;
&lt;li&gt;run installation commands&lt;/li&gt;
&lt;li&gt;set environment variables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next example, you will build a custom Docker Image. This custom image will display inspirational quotes in the whale output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM docker/whalesay:latest
RUN apt-get -y -qq update
RUN apt-get install -qq -y fortunes
CMD /usr/games/fortune -a | cowsay
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's look at what happing behind the scene.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first line will instruct Docker on which image to use as a source/base image for this new image.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The next two steps are commands that are run to add new functionality to our image&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In this case, update your apt repository and install an application called fortunes. The fortunes application is a small command-line tool that generates inspirational quotes. We will use that to include quotes in the output rather than user input.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Finally, the CMD command tells Docker which command to execute when a container based on this image is run.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;_You typically save a Dockerfile in a file called Dockerfile, without an extension. _&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To build an image and point it to the Dockerfile you created.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;docker build -t smartwhale .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will now see Docker execute a number of steps&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%2Fsybhqnrv3hxv3872y0x1.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%2Fsybhqnrv3hxv3872y0x1.png" alt="CommandOutput" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To run your container&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;docker run smartwhale&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Following is the command output with inspirational quotes and if you run the container multiple times, you will see different quotes appear.&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%2Fltu4rhagqao2y82oa4h9.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%2Fltu4rhagqao2y82oa4h9.png" alt="CommandOutput" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That concludes our overview and demo of containers. In this section, you started with an existing container image and launched it on the machine. Afterward, you took that a step further and built your own container image, then started containers using that image. You have now learned what it takes to build and run a container.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Do you know nginx, lets talk about?</title>
      <dc:creator>Arun Yadav</dc:creator>
      <pubDate>Sat, 03 Apr 2021 13:03:13 +0000</pubDate>
      <link>https://dev.to/enggaruny/do-you-know-nginx-lets-talk-about-2o3f</link>
      <guid>https://dev.to/enggaruny/do-you-know-nginx-lets-talk-about-2o3f</guid>
      <description>&lt;p&gt;Follow me on &lt;a href="https://twitter.com/thecodinglive"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is nginx
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.nginx.com/"&gt;Nginx&lt;/a&gt;, pronounced like “engine-ex”, is an open-source web server that, since its initial success as a web server, is now also used as a reverse proxy, HTTP cache, and load balancer.&lt;/p&gt;

&lt;h1&gt;
  
  
  How Does Nginx Work
&lt;/h1&gt;

&lt;p&gt;Nginx is built to offer low memory usage and high concurrency. Rather than creating new processes for each web request, Nginx uses an asynchronous, event-driven approach where requests are handled in a single thread.&lt;/p&gt;

&lt;p&gt;With Nginx, one master process can control multiple worker processes. The master maintains the worker processes, while the workers do the actual processing. Because Nginx is asynchronous, each request can be executed by the worker concurrently without blocking other requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Node on Ubuntu
&lt;/h2&gt;

&lt;p&gt;Executing the following bash commands will setup NodeJS and npm on your Ubuntu machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update 
sudo apt-get install nodejs 
sudo apt-get install nodejs-legacy 
sudo apt-get install npm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing NGINX on Ubuntu
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update 
sudo apt-get install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Serving Static Contents
&lt;/h2&gt;

&lt;p&gt;Let’s start simple and first, we will use NGINX to serve a static website in our first demo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring NGINX
&lt;/h2&gt;

&lt;p&gt;Configuration files can be found on /etc/nginx/. NGINX comes with a default site config file and we can open it using nano:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will not change anything in this file yet but if we do, we have to restart the NGINX server afterward to make these changes take effect.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service nginx restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this post, we saw how to serve static web applications using NGINX. Follow me on &lt;a href="https://twitter.com/thecodinglive"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>devs</category>
      <category>dotnet</category>
      <category>server</category>
    </item>
  </channel>
</rss>
