<?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>Forem: SHaon</title>
    <description>The latest articles on Forem by SHaon (@shaon07).</description>
    <link>https://forem.com/shaon07</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%2F933078%2F76be6c6d-2afc-468c-82b0-647ef0646aca.jpeg</url>
      <title>Forem: SHaon</title>
      <link>https://forem.com/shaon07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shaon07"/>
    <language>en</language>
    <item>
      <title>Full Backend Project Connect MongoDB Atlas in NodeJS Part - 2</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Sat, 09 Mar 2024 17:15:44 +0000</pubDate>
      <link>https://forem.com/shaon07/full-backend-project-connect-mongodb-atlas-in-nodejs-part-2-5ep</link>
      <guid>https://forem.com/shaon07/full-backend-project-connect-mongodb-atlas-in-nodejs-part-2-5ep</guid>
      <description>&lt;p&gt;If you complete the first part of this blog series then lets get start with mongoDB. &lt;a href="https://dev.to/shaon07/full-backend-project-setup-and-structure-in-nodejs-part-1-188g"&gt;read part-1&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;first of all goto: &lt;a href="https://www.mongodb.com"&gt;MONGODB ATLAST&lt;/a&gt; login with your email then create a project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then create a cluster and fill-up the form and save the &lt;strong&gt;username&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt; after saving scroll down and allow the &lt;strong&gt;IP Address: 0.0.0.0/0&lt;/strong&gt; for testing perpose&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then all done save and click on connect button and click on on the &lt;strong&gt;VSCODE&lt;/strong&gt; option and copy the connection string.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;after that open &lt;strong&gt;VSCODE&lt;/strong&gt; select &lt;strong&gt;.env&lt;/strong&gt; file and add the following code with your &lt;strong&gt;username&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PORT=8000
MONGO_URI=mongodb+srv://username:password@cluster0.zvswttn.mongodb.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;save the files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;then open the &lt;strong&gt;constants.js&lt;/strong&gt; file and add the following code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const DB_NAME = "choose_a_name";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;then save all the following files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then open your terminal and install this following &lt;strong&gt;NPM packages&lt;/strong&gt; &lt;strong&gt;mongoose express dotenv&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;copy the following snippets in your terminal and past&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i mongoose express dotenv 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;after successfully installed done &lt;strong&gt;open db/index.js&lt;/strong&gt; file
and copy the following code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {DB_NAME} from "../constants.js";
import mongoose from "mongoose";

const connectDD = async () =&amp;gt; {
    try {
        const connectionDB = await mongoose.connect(`${process.env.MONGO_URI}/${DB_NAME}`);
        console.log(`MONGODB Connected: ${connectionDB.connection.host}`);
    } catch (error) {
        console.log(`MONGODB Connection Error: ${error.message}`);
        process.exit(1);
    }
}

export default connectDD;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;then save the file and open &lt;strong&gt;index.js&lt;/strong&gt; root file and copy the following code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import dotenv from "dotenv";
import connectDD from "./db/index.js";

dotenv.config();
connectDD();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;then save the files and &lt;strong&gt;open your terminal&lt;/strong&gt; and run
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulation your database successfully connected with your server&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Full Backend Project Setup And Structure in NodeJS Part - 1</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Sat, 09 Mar 2024 14:38:11 +0000</pubDate>
      <link>https://forem.com/shaon07/full-backend-project-setup-and-structure-in-nodejs-part-1-188g</link>
      <guid>https://forem.com/shaon07/full-backend-project-setup-and-structure-in-nodejs-part-1-188g</guid>
      <description>&lt;p&gt;First of all setup backend project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a folder and open in any code editor like: VsCode&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Open Terminal and run this code:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Lets Setup Project Folder Structure and files&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;create importants folder like:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
└── root/
    ├── public/
    │   └── temp
    ├── src/
    │   ├── app.js
    │   ├── index.js
    │   ├── constants.js
    │   ├── controllers/
    │   │   └── index.js
    │   ├── middlewares/
    │   │   └── index.js
    │   ├── routes/
    │   │   └── index.js
    │   ├── utils/
    │   │   └── index.js
    │   ├── db/
    │   │   └── index.js
    │   └── models/
    │       └── index.js
    ├── .env
    ├── .env.sample
    ├── .gitignore
    ├── .prettierrc
    └── .pretterignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this you need to install some &lt;strong&gt;NPM packages&lt;/strong&gt;* like&lt;br&gt;
&lt;code&gt;Nodemon and Pretttier&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open your terminal from root directory and run the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i -D nodemon prettier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;after successfully installed goto &lt;code&gt;package.json&lt;/code&gt; file and update it with the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "node",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "dev": "nodemon src/index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "nodemon": "^3.1.0",
    "prettier": "^3.2.5"
  }
}

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

&lt;/div&gt;



&lt;p&gt;then add your &lt;a href="https://mrkandreev.name/snippets/gitignore-generator/"&gt;gitignore&lt;/a&gt; and &lt;a href="https://prettier.io/docs/en/ignore.html"&gt;prettier&lt;/a&gt; setup&lt;/p&gt;

&lt;p&gt;Read &lt;a href="https://dev.to/shaon07/full-backend-project-connect-mongodb-atlas-in-nodejs-part-2-5ep"&gt;part -2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>backenddevelopment</category>
      <category>fullstack</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Understanding JSX in React</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Sat, 09 Mar 2024 12:24:42 +0000</pubDate>
      <link>https://forem.com/shaon07/understanding-jsx-in-react-5f7j</link>
      <guid>https://forem.com/shaon07/understanding-jsx-in-react-5f7j</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to JSX
&lt;/h2&gt;

&lt;p&gt;JavaScript XML (JSX) is a syntax extension primarily used with React to describe and render the user interface. JSX resembles the structure of HTML but is embedded within JavaScript code. It provides a more readable and efficient way to create React elements while blending the power of JavaScript with the familiar syntax of HTML. In this blog post, we will delve into the purpose, usage, key features, benefits, and examples of JSX in React development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Purpose and Usage of JSX
&lt;/h2&gt;

&lt;p&gt;JSX simplifies the process of writing and organizing React components by allowing developers to write HTML-like code directly within JavaScript. It enhances the readability of code, facilitates the creation of complex UI components, and provides a more declarative way to define interfaces. JSX is transpiled to plain JavaScript which enables the seamless integration of UI components with logic in React applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features of JSX
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Syntax Extension&lt;/strong&gt;: JSX extends the syntax of JavaScript to include XML-like elements, making it easier to write and structure UI components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Declarative&lt;/strong&gt;: JSX follows a declarative approach, where developers describe the desired UI state, and React handles the rendering based on these descriptions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Component-based&lt;/strong&gt;: JSX promotes the creation of reusable and composable components, allowing developers to build complex UIs by nesting components within each other.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient Rendering&lt;/strong&gt;: JSX leverages the virtual DOM to optimize the rendering process, updating only the components that have changed without re-rendering the entire UI.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Benefits of Using JSX
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Readability&lt;/strong&gt;: JSX enhances code readability by visually representing the structure of UI components, making it easier to understand and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Reusability&lt;/strong&gt;: JSX facilitates the reuse of components, enabling developers to build modular and scalable applications with minimal redundancy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Familiar Syntax&lt;/strong&gt;: By combining JavaScript and HTML syntax, JSX provides a familiar environment for web developers, streamlining the development process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt;: JSX optimizes the rendering performance by efficiently updating the virtual DOM, leading to faster UI updates and improved user experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Examples of JSX Syntax and Usage
&lt;/h2&gt;

&lt;p&gt;Let's explore some examples of JSX syntax in React:&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1: Basic JSX Element
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, World!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, a simple JSX element representing an &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; heading is defined.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2: JSX Expression
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;React&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;introduction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Welcome to &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the JSX expression &lt;code&gt;{name}&lt;/code&gt; dynamically inserts the value of the &lt;code&gt;name&lt;/code&gt; variable into the rendered output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 3: JSX Component
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Greeting&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&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;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello, &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;!&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;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;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Greeting&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"User"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Greeting&lt;/code&gt; component accepts props and renders a personalized greeting message, which is then used within the &lt;code&gt;App&lt;/code&gt; component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;JSX plays a pivotal role in React development, offering a seamless way to integrate HTML-like syntax within JavaScript while improving code readability, reusability, and performance. By leveraging the power of JSX, developers can create dynamic and interactive user interfaces in React applications with ease. Embracing JSX unlocks a world of possibilities for building intuitive and efficient web applications.&lt;/p&gt;

&lt;p&gt;With a deeper understanding of JSX and its advantages, developers can harness its capabilities to streamline the development process, enhance code maintainability, and deliver exceptional user experiences in React projects.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A Beginner's Guide to ReactJS: Unveiling the Power of Web Development</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Mon, 04 Mar 2024 18:07:35 +0000</pubDate>
      <link>https://forem.com/shaon07/a-beginners-guide-to-reactjs-unveiling-the-power-of-web-development-5h4n</link>
      <guid>https://forem.com/shaon07/a-beginners-guide-to-reactjs-unveiling-the-power-of-web-development-5h4n</guid>
      <description>&lt;p&gt;Are you intrigued by the world of web development but find yourself overwhelmed by the plethora of frameworks and libraries out there? Fear not! In this beginner's guide, we'll take you on a journey through ReactJS, a powerful JavaScript library that has revolutionized the way modern web applications are built.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is ReactJS?
&lt;/h3&gt;

&lt;p&gt;At its core, ReactJS is an open-source JavaScript library developed by Facebook that facilitates the creation of interactive user interfaces. Unlike traditional approaches to web development, React employs a component-based architecture, allowing developers to break down complex UIs into reusable, self-contained building blocks. These components encapsulate both the structure and behavior of a particular piece of the user interface, promoting modularity, maintainability, and scalability in codebases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of ReactJS
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Virtual DOM&lt;/strong&gt;: React introduces the concept of a virtual DOM, a lightweight representation of the actual DOM tree. By leveraging this virtual abstraction, React minimizes unnecessary re-renders and efficiently updates only the components that have changed, resulting in improved performance and a smoother user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Declarative Syntax&lt;/strong&gt;: React embraces a declarative programming paradigm, enabling developers to describe the desired state of the UI without worrying about the underlying implementation details. This declarative approach enhances code readability, simplifies debugging, and fosters productivity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Component Reusability&lt;/strong&gt;: React promotes the creation of reusable components, which can be easily composed and nested within one another to build complex user interfaces. This reusability not only accelerates development but also ensures consistency and maintainability across projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Workflow of ReactJS
&lt;/h3&gt;

&lt;p&gt;The typical workflow of a ReactJS project involves the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;: Begin by installing Node.js and npm (Node Package Manager) if you haven't already. Then, initialize a new React project using Create React App or any other preferred boilerplate. This sets up the necessary dependencies and project structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Component Development&lt;/strong&gt;: Design and implement individual React components to represent different parts of your application's UI. Each component should encapsulate its own logic and rendering behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Management&lt;/strong&gt;: Utilize React's state and props to manage dynamic data and handle user interactions. Stateful components maintain internal state, while props enable data flow between parent and child components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Styling&lt;/strong&gt;: Apply CSS styles to your components using inline styles, CSS modules, or external libraries like styled-components. Keep your styles modular and maintainable to facilitate future changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;: Write unit tests for your components using testing frameworks like Jest and Enzyme. Test-driven development (TDD) can help ensure the reliability and robustness of your codebase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt;: Once your application is ready for production, build optimized production bundles using tools like webpack. Deploy your application to a hosting platform such as Netlify, Vercel, or AWS Amplify to make it accessible to users worldwide.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Scope of ReactJS
&lt;/h3&gt;

&lt;p&gt;The versatility and popularity of ReactJS have led to its widespread adoption across various domains, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Page Applications (SPAs)&lt;/strong&gt;: React excels at building interactive SPAs with dynamic user interfaces, enabling seamless navigation and content updates without page reloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Progressive Web Apps (PWAs)&lt;/strong&gt;: React's performance optimizations and offline capabilities make it an ideal choice for developing PWAs that deliver app-like experiences to users across devices and platforms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mobile App Development&lt;/strong&gt;: With frameworks like React Native, developers can leverage their existing React skills to build cross-platform mobile applications for iOS and Android, saving time and effort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enterprise Applications&lt;/strong&gt;: React's scalability and component-based architecture make it well-suited for developing large-scale enterprise applications with complex data management and business logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In conclusion, ReactJS offers a powerful yet intuitive approach to web development, empowering developers to create interactive and engaging user experiences with ease. Whether you're a seasoned developer or a newcomer to the world of programming, ReactJS holds immense potential for shaping the future of web development. So why wait? Dive in and start building your next great project with React today!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>A Beginner's Guide to Implementing WebSockets in React</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Thu, 29 Feb 2024 15:52:46 +0000</pubDate>
      <link>https://forem.com/shaon07/a-beginners-guide-to-implementing-websockets-in-react-j6d</link>
      <guid>https://forem.com/shaon07/a-beginners-guide-to-implementing-websockets-in-react-j6d</guid>
      <description>&lt;p&gt;Are you ready to take your React applications to the next level of real-time interactivity? Say hello to WebSockets! In this beginner-friendly guide, we'll walk through the process of integrating WebSockets into your React projects. By the end, you'll have a solid understanding of how to establish a WebSocket connection and leverage its power for real-time communication between the client and server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding WebSockets
&lt;/h2&gt;

&lt;p&gt;Before diving into implementation, let's grasp the concept of WebSockets. Unlike traditional HTTP requests, which follow a request-response model, WebSockets provide a persistent, full-duplex communication channel over a single TCP connection. This means both the client and server can send data to each other at any time, enabling real-time updates without the overhead of HTTP requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Your React Project
&lt;/h2&gt;

&lt;p&gt;First things first, make sure you have &lt;a href="https://nodejs.org/en"&gt;Node.js&lt;/a&gt; and npm installed on your machine. If not, head over to nodejs.org and follow the installation instructions.&lt;/p&gt;

&lt;p&gt;Now, let's create a new React project using Create React App. Open your terminal and run the following commands:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app websocket-demo&lt;br&gt;
cd websocket-demo&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once your project is set up, navigate into the project directory and install a WebSocket library. For this tutorial, we'll use &lt;strong&gt;websocket&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install websocket&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Establishing a WebSocket Connection
&lt;/h2&gt;

&lt;p&gt;Now that our project is ready, let's establish a WebSocket connection. Create a new file named &lt;strong&gt;WebSocketComponent.js&lt;/strong&gt; in the &lt;strong&gt;src&lt;/strong&gt; directory of your project. Here's a basic implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// App.js

import React from 'react';
import WebSocketComponent from './WebSocketComponent';

function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;WebSocketComponent /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// WebSocketComponent.js

import React, { useEffect, useState } from 'react';

const WebSocketComponent = () =&amp;gt; {
  const [message, setMessage] = useState('');

  useEffect(() =&amp;gt; {
    // Establishing a WebSocket connection
    const socket = new WebSocket('ws://localhost:3000');

    // Event listener for connection open
    socket.onopen = () =&amp;gt; {
      console.log('WebSocket connection established.');
    };

    // Event listener for incoming messages
    socket.onmessage = (event) =&amp;gt; {
      setMessage(event.data);
    };

    // Cleanup function to close the socket on component unmount
    return () =&amp;gt; {
      socket.close();
    };
  }, []);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;WebSocket Demo&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;Received message: {message}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default WebSocketComponent;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interacting with the WebSocket
&lt;/h2&gt;

&lt;p&gt;In the &lt;strong&gt;useEffect&lt;/strong&gt; hook, we create a new &lt;strong&gt;WebSocket&lt;/strong&gt; instance and define event handlers for &lt;strong&gt;onopen&lt;/strong&gt; and &lt;strong&gt;onmessage&lt;/strong&gt; events. When the connection is established, we log a message to the console. When a message is received from the server, we log its content.&lt;/p&gt;

&lt;p&gt;This code assumes you have a WebSocket server running on ws://localhost:3000, which sends messages to the client. Replace 'ws://localhost:3000' with your actual WebSocket server URL.&lt;/p&gt;

</description>
      <category>react</category>
      <category>websocket</category>
      <category>realtimedatasyncinreact</category>
      <category>reactappwithwebsockets</category>
    </item>
    <item>
      <title>Learn CSS Basics</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Wed, 05 Oct 2022 16:44:53 +0000</pubDate>
      <link>https://forem.com/shaon07/learn-css-basics-1k4i</link>
      <guid>https://forem.com/shaon07/learn-css-basics-1k4i</guid>
      <description>&lt;p&gt;When styling a web page, there are many types of selectors available that allow developers to be as broad or as specific as they need to be when selecting HTML elements to apply CSS rules to.&lt;/p&gt;

&lt;p&gt;Here you will learn about some of the common CSS selectors that you will use as a developer.&lt;/p&gt;

&lt;p&gt;Element Selectors&lt;br&gt;
The element selector allows developers to select HTML elements based on their element type.&lt;/p&gt;

&lt;p&gt;For example, if you use p as the selector, the rule will apply to all p elements on the webpage.&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;p&gt;Once upon a time...&lt;/p&gt;

&lt;p&gt;2&lt;/p&gt;

&lt;p&gt;In a hidden land...&lt;/p&gt;

&lt;p&gt;CSS&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
p { &lt;br&gt;
2&lt;br&gt;
  color: blue; &lt;br&gt;
3&lt;br&gt;
}•&lt;br&gt;
ID Selectors&lt;br&gt;
The ID selector uses the id attribute of an HTML element. Since the id is unique within a webpage, it allows the developer to select a specific element for styling. ID selectors are prefixed with a # character.&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
•&lt;span id="latest"&gt;New!&lt;/span&gt;&lt;br&gt;
CSS&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;
&lt;h1&gt;
  
  
  latest {
&lt;/h1&gt;

&lt;p&gt;2&lt;br&gt;
  background-color: purple; &lt;br&gt;
3&lt;br&gt;
}••&lt;br&gt;
Class Selectors&lt;br&gt;
Elements can also be selected based on the class attribute applied to them. The CSS rule has been applied to all elements with the specified class name. The class selector is prefixed with a . character.&lt;/p&gt;

&lt;p&gt;In the following example, the CSS rule applies to both elements as they have the navigation CSS class applied to them.&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
•&lt;a&gt;Go Back&lt;/a&gt;&lt;br&gt;
2&lt;br&gt;
•&lt;/p&gt;
&lt;p&gt;Go Forward&lt;/p&gt;
&lt;br&gt;
CSS

&lt;p&gt;1&lt;br&gt;
.navigation { &lt;br&gt;
2&lt;br&gt;
  margin: 2px;&lt;br&gt;
3&lt;br&gt;
}••&lt;br&gt;
Element with Class Selector&lt;br&gt;
A more specific method for selecting HTML elements is by first selecting the HTML element, then selecting the CSS class or ID.&lt;/p&gt;

&lt;p&gt;The example below selects all p elements that have the CSS class introduction applied to them.&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;p&gt;
CSS

1
p.introduction { 
2
  margin: 2px;
3
}••
Descendant Selectors
Descendant selectors are useful if you need to select HTML elements that are contained within another selector.

Let's explore an example.

You have the following HTML structure and CSS rule.

HTML

1
&lt;/p&gt;

&lt;p&gt;2&lt;br&gt;
  &lt;/p&gt;
&lt;h1&gt;Latest News&lt;/h1&gt;
&lt;br&gt;
3

&lt;p&gt;4&lt;br&gt;
    &lt;/p&gt;
&lt;h1&gt;Today's Weather&lt;/h1&gt;
&lt;br&gt;
5&lt;br&gt;
    &lt;p&gt;The weather will be sunny&lt;/p&gt;

&lt;p&gt;6&lt;br&gt;
  &lt;/p&gt;
&lt;br&gt;
7&lt;br&gt;
  &lt;p&gt;Subscribe for more news&lt;/p&gt;
&lt;br&gt;
8&lt;br&gt;
&lt;br&gt;
9


10
  &lt;h1&gt;Archives&lt;/h1&gt;
11


&lt;p&gt;CSS&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;h1&gt;
  
  
  blog h1• {
&lt;/h1&gt;

&lt;p&gt;2&lt;br&gt;
  color: blue;&lt;br&gt;
3&lt;br&gt;
}&lt;br&gt;
The CSS rule will select all h1 elements that are contained within the element with the ID blog. The CSS rule will not apply to the h1 element containing the text Archives.&lt;/p&gt;

&lt;p&gt;The structure of a descendant selector is a CSS selector, followed by a single space character, followed by another CSS selector.&lt;/p&gt;

&lt;p&gt;Multiple descendants can also be selected. For example, to select all h1 elements that are descendants of div elements which are descendants of the blog element, the selector is specified as follows.&lt;/p&gt;

&lt;p&gt;CSS&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;h1&gt;
  
  
  blog div h1• {
&lt;/h1&gt;

&lt;p&gt;2&lt;br&gt;
  color: blue;&lt;br&gt;
3&lt;br&gt;
}&lt;br&gt;
Child Selectors&lt;br&gt;
Child selectors are more specific than descendant selectors. They only select elements that are immediate descendants (children) of a selector (the parent).&lt;/p&gt;

&lt;p&gt;For example, you have the following HTML structure:&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;p&gt;2&lt;br&gt;
  &lt;/p&gt;
&lt;h1&gt;Latest News&lt;/h1&gt;
&lt;br&gt;
3

&lt;p&gt;4&lt;br&gt;
    &lt;/p&gt;
&lt;h1&gt;Today's Weather&lt;/h1&gt;
&lt;br&gt;
5&lt;br&gt;
    &lt;p&gt;The weather will be sunny&lt;/p&gt;
&lt;br&gt;
6

&lt;p&gt;7&lt;br&gt;
  &lt;/p&gt;
&lt;p&gt;Subscribe for more news&lt;/p&gt;
&lt;br&gt;
8

&lt;p&gt;If you wanted to style the h1 element containing the text Latest News, you can use the following child selector:&lt;/p&gt;

&lt;p&gt;CSS&lt;/p&gt;

&lt;p&gt;1&lt;/p&gt;

&lt;h1&gt;
  
  
  blog &amp;gt; h1• {
&lt;/h1&gt;

&lt;p&gt;2&lt;br&gt;
  color: blue;&lt;br&gt;
3&lt;br&gt;
}&lt;br&gt;
This will select the element with the ID blog (the parent), then it will select all h1 elements that are contained directly in that element (the children). The structure of the child selector is a CSS selector followed by the child combinator symbol &amp;gt; followed by another CSS selector.&lt;/p&gt;

&lt;p&gt;Note that this will not go beyond a single depth level. Therefore, the CSS rule will not be applied to the h1 element containing the text Today's Weather.&lt;/p&gt;

&lt;p&gt;:hover Pseudo-Class&lt;br&gt;
A special keyword called a pseudo-class allows developers to select elements based on their state. Don't worry too much about what that means right now. For now, let's look at how the hover pseudo-class allows you to style an element when the mouse cursor hovers over the element.&lt;/p&gt;

&lt;p&gt;The simplest example of this is changing the color of a hyperlink when it is hovered over. To do this, you add the :hover pseudo-class to the end of the selector. The following example will change the color of the hyperlink to orange when it is hovered over.&lt;/p&gt;

&lt;p&gt;CSS&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
:hover {&lt;br&gt;
2&lt;br&gt;
  color: orange;&lt;br&gt;
3&lt;br&gt;
}&lt;br&gt;
This pseudo-class is very useful for creating visual effects based on user interaction.&lt;/p&gt;

&lt;p&gt;Other Selectors&lt;br&gt;
There are many other CSS selectors available to style your webpage. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>css</category>
    </item>
    <item>
      <title>New Usefull JavaScript Tips For Everyone</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Tue, 04 Oct 2022 04:52:35 +0000</pubDate>
      <link>https://forem.com/shaon07/new-usefull-javascript-tips-for-everyone-1389</link>
      <guid>https://forem.com/shaon07/new-usefull-javascript-tips-for-everyone-1389</guid>
      <description>&lt;h2&gt;
  
  
  *&lt;em&gt;Old Ways *&lt;/em&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const getPrice = (item) =&amp;gt; {
  if(item==200){return 200} 
   else if (item==500){return 500}
   else if (item===400) {return 400}
   else {return 100}
}

console.log(getPrice(foodName));

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;New Ways&lt;/strong&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const prices = {
 food1 : 100,
 food2 : 200,
 food3 : 400,
 food4 : 500
}

const getPrice = (item) =&amp;gt; {
 return prices[item]
}

console.log(getPrice(foodName))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hope you like my new tricks :D&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/shaon07"&gt;&lt;/a&gt; follow my github account&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Simple HTML tags</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Tue, 27 Sep 2022 06:32:44 +0000</pubDate>
      <link>https://forem.com/shaon07/simple-html-tags-dfc</link>
      <guid>https://forem.com/shaon07/simple-html-tags-dfc</guid>
      <description>&lt;h2&gt;
  
  
  There are many tags available in HTML. Here you will learn about common tags that you'll use as a developer.
&lt;/h2&gt;

&lt;p&gt;Headings&lt;br&gt;
Headings allow you to display titles and subtitles on your webpage.&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;body&amp;gt;
  &amp;lt;h1&amp;gt;Heading 1&amp;lt;/h1&amp;gt;
  &amp;lt;h2&amp;gt;Heading 2&amp;lt;/h2&amp;gt;
  &amp;lt;h3&amp;gt;Heading 3&amp;lt;/h3&amp;gt;
  &amp;lt;h4&amp;gt;Heading 4&amp;lt;/h4&amp;gt;
  &amp;lt;h5&amp;gt;Heading 5&amp;lt;/h5&amp;gt;
  &amp;lt;h6&amp;gt;Heading 6&amp;lt;/h6&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7W337AyV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlzujuhcwyvluakwqcz8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7W337AyV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlzujuhcwyvluakwqcz8.png" alt="Image description" width="222" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paragraphs&lt;br&gt;
Paragraphs contain text content.&lt;/p&gt;

&lt;p&gt;12345&lt;/p&gt;

&lt;p&gt;
   This paragraph
   contains a lot of lines
   but they are ignored.
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Paragraph style displayed in browser &lt;br&gt;
Note that putting content on a new line is ignored by the web browser.&lt;/p&gt;

&lt;p&gt;Line Breaks&lt;br&gt;
As you've learned, line breaks in the paragraph tag line are ignored by HTML. Instead, they must be specified using the &lt;br&gt; tag. The &lt;br&gt; tag does not need a closing tag.&lt;/p&gt;

&lt;p&gt;12345&lt;/p&gt;

&lt;p&gt;
   This paragraph&lt;br&gt;
   contains a lot of lines&lt;br&gt;
   and they are displayed.
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Line breaks displayed in browser &lt;br&gt;
Strong&lt;br&gt;
Strong tags can be used to indicate that a range of text has importance.&lt;/p&gt;

&lt;p&gt;123&lt;/p&gt;

&lt;p&gt;
   No matter how much the dog barks: &lt;strong&gt;don't feed him chocolate&lt;/strong&gt;.
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Text with strong tag displayed in browser &lt;br&gt;
Bold&lt;br&gt;
Bold tags can be used to draw the reader's attention to a range of text.&lt;/p&gt;

&lt;p&gt;123&lt;/p&gt;

&lt;p&gt;
   The primary colors are &lt;b&gt;red&lt;/b&gt;, &lt;b&gt;yellow&lt;/b&gt; and &lt;b&gt;blue&lt;/b&gt;.
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Bold text displayed in browser &lt;br&gt;
The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Text with strong tag displayed in browser &lt;br&gt;
Bold tags should be used to draw attention but not to indicate that something is more important. Consider the following example:&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
The three core technologies of the Internet are &lt;b&gt;HTML&lt;/b&gt;, &lt;b&gt;CSS&lt;/b&gt; and &lt;b&gt;Javascript&lt;/b&gt;.&lt;br&gt;
The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Bold text displayed in browser &lt;br&gt;
Emphasis&lt;br&gt;
Emphasis tags can be used to add emphasis to text.&lt;/p&gt;

&lt;p&gt;123&lt;/p&gt;

&lt;p&gt;
   Wake up &lt;em&gt;now&lt;/em&gt;!
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Text with emphasis tag displayed in browser &lt;br&gt;
Italics&lt;br&gt;
Italics tags can be used to offset a range of text.&lt;/p&gt;

&lt;p&gt;123&lt;/p&gt;

&lt;p&gt;
   The term HTML stands for HyperText Markup Language.
&lt;/p&gt;

&lt;p&gt;The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Italic text displayed in browser &lt;br&gt;
Emphasis vs. Italics&lt;br&gt;
By default both tags will have the same visual effect in the web browser. The only difference is the meaning.&lt;/p&gt;

&lt;p&gt;Emphasis tags stress the text contained in them. Let's explore the following example:&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
I &lt;em&gt;really&lt;/em&gt; want ice cream.&lt;br&gt;
The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Text with emphasis tag displayed in browser. &lt;br&gt;
Italics represent off-set text and should be used for technical terms, titles, a thought or a phrase from another language, for example:&lt;/p&gt;

&lt;p&gt;1&lt;br&gt;
My favourite book is Dracula.&lt;br&gt;
The following displays in the web browser: &lt;/p&gt;

&lt;p&gt;Italic text displayed in browser&lt;br&gt;
Screen readers will not announce any difference if an italics tag is used.&lt;/p&gt;

&lt;p&gt;Lists&lt;br&gt;
You can add lists to your web pages. There are two types of lists in HTML.&lt;/p&gt;

&lt;p&gt;Lists can be unordered using the &lt;/p&gt;
&lt;ul&gt; tag. List items are specified using the &lt;li&gt; tag, for example:

&lt;p&gt;123456&lt;/p&gt;

&lt;ul&gt;
   &lt;li&gt;Tea&lt;/li&gt;
   &lt;li&gt;Sugar&lt;/li&gt;
   &lt;li&gt;Milk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This displays in the web browser as:&lt;/p&gt;

&lt;p&gt;Bullet style displayed in the browser img10&lt;br&gt;
Lists can also be ordered using the &lt;/p&gt;

&lt;ol&gt; tag. Again, list items are specified using the &lt;li&gt; tag.

&lt;p&gt;12345&lt;/p&gt;

&lt;ol&gt;
   &lt;li&gt;Rocky&lt;/li&gt;
   &lt;li&gt;Rocky II&lt;/li&gt;
   &lt;li&gt;Rocky III&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This displays as the following in the web browser.&lt;/p&gt;

&lt;p&gt;Numbered list style displayed in browser img11&lt;br&gt;
Div tags&lt;br&gt;
A &lt;/p&gt; tag defines a content division in a HTML document. It acts as a generic container and has no effect on the content unless it is styled by CSS.

&lt;p&gt;The following example shows a &lt;/p&gt; element that contains a paragraph element:

&lt;p&gt;123&lt;/p&gt;


&lt;p&gt;This is a paragraph inside a div&lt;/p&gt;

&lt;p&gt;This displays as the following in the web browser.&lt;/p&gt;

&lt;p&gt;Div displayed in browser img12&lt;br&gt;
It can be nested inside other elements, for example:&lt;/p&gt;

&lt;p&gt;12345&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;p&amp;gt;This is a paragraph inside a div that’s inside another div&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This displays in the web browser as:&lt;/p&gt;

&lt;p&gt;Div inside a dive displayed in browser &lt;br&gt;
As mentioned, the div has no impact on content unless it is styled by CSS. Let’s add a small CSS rule that styles all divs on the page.&lt;/p&gt;

&lt;p&gt;Don't worry about the meaning of the CSS just yet, you'll explore CSS further in a later lesson. In summary, you're applying a rule that adds a border and some visual spacing to the element.&lt;/p&gt;

&lt;p&gt;1234567891011&lt;/p&gt;

&lt;p&gt;div {&lt;br&gt;
      border: 1px solid black;&lt;br&gt;
      padding: 2px;&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;p&amp;gt;This is a paragraph inside stylized divs&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This displays in the web browser as:&lt;/p&gt;

&lt;p&gt;Paragraph in stylized div displayed in browser img13&lt;br&gt;
Div elements are an important part of building webpages. More advanced usage of div elements will be explored in another course.&lt;/p&gt;

&lt;p&gt;Comments&lt;br&gt;
If you want to leave a comment in the code for other developers, it can be added as:&lt;/p&gt;

&lt;p&gt;The comment will not be displayed in the web browser.&lt;/p&gt;


&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webcomponents</category>
    </item>
    <item>
      <title>Other Internet Protocols</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Tue, 27 Sep 2022 05:16:38 +0000</pubDate>
      <link>https://forem.com/shaon07/other-internet-protocols-5bla</link>
      <guid>https://forem.com/shaon07/other-internet-protocols-5bla</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hypertext Transfer Protocols (HTTP) are used on top of Transmission Control Protocol (TCP) to transfer webpages and other content from websites.&lt;br&gt;
This reading explores other protocols commonly used on the Internet.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Dynamic Host Configuration Protocol (DHCP)
&lt;/h2&gt;

&lt;p&gt;You've learned that computers need IP addresses to communicate with each other. When your computer connects to a network, the Dynamic Host Configuration Protocol or DCHP as it is commonly known, is used to assign your computer an IP address.&lt;br&gt;
Your computer communicates over User Datagram Protocol (UDP) using the protocol with a type of server called a DHCP server. The server keeps track of computers on the network and their IP addresses. It will assign your computer an IP address and respond over the protocol to let it know which IP address to use. Once your computer has an IP address, it can communicate with other computers on the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Domain Name System Protocol (DNS)
&lt;/h2&gt;

&lt;p&gt;Your computer needs a way to know with which IP address to communicate when you visit a website in your web browser, for example, meta.com. The Domain Name System Protocol, commonly known as DNS, provides this function. Your computer then checks with the DNS server associated with the domain name and then returns the correct IP address.&lt;/p&gt;

&lt;h2&gt;
  
  
  Internet Message Access Protocol (IMAP)
&lt;/h2&gt;

&lt;p&gt;Do you check your emails on your mobile or tablet device? Or maybe you use an email application on your computer?&lt;br&gt;
Your device needs a way to download emails and manage your mailbox on the server storing your emails. This is the purpose of the Internet Message Access Protocol or IMAP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple Mail Transfer Protocol (SMTP)
&lt;/h2&gt;

&lt;p&gt;Now that your emails are on your device, you need a way to send emails. The Simple Mail Transfer Protocol, or SMTP, is used. It allows email clients to submit emails for sending via an SMTP server. You can also use it to receive emails from an email client, but IMAP is more commonly used.&lt;/p&gt;

&lt;h2&gt;
  
  
  Post Office Protocol (POP)
&lt;/h2&gt;

&lt;p&gt;The Post Office Protocol (POP) is an older protocol used to download emails to an email client. The main difference in using POP instead of IMAP is that POP will delete the emails on the server once they have been downloaded to your local device. Although it is no longer commonly used in email clients, developers often use it to implement email automation as it is a more straightforward protocol than IMAP.&lt;/p&gt;

&lt;h2&gt;
  
  
  File Transfer Protocol (FTP)
&lt;/h2&gt;

&lt;p&gt;When running your websites and web applications on the Internet, you'll need a way to transfer the files from your local computer to the server they'll run on. The standard protocol used for this is the File Transfer Protocol or FTP. FTP allows you to list, send, receive and delete files on a server. Your server must run an FTP Server and you will need an FTP Client on your local machine. You'll learn more about these in a later course.&lt;/p&gt;

&lt;h2&gt;
  
  
  Secure Shell Protocol (SSH)
&lt;/h2&gt;

&lt;p&gt;When you start working with servers, you'll also need a way to log in and interact with the computer remotely. The most common method of doing this is using the Secure Shell Protocol, commonly referred to as SSH. Using an SSH client allows you to connect to an SSH server running on a server to perform commands on the remote computer.&lt;br&gt;
All data sent over SSH is encrypted. This means that third parties cannot understand the data transmitted. Only the sending and receiving computers can understand the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  SSH File Transfer Protocol (SFTP)
&lt;/h2&gt;

&lt;p&gt;The data is transmitted insecurely when using the File Transfer Protocol. This means that third parties may understand the data that you are sending. This is not right if you transmit company files such as software and databases. To solve this, the SSH File Transfer Protocol, alternatively called the Secure File Transfer Protocol, can be used to transfer files over the SSH protocol. This ensures that the data is transmitted securely. Most FTP clients also support the SFTP protocol.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>protocol</category>
      <category>internet</category>
      <category>learn</category>
    </item>
    <item>
      <title>HTTP examples</title>
      <dc:creator>SHaon</dc:creator>
      <pubDate>Tue, 27 Sep 2022 05:08:28 +0000</pubDate>
      <link>https://forem.com/shaon07/http-examples-13j9</link>
      <guid>https://forem.com/shaon07/http-examples-13j9</guid>
      <description>&lt;p&gt;This reading explores the contents of HTTP requests and responses in more depth.&lt;/p&gt;

&lt;p&gt;Request Line&lt;br&gt;
Every HTTP request begins with the request line.&lt;/p&gt;

&lt;p&gt;This consists of the HTTP method, the requested resource and the HTTP protocol version.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;GET /home.html HTTP/1.1 &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this example, GET is the HTTP method, /home.html is the resource requested and HTTP 1.1 is the protocol used.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HTTP Methods&lt;br&gt;
HTTP methods indicate the action that the client wishes to perform on the web server resource.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Common HTTP methods are:
&lt;/h2&gt;

&lt;p&gt;HTTP Method&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;h2&gt;
  
  
  GET
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The client requests a resource on the web server.&lt;br&gt;
POST&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The client submits data to a resource on the web server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  PUT
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The client replaces a resource on the web server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DELETE
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The client deletes a resource on the web server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  HTTP Request Headers
&lt;/h2&gt;

&lt;p&gt;_After the request line, the HTTP headers are followed by a line break.&lt;/p&gt;

&lt;p&gt;There are various possibilities when including an HTTP header in the HTTP request. A header is a case-insensitive name followed by a: and then followed by a value.&lt;br&gt;
_&lt;/p&gt;

&lt;h2&gt;
  
  
  Common headers are:
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Host: example.com​&lt;br&gt;
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0&lt;br&gt;
Accept: */*&lt;br&gt;
Accept-Language: en​&lt;br&gt;
Content-type: text/json&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Host header specifies the host of the server and indicates where the resource is requested from.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;li&gt;The User-Agent header informs the web server of the application that is making the request. It often includes the operating system (Windows, Mac, Linux), version and application vendor.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;li&gt;The Accept header informs the web server what type of content the client will accept as the response.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;li&gt;The Accept-Language header indicates the language and optionally the locale that the client prefers.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;li&gt;The Content-type header indicates the type of content being transmitted in the request body.&lt;/li&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;HTTP Responses&lt;br&gt;
When the web server is finished processing the HTTP request, it will send back an HTTP response.&lt;/p&gt;

&lt;p&gt;The first line of the response is the status line. This line shows the client if the request was successful or if an error occurred.&lt;/p&gt;

&lt;p&gt;HTTP/1.1 200 OK​ &lt;/p&gt;

&lt;p&gt;The line begins with the HTTP protocol version, followed by the status code and a reason phrase. The reason phrase is a textual representation of the status code.&lt;/p&gt;

&lt;p&gt;HTTP Status Codes&lt;br&gt;
The first digit of an HTTP status code indicates the category of the response: Information, Successful, Redirection, Client Error or Server Error.&lt;/p&gt;

&lt;p&gt;The common status codes you'll encounter for each category are:&lt;/p&gt;

&lt;p&gt;1XX Informational&lt;/p&gt;

&lt;p&gt;Status Code&lt;/p&gt;

&lt;p&gt;Reason Phrase&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;p&gt;100&lt;/p&gt;

&lt;p&gt;Continue&lt;/p&gt;

&lt;p&gt;The server received the request headers and should continue to send the request body.&lt;/p&gt;

&lt;p&gt;101&lt;/p&gt;

&lt;p&gt;Switching Protocols&lt;/p&gt;

&lt;p&gt;The client has requested the server to switch protocols and the server has agreed to do so.&lt;/p&gt;

&lt;p&gt;2XX Successful&lt;/p&gt;

&lt;p&gt;Status Code&lt;/p&gt;

&lt;p&gt;Reason Phrase&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;p&gt;200&lt;/p&gt;

&lt;p&gt;OK&lt;/p&gt;

&lt;p&gt;Standard response returned by the server to indicate it successfully processed the request.&lt;/p&gt;

&lt;p&gt;201&lt;/p&gt;

&lt;p&gt;Created&lt;/p&gt;

&lt;p&gt;The server successfully processed the request and a resource was created.&lt;/p&gt;

&lt;p&gt;202&lt;/p&gt;

&lt;p&gt;Accepted&lt;/p&gt;

&lt;p&gt;The server accepted the request for processing but the processing has not yet been completed.&lt;/p&gt;

&lt;p&gt;204&lt;/p&gt;

&lt;p&gt;No Content&lt;/p&gt;

&lt;p&gt;The server successfully processed the request but is not returning any content.&lt;/p&gt;

&lt;p&gt;3XX Redirection&lt;/p&gt;

&lt;p&gt;Status Code&lt;/p&gt;

&lt;p&gt;Reason Phrase&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;p&gt;301&lt;/p&gt;

&lt;p&gt;Moved Permanently&lt;/p&gt;

&lt;p&gt;This request and all future requests should be sent to the returned location.&lt;/p&gt;

&lt;p&gt;302&lt;/p&gt;

&lt;p&gt;Found&lt;/p&gt;

&lt;p&gt;This request should be sent to the returned location.&lt;/p&gt;

&lt;p&gt;4XX Client Error&lt;/p&gt;

&lt;p&gt;Status Code&lt;/p&gt;

&lt;p&gt;Reason Phrase&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;p&gt;400&lt;/p&gt;

&lt;p&gt;Bad Request&lt;/p&gt;

&lt;p&gt;The server cannot process the request due to a client error, e.g., invalid request or transmitted data is too large.&lt;/p&gt;

&lt;p&gt;401&lt;/p&gt;

&lt;p&gt;Unauthorized&lt;/p&gt;

&lt;p&gt;The client making the request is unauthorized and should authenticate.&lt;/p&gt;

&lt;p&gt;403&lt;/p&gt;

&lt;p&gt;Forbidden&lt;/p&gt;

&lt;p&gt;The request was valid but the server is refusing to process it. This is usually returned due to the client having insufficient permissions for the website, e.g., requesting an administrator action but the user is not an administrator.&lt;/p&gt;

&lt;p&gt;404&lt;/p&gt;

&lt;p&gt;Not Found&lt;/p&gt;

&lt;p&gt;The server did not find the requested resource.&lt;/p&gt;

&lt;p&gt;405&lt;/p&gt;

&lt;p&gt;Method Not Allowed&lt;/p&gt;

&lt;p&gt;The web server does not support the HTTP method used.&lt;/p&gt;

&lt;p&gt;5XX Server Error&lt;/p&gt;

&lt;p&gt;Status Code&lt;/p&gt;

&lt;p&gt;Reason Phrase&lt;/p&gt;

&lt;p&gt;Description&lt;/p&gt;

&lt;p&gt;500&lt;/p&gt;

&lt;p&gt;Internal Server Error&lt;/p&gt;

&lt;p&gt;A generic error status code given when an unexpected error or condition occurred while processing the request.&lt;/p&gt;

&lt;p&gt;502&lt;/p&gt;

&lt;p&gt;Bad Gateway&lt;/p&gt;

&lt;p&gt;The web server received an invalid response from the Application Server.&lt;/p&gt;

&lt;p&gt;503&lt;/p&gt;

&lt;p&gt;Service Unavailable&lt;/p&gt;

&lt;p&gt;The web server cannot process the request.&lt;/p&gt;

&lt;p&gt;HTTP Response Headers&lt;br&gt;
Following the status line, there are optional HTTP response headers followed by a line break.&lt;/p&gt;

&lt;p&gt;Similar to the request headers, there are many possible HTTP headers that can be included in the HTTP response.&lt;/p&gt;

&lt;p&gt;Common response headers are:&lt;/p&gt;

&lt;p&gt;1234&lt;br&gt;
Date: Fri, 11 Feb 2022 15:00:00 GMT+2​&lt;br&gt;
Server: Apache/2.2.14 (Linux)​&lt;br&gt;
Content-Length: 84​&lt;br&gt;
Content-Type: text/html​&lt;br&gt;
The Date header specifies the date and time the HTTP response was generated.&lt;/p&gt;

&lt;p&gt;The Server header describes the web server software used to generate the response.&lt;/p&gt;

&lt;p&gt;The Content-Length header describes the length of the response.&lt;/p&gt;

&lt;p&gt;The Content-Type header describes the media type of the resource returned (e.g. HTML document, image, video).&lt;/p&gt;

&lt;p&gt;HTTP Response Body&lt;br&gt;
Following the HTTP response headers is the HTTP response body. This is the main content of the HTTP response.&lt;/p&gt;

&lt;p&gt;This can contain images, video, HTML documents and other media types.&lt;/p&gt;

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