<?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: Md: Shariar haque</title>
    <description>The latest articles on DEV Community by Md: Shariar haque (@md_shariarhaque_11695a3).</description>
    <link>https://dev.to/md_shariarhaque_11695a3</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%2F1598455%2Fb6699911-7603-47c1-b8f8-e75fc7b19ed6.jpg</url>
      <title>DEV Community: Md: Shariar haque</title>
      <link>https://dev.to/md_shariarhaque_11695a3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/md_shariarhaque_11695a3"/>
    <language>en</language>
    <item>
      <title>Single Responsibility Principle (SRP)</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Fri, 27 Dec 2024 19:23:02 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/single-responsibility-principle-srp-p79</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/single-responsibility-principle-srp-p79</guid>
      <description>&lt;p&gt;Check out my new blog on SRP: &lt;br&gt;
&lt;a href="https://www.linkedin.com/pulse/single-responsibility-principle-srp-shahriar-haque-sg5dc/?trackingId=NPTx50dRh1ZELXPacS7JuA%3D%3D" rel="noopener noreferrer"&gt;https://www.linkedin.com/pulse/single-responsibility-principle-srp-shahriar-haque-sg5dc/?trackingId=NPTx50dRh1ZELXPacS7JuA%3D%3D&lt;/a&gt;&lt;/p&gt;

</description>
      <category>solidprinciples</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Protfolio</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Fri, 27 Dec 2024 19:20:43 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/protfolio-website-m9g</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/protfolio-website-m9g</guid>
      <description>&lt;p&gt;🌟 Excited to share my personal portfolio website! 🌐&lt;br&gt;
Take a look to explore my projects, skills, and what I’ve been working on. Feedback is always welcome! 🚀&lt;br&gt;
👉 Visit: &lt;a href="https://shahriarhaque.netlify.app" rel="noopener noreferrer"&gt;https://shahriarhaque.netlify.app&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Portfolio #WebDeveloper #SoftwareEngineer #ReactJS #DotNetCore
&lt;/h1&gt;

</description>
      <category>portfolio</category>
      <category>webdev</category>
      <category>react</category>
      <category>dotnetcore</category>
    </item>
    <item>
      <title>Dependency Injection Explained in C#</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Mon, 29 Jul 2024 09:07:48 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/dependency-injection-explained-in-c-4e9c</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/dependency-injection-explained-in-c-4e9c</guid>
      <description>&lt;p&gt;Dependency Injection (DI) in C#:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency Injection&lt;/strong&gt; is a design pattern used to achieve &lt;strong&gt;Inversion of Control (IoC)&lt;/strong&gt; between classes and their dependencies. Instead of a class creating its dependencies, they are provided from outside, typically by an IoC container.&lt;/p&gt;

&lt;p&gt;When a class (&lt;code&gt;ClassA&lt;/code&gt;) needs to use another class (&lt;code&gt;ClassB&lt;/code&gt;), you can inject (&lt;code&gt;pass&lt;/code&gt;) the dependency into &lt;code&gt;ClassA&lt;/code&gt;, rather than having &lt;code&gt;ClassA&lt;/code&gt; create an instance of &lt;code&gt;ClassB&lt;/code&gt; internally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Without Dependency Injection:&lt;/strong&gt;&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;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ClassB&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Calculate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&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;ClassA&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="n"&gt;ClassB&lt;/span&gt; &lt;span class="n"&gt;_classB&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;ClassB&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;TenPercent&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="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="n"&gt;_classB&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Calculate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="m"&gt;0.1&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;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&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;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;ClassA&lt;/span&gt; &lt;span class="n"&gt;classA&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;ClassA&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Ten Percent: "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;classA&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;TenPercent&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;In this example, &lt;code&gt;ClassA&lt;/code&gt; creates its own instance of &lt;code&gt;ClassB&lt;/code&gt;, making it tightly coupled to &lt;code&gt;ClassB&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Dependency Injection:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Define Interfaces:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Create an interface &lt;code&gt;IClassB&lt;/code&gt; to abstract the dependency:&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;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IClassB&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Calculate&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;ol&gt;
&lt;li&gt;&lt;strong&gt;Implement the Interface:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Implement the interface in &lt;code&gt;ClassB&lt;/code&gt;:&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;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ClassB&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IClassB&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Calculate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;100&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;ol&gt;
&lt;li&gt;&lt;strong&gt;Inject Dependencies:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Modify &lt;code&gt;ClassA&lt;/code&gt; to accept an &lt;code&gt;IClassB&lt;/code&gt; instance through its constructor:&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;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ClassA&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="n"&gt;IClassB&lt;/span&gt; &lt;span class="n"&gt;_classB&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

       &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;ClassA&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IClassB&lt;/span&gt; &lt;span class="n"&gt;classB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="n"&gt;_classB&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;classB&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;TenPercent&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="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="n"&gt;_classB&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Calculate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="m"&gt;0.1&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;ol&gt;
&lt;li&gt;&lt;strong&gt;Setup Dependency Injection:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In a real-world application, you use a DI container (like Microsoft.Extensions.DependencyInjection) to manage dependencies:&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;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&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;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="c1"&gt;// Create a service collection and configure DI&lt;/span&gt;
           &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;serviceCollection&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;ServiceCollection&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
           &lt;span class="n"&gt;serviceCollection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTransient&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IClassB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ClassB&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
           &lt;span class="n"&gt;serviceCollection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddTransient&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ClassA&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;

           &lt;span class="c1"&gt;// Build the service provider&lt;/span&gt;
           &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;serviceProvider&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;serviceCollection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;BuildServiceProvider&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

           &lt;span class="c1"&gt;// Resolve and use the service&lt;/span&gt;
           &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;classA&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;serviceProvider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetService&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ClassA&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
           &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Ten Percent: "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;classA&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;TenPercent&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;
  
  
  Benefits
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Loose Coupling:&lt;/strong&gt; &lt;code&gt;ClassA&lt;/code&gt; is not dependent on a concrete implementation of &lt;code&gt;ClassB&lt;/code&gt;; it relies on the &lt;code&gt;IClassB&lt;/code&gt; interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusability:&lt;/strong&gt; You can easily switch &lt;code&gt;ClassB&lt;/code&gt; with another implementation (e.g., &lt;code&gt;ClassC&lt;/code&gt;) without changing &lt;code&gt;ClassA&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved Testability:&lt;/strong&gt; Mock dependencies can be injected for unit testing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simpler Maintenance:&lt;/strong&gt; Dependencies are managed centrally and can be easily updated or replaced.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrent Development:&lt;/strong&gt; Teams can work on different components independently, as long as they adhere to the same interfaces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better Design:&lt;/strong&gt; Promotes separation of concerns and follows the SOLID principles.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This way, you get more flexible, maintainable, and testable code by applying Dependency Injection.&lt;/p&gt;

</description>
      <category>dependencyinjection</category>
      <category>csharp</category>
      <category>injection</category>
    </item>
    <item>
      <title>How to change HTML text using JavaScript DOM</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Tue, 02 Jul 2024 11:02:51 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/how-to-change-html-text-using-javascript-1edh</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/how-to-change-html-text-using-javascript-1edh</guid>
      <description>&lt;p&gt;Html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Hello, World!&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="styles.css" /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
      &amp;lt;button type="submit" id="btn"&amp;gt;click here to show time  &amp;lt;/button&amp;gt;
      &amp;lt;p id="t"&amp;gt;&amp;lt;/p&amp;gt;
      &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;javaScript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;document.addEventListener('DOMContentLoaded',function()
{
  const btn = document.getElementById('btn');

  btn.addEventListener('click', function(){


    OnChange();

  });

});

function OnChange(){
      document.getElementById('t').innerHTML=Date();


}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;style css&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body{
  padding: 25px;
}
.title {
    color: #5C6AC4;
}
#btn{
  background-color:orange;
  border: none;
  border-radius: 12px;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;

}
#btn:hover{

   background-color: #04AA6D; /* Green */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}
p{
  font-size: 24px;
 color: blue;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>addeventlistener</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why Beginners Should Start Writing Code in a Plain Text Editor</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Thu, 27 Jun 2024 09:59:26 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/why-beginners-should-start-writing-code-in-a-plain-text-editor-37h</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/why-beginners-should-start-writing-code-in-a-plain-text-editor-37h</guid>
      <description>&lt;p&gt;*&lt;em&gt;As a beginner, writing code in a plain text editor like Notepad can be a beneficial practice. *&lt;/em&gt;&lt;br&gt;
Here’s why:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Focus on Fundamentals&lt;/em&gt;&lt;/strong&gt;: By using a simple text editor, you’ll concentrate on understanding the core concepts of coding without relying on the conveniences provided by advanced Integrated Development Environments (IDEs).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learn the Basics&lt;/em&gt;&lt;/strong&gt;: You’ll become familiar with the syntax and structure of your code, which helps in developing a strong foundation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Appreciate the Tools&lt;/em&gt;&lt;/strong&gt;: Starting with a basic editor makes you appreciate the powerful features of IDEs when you transition to using them, such as code completion, debugging tools, and integrated version control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Develop Attention to Detail&lt;/em&gt;&lt;/strong&gt;: Without automatic syntax highlighting and error checking, you’ll develop a keen eye for detail, catching mistakes early and understanding error messages more thoroughly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Minimal Distractions&lt;/em&gt;&lt;/strong&gt;: A plain text editor offers a distraction-free environment, allowing you to focus solely on writing and understanding code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Starting with a simple text editor like Notepad can be a great way to build your coding skills and establish a strong programming foundation. Once you’re comfortable with the basics, you can gradually move on to more advanced tools and environments.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Store Procedure for getting all Items from Item table MSSQL</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Thu, 27 Jun 2024 05:22:56 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/store-procedure-for-getting-all-items-from-item-table-mssql-5e5m</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/store-procedure-for-getting-all-items-from-item-table-mssql-5e5m</guid>
      <description>&lt;p&gt;use Shop; -- table name shop &lt;br&gt;
CREATE PROCEDURE AllItems -- procedure name AllItems&lt;br&gt;
AS&lt;br&gt;
SELECT *FROM Item&lt;br&gt;
GO;&lt;/p&gt;

&lt;p&gt;EXEC AllItem; -- retrive procedure &lt;/p&gt;

</description>
      <category>storeprocedure</category>
      <category>mssql</category>
    </item>
    <item>
      <title>JWT</title>
      <dc:creator>Md: Shariar haque</dc:creator>
      <pubDate>Sun, 09 Jun 2024 10:43:23 +0000</pubDate>
      <link>https://dev.to/md_shariarhaque_11695a3/jwt-5d11</link>
      <guid>https://dev.to/md_shariarhaque_11695a3/jwt-5d11</guid>
      <description>&lt;p&gt;JSON Web Token compact URL-safe means of representing claims to be transferred between two parties securely. These tokens are often used in authentication and authorization protocols.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Structure: JWTs consist of three parts separated by dots: Header, Payload, and Signature. These parts are base64url encoded JSON strings.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Header: Contains information about the type of token (JWT) and the signing algorithm used.&lt;/li&gt;
&lt;li&gt;Payload: Contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims.&lt;/li&gt;
&lt;li&gt;Signature: To create the signature part, you need to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Authentication: When a user logs in, the server generates a JWT and sends it to the client. The client stores the token, usually in local storage or a cookie.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authorization: When the client makes subsequent requests to the server, it includes the JWT in the request, typically in the Authorization header. The server then verifies the JWT to ensure it's valid and hasn't been tampered with. It then uses the information in the token to determine if the user is authorized to access the requested resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Statelessness: JWTs are stateless, meaning the server doesn't need to keep a record of the tokens it issues. This makes JWTs ideal for use in distributed systems and APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expiration: JWTs can have an expiration time (in the Payload), after which they're no longer considered valid. This adds an extra layer of security as even if a token is stolen, it will only be valid for a limited time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security: To ensure the integrity of the token, it's important to sign it using a secret key known only to the server. This prevents tampering with the token by unauthorized parties.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;JWTs provide a flexible and secure way of transmitting information between parties and are widely used in modern web development for authentication and authorization purposes.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
