<?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: HM Nomaan</title>
    <description>The latest articles on DEV Community by HM Nomaan (@hmnomaan).</description>
    <link>https://dev.to/hmnomaan</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%2F608045%2F8a96c371-f539-4ff1-924a-18dea5d5d404.jpeg</url>
      <title>DEV Community: HM Nomaan</title>
      <link>https://dev.to/hmnomaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hmnomaan"/>
    <language>en</language>
    <item>
      <title>How to start working with Node, MongoDB for the MERN stack</title>
      <dc:creator>HM Nomaan</dc:creator>
      <pubDate>Tue, 28 Dec 2021 16:06:44 +0000</pubDate>
      <link>https://dev.to/hmnomaan/how-to-start-working-with-node-mongodb-for-the-mern-stack-4kg2</link>
      <guid>https://dev.to/hmnomaan/how-to-start-working-with-node-mongodb-for-the-mern-stack-4kg2</guid>
      <description>&lt;p&gt;I will giving few instance how do we use Node, MongoDB, ReactJS, and Express. &lt;/p&gt;

&lt;p&gt;React: Front-End Library &lt;br&gt;
React is a JavaScript library that is used for building user interfaces. React is used for the development of single-page applications and mobile applications because of its ability to handle rapidly changing data. React allows users to code in JavaScript and create UI components. &lt;br&gt;
Why use React? &lt;br&gt;
Virtual DOM – A virtual DOM object is a representation of a DOM object. Virtual DOM is actually a copy of the original DOM. Any modification in the web application causes the entire UI to re-render the virtual DOM. Then the difference between the original DOM and this virtual DOM is compared and the changes are made accordingly to the original DOM.&lt;br&gt;
JSX – Stands for JavaScript XML. It is an HTML/XML JavaScript Extension which is used in React. Makes it easier and simpler to write React components.&lt;br&gt;
Components – ReactJS supports Components. Components are the building blocks of UI wherein each component has a logic and contributes to the overall UI. These components also promote code reusability and make the overall web application easier to understand.&lt;br&gt;
High Performance – Features like Virtual DOM, JSX and Components makes it much faster than the rest of the frameworks out there.&lt;br&gt;
Developing Android/Ios Apps – With React Native you can easily code Android-based or IOS-Based apps with just the knowledge of JavaScript and ReactJS.&lt;br&gt;
You can start your react application by first installing “create-react-app” using npm or yarn.&lt;br&gt;
npm install create-react-app --global&lt;br&gt;
OR &lt;br&gt;
yarn global add create-react-app&lt;/p&gt;

&lt;p&gt;Node.js: JS Runtime Environment &lt;br&gt;
Node.js provides a JavaScript Environment which allows the user to run their code on the server (outside the browser). Node pack manager i.e. npm allows the user to choose from thousands of free packages (node modules) to download. &lt;br&gt;
Why use Node.JS? &lt;br&gt;
Open-source JavaScript Runtime Environment&lt;br&gt;
Single threading – Follows a single-threaded model.&lt;br&gt;
Data Streaming&lt;br&gt;
Fast – Built on Google Chrome’s JavaScript Engine, Node.js has a fast code execution.&lt;br&gt;
Highly Scalable&lt;br&gt;
Initialize a Node.js application by typing running the below command in the command window. Accept the standard settings.&lt;br&gt;
npm init&lt;br&gt;
 Express: Back-End Framework: &lt;br&gt;
Express is a Node.js framework. Rather than writing the code using Node.js and creating loads of Node modules, Express makes it simpler and easier to write the back-end code. Express helps in designing great web applications and APIs. Express supports many middlewares which makes the code shorter and easier to write.&lt;/p&gt;

&lt;p&gt;Why use Express? &lt;br&gt;
Asynchronous and Single-threaded.&lt;br&gt;
Efficient, fast &amp;amp; scalable&lt;br&gt;
Has the biggest community for Node.js&lt;br&gt;
Express promotes code reusability with its built-in router.&lt;br&gt;
Robust API&lt;br&gt;
Create a new folder to start your express project and type below command in the command prompt to initialize a package.json file. Accept the default settings and continue.&lt;br&gt;
npm init&lt;br&gt;
Then install express by typing the below command and hit enter. Now finally create a file inside the directory named index.js.&lt;br&gt;
npm install express --save&lt;br&gt;
MongoDB: Cross-platform Document-Oriented Database &lt;br&gt;
MongoDB is a NoSQL database where each record is a document comprising of key-value pairs that are similar to JSON (JavaScript Object Notation) objects. MongoDB is flexible and allows its users to create schema, databases, tables, etc. Documents that are identifiable by a primary key make up the basic unit of MongoDB. Once MongoDB is installed, users can make use of Mongo shell as well. Mongo shell provides a JavaScript interface through which the users can interact and carry out operations (eg: querying, updating records, deleting records).&lt;br&gt;
Why use MongoDB? &lt;br&gt;
Fast – Being a document-oriented database, easy to index documents. Therefore a faster response.&lt;br&gt;
Scalability – Large data can be handled by dividing it into several machines.&lt;br&gt;
Use of JavaScript – MongoDB uses JavaScript which is the biggest advantage.&lt;br&gt;
Schema Less – Any type of data in a separate document.&lt;br&gt;
Data stored in the form of JSON –&lt;br&gt;
Objects, Object Members, Arrays, Values, and Strings&lt;br&gt;
JSON syntax is very easy to use.&lt;br&gt;
JSON has a wide range of browser compatibility.&lt;br&gt;
Sharing Data: Data of any size and type(video, audio) can be shared easily.&lt;br&gt;
Simple Environment Setup – Its really simple to set up MongoDB.&lt;br&gt;
Flexible Document Model – MongoDB supports document-model(tables, schemas, columns &amp;amp; SQL) which is faster and easier.&lt;br&gt;
Creating a database: Simply done using a “use” command:&lt;br&gt;
use database_name;&lt;br&gt;
Creating a table: If the collection/table doesn’t exist then a new collection/table will be created:&lt;br&gt;
db.createCollection("collection_name");&lt;br&gt;
Inserting records into the collection:&lt;br&gt;
db.collection_name.insert&lt;br&gt;
(&lt;br&gt;
    {&lt;br&gt;
        "id" : 1,&lt;br&gt;
        "Name" : "Klaus",&lt;br&gt;
                "Department": "Technical",&lt;br&gt;
                "Organization": "Geeks For Geeks"&lt;br&gt;
    }&lt;br&gt;
);&lt;/p&gt;

</description>
      <category>mern</category>
      <category>react</category>
      <category>node</category>
      <category>express</category>
    </item>
    <item>
      <title>Why do we use react? will it be everlasting?</title>
      <dc:creator>HM Nomaan</dc:creator>
      <pubDate>Tue, 28 Dec 2021 15:06:59 +0000</pubDate>
      <link>https://dev.to/hmnomaan/why-do-we-use-react-will-it-be-everlasting-2a50</link>
      <guid>https://dev.to/hmnomaan/why-do-we-use-react-will-it-be-everlasting-2a50</guid>
      <description>&lt;p&gt;Now, the main question arises in front of us is why one should use React. There are so many open-source platforms for making the front-end web application development easier, like Angular. Let us take a quick look on the benefits of React over other competitive technologies or frameworks. With the front-end world-changing on a daily basis, it’s hard to devote time to learning a new framework – especially when that framework could ultimately become a dead end. So, if you're looking for the next best thing but you're feeling a little bit lost in the framework jungle, I suggest checking out React.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Simplicity&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ReactJS is just simpler to grasp right away. The component-based approach, well-defined lifecycle, and use of just plain JavaScript make React very simple to learn, build a professional web (and mobile applications), and support it. React uses a special syntax called JSX which allows you to mix HTML with JavaScript. This is not a requirement; Developer can still write in plain JavaScript but JSX is much easier to use.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Easy to learn&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Anyone with a basic previous knowledge in programming can easily understand React while Angular and Ember are referred to as ‘Domain-specific Language’, implying that it is difficult to learn them. To react, you just need basic knowledge of CSS and HTML.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Native Approach&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;React can be used to create mobile applications (React Native). And React is a diehard fan of reusability, meaning extensive code reusability is supported. So at the same time, we can make IOS, Android and Web applications.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Binding&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;React uses one-way data binding and an application architecture called Flux controls the flow of data to components through one control point – the dispatcher. It's easier to debug self-contained components of large ReactJS apps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;React does not offer any concept of a built-in container for dependency. You can use Browserify, Require JS, EcmaScript 6 modules which we can use via Babel, ReactJS-di to inject dependencies automatically.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Testability&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ReactJS applications are super easy to test. React views can be treated as functions of the state, so we can manipulate with the state we pass to the ReactJS view and take a look at the output and triggered actions, events, functions, etc.&lt;/p&gt;

&lt;p&gt;Will ReactJs Everlasting?&lt;/p&gt;

&lt;p&gt;As long as , the community is rising with reactJs and this is going to be stay inthe long run. But The scalability in reactjs is increasing day by day. I hope this is going to be a approach if react team work with stable updates to the reactJs Libraries or efficient rendering.&lt;/p&gt;

&lt;p&gt;I think the load time can be reduce in react , with that we can go in the long run. See if we do more research , there are bunch of amazing technology in the , market and the industry is growing higher everyday. In the frontend tech, React is not leaving so far. As long as ,Facebook backed reactjs .&lt;/p&gt;

</description>
      <category>react</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to use design patterns in JavaScript?</title>
      <dc:creator>HM Nomaan</dc:creator>
      <pubDate>Mon, 27 Dec 2021 14:25:33 +0000</pubDate>
      <link>https://dev.to/hmnomaan/how-to-use-design-patterns-in-javascript-3kgj</link>
      <guid>https://dev.to/hmnomaan/how-to-use-design-patterns-in-javascript-3kgj</guid>
      <description>&lt;p&gt;JavaScript is a lightweight, interpreted, object-oriented programming language with first-class functions most commonly known as a scripting language for web pages&lt;/p&gt;

&lt;p&gt;What Are Design Patterns?&lt;br&gt;
As I said before, design patterns are reusable solutions to commonly occurring problems in software design. Let’s take a look at some of the categories of design patterns.&lt;br&gt;
Proto-patterns&lt;br&gt;
How does one create a pattern? Let’s say you recognized a commonly occurring problem, and you have your own unique solution to this problem, which isn’t globally recognized and documented. You use this solution every time you encounter this problem, and you think that it’s reusable and that the developer community could benefit from it.&lt;br&gt;
Does it immediately become a pattern? Luckily, no. Oftentimes, one may have good code writing practices and simply mistake something that looks like a pattern for one when, in fact, it is not a pattern.&lt;br&gt;
How can you know when what you think you recognize is actually a design pattern?&lt;br&gt;
By getting other developers’ opinions about it, by knowing about the process of creating a pattern itself, and by making yourself well acquainted with existing patterns. There is a phase a pattern has to go through before it becomes a full-fledged pattern, and this is called a proto-pattern.&lt;br&gt;
A proto-pattern is a pattern-to-be if it passes a certain period of testing by various developers and scenarios where the pattern proves to be useful and gives correct results. There is quite a large amount of work and documentation—most of which is outside the scope of this article—to be done in order to make a fully-fledged pattern recognized by the community.&lt;br&gt;
Anti-patterns&lt;br&gt;
As a design pattern represents good practice, an anti-pattern represents bad practice.&lt;br&gt;
An example of an anti-pattern would be modifying the Object class prototype. Almost all objects in JavaScript inherit from Object (remember that JavaScript uses prototype-based inheritance) so imagine a scenario where you altered this prototype. Changes to the Object prototype would be seen in all of the objects that inherit from this prototype—which would be most JavaScript objects. This is a disaster waiting to happen.&lt;br&gt;
Another example, similar to one mentioned above, is modifying objects that you don’t own. An example of this would be overriding a function from an object used in many scenarios throughout the application. If you are working with a large team, imagine the confusion this would cause; you’d quickly run into naming collisions, incompatible implementations, and maintenance nightmares.&lt;br&gt;
Similar to how it is useful to know about all of the good practices and solutions, it is also very important to know about the bad ones too. This way, you can recognize them and avoid making the mistake up front.&lt;br&gt;
Design Pattern Categorization&lt;br&gt;
Design patterns can be categorized in multiple ways, but the most popular one is the following:&lt;br&gt;
Creational design patterns&lt;br&gt;
Structural design patterns&lt;br&gt;
Behavioral design patterns&lt;br&gt;
Concurrency design patterns&lt;br&gt;
Architectural design patterns&lt;br&gt;
Creational Design Patterns&lt;br&gt;
These patterns deal with object creation mechanisms which optimize object creation compared to a basic approach. The basic form of object creation could result in design problems or in added complexity to the design. Creational design patterns solve this problem by somehow controlling object creation. Some of the popular design patterns in this category are:&lt;br&gt;
Factory method&lt;br&gt;
Abstract factory&lt;br&gt;
Builder&lt;br&gt;
Prototype&lt;br&gt;
Singleton&lt;br&gt;
Structural Design Patterns&lt;br&gt;
These patterns deal with object relationships. They ensure that if one part of a system changes, the entire system doesn’t need to change along with it. The most popular patterns in this category are:&lt;br&gt;
Adapter&lt;br&gt;
Bridge&lt;br&gt;
Composite&lt;br&gt;
Decorator&lt;br&gt;
Facade&lt;br&gt;
Flyweight&lt;br&gt;
Proxy&lt;br&gt;
Behavioral Design Patterns&lt;br&gt;
These types of patterns recognize, implement, and improve communication between disparate objects in a system. They help ensure that disparate parts of a system have synchronized information. Popular examples of these patterns are:&lt;br&gt;
Chain of responsibility&lt;br&gt;
Command&lt;br&gt;
Iterator&lt;br&gt;
Mediator&lt;br&gt;
Memento&lt;br&gt;
Observer&lt;br&gt;
State&lt;br&gt;
Strategy&lt;br&gt;
Visitor&lt;br&gt;
Concurrency Design Patterns&lt;br&gt;
These types of design patterns deal with multi-threaded programming paradigms. Some of the popular ones are:&lt;br&gt;
Active object&lt;br&gt;
Nuclear reaction&lt;br&gt;
Scheduler&lt;br&gt;
Architectural Design Patterns&lt;br&gt;
Design patterns which are used for architectural purposes. Some of the most famous ones are:&lt;br&gt;
MVC (Model-View-Controller)&lt;br&gt;
MVP (Model-View-Presenter)&lt;br&gt;
MVVM (Model-View-ViewModel)&lt;br&gt;
In the following section, we are going to take a closer look at some of the aforementioned design patterns with examples provided for better understanding.&lt;/p&gt;

</description>
      <category>designpattern</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>how does the JavaScript work with DOM or VDOM in Browser?</title>
      <dc:creator>HM Nomaan</dc:creator>
      <pubDate>Mon, 27 Dec 2021 14:05:12 +0000</pubDate>
      <link>https://dev.to/hmnomaan/how-does-the-javascript-work-with-dom-or-vdom-in-browser-nlp</link>
      <guid>https://dev.to/hmnomaan/how-does-the-javascript-work-with-dom-or-vdom-in-browser-nlp</guid>
      <description>&lt;h2&gt;
  
  
  how does the JavaScript work with DOM or VDOM in Browser?
&lt;/h2&gt;

&lt;p&gt;The Document Object Model (DOM) is the data representation of the objects that comprise the structure and content of a document on the web. This guide will introduce the DOM, look at how the DOM represents an HTML document in memory and how to use APIs to create web content and applications. &lt;/p&gt;

&lt;p&gt;What is the DOM?&lt;br&gt;
The Document Object Model (DOM) is a programming interface for web documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects; that way, programming languages can interact with the page.&lt;br&gt;
A web page is a document that can be either displayed in the browser window or as the HTML source. In both cases, it is the same document but the Document Object Model (DOM) representation allows it to be manipulated. As an object-oriented representation of the web page, it can be modified with a scripting language such as JavaScript.&lt;br&gt;
For example, the DOM specifies that the querySelectorAll method in this code snippet must return a list of all the &lt;/p&gt;
&lt;p&gt; elements in the document:&lt;br&gt;
const paragraphs = document.querySelectorAll("p");&lt;br&gt;
// paragraphs[0] is the first &lt;/p&gt;
&lt;p&gt; element&lt;br&gt;
// paragraphs[1] is the second &lt;/p&gt;
&lt;p&gt; element, etc.&lt;br&gt;
alert(paragraphs[0].nodeName);&lt;/p&gt;

&lt;p&gt;All of the properties, methods, and events available for manipulating and creating web pages are organized into objects. For example, the document object that represents the document itself, any table objects that implement the HTMLTableElement DOM interface for accessing HTML tables, and so forth, are all objects.&lt;br&gt;
The DOM is built using multiple APIs that work together. The core DOM defines the entities describing any document and the objects within it. This is expanded upon as needed by other APIs that add new features and capabilities to the DOM. For example, the HTML DOM API adds support for representing HTML documents to the core DOM, and the SVG API adds support for representing SVG documents.&lt;/p&gt;

&lt;p&gt;Virtual DOM&lt;/p&gt;

&lt;p&gt;React creates elements for itself using its createsElements () function. By combining all the elements, he creates a separate dom inside himself. This dom is called Virtual Dom. React's virtual dom basically renders as much as the browser's dom has changed.&lt;/p&gt;

&lt;p&gt;We can imagine the Virtual Dom as a simple tree. The different notes of which are one component. Whenever we change the state of a component, a tree is created first. Where the modified component and its child components are reconstructed. That is, React has two representations of the virtual dom. One is the state before it, and the other is the state after the change. React compares these two conditions.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>What Actually Pseudo Element? Why Do We Need Pseudo element?
</title>
      <dc:creator>HM Nomaan</dc:creator>
      <pubDate>Mon, 20 Dec 2021 12:50:49 +0000</pubDate>
      <link>https://dev.to/hmnomaan/what-actually-pseudo-element-why-do-we-need-pseudo-element-fm5</link>
      <guid>https://dev.to/hmnomaan/what-actually-pseudo-element-why-do-we-need-pseudo-element-fm5</guid>
      <description>&lt;p&gt;A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s).&lt;/p&gt;

&lt;p&gt;There are many CSS Pseudo Element, but today We are going to talk about ::before and ::after pseudo Element.&lt;/p&gt;

&lt;p&gt;CSS ::before and ::after pseudo-elements allow you to insert “content” before and after any non-replaced element (e.g. they work on a &lt;/p&gt; but not an ). This effectively allows you to show something on a web page that might not be present in the HTML content. You shouldn’t use it for actual content because it’s not very accessible in that you can’t even select and copy text inserted on the page this way —  it’s just decorative content.

&lt;p&gt;&lt;code&gt;img {&lt;br&gt;
  display: block; /* Avoid the space under the image caused by line height */&lt;br&gt;
  position: relative;&lt;br&gt;
  width: 100%&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In this article, I’ll walk you through seven different examples that showcase how ::before and ::after can be used to create interesting effects.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;img::before {&lt;br&gt;
  background-color: hsl(0, 0%, 93.3%);&lt;br&gt;
  border: 1px dashed hsl(0, 0%, 66.7%);&lt;br&gt;
  /* ... */&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s because we set content to an empty string (which we need to display our generated content and styles) and cover the entire space, including the actual alt text. It’s there, we just can’t see it.&lt;/p&gt;

&lt;p&gt;We can see it if we display the alt text in an alternate (get it?) way, this time with help form the ::after pseudo-element. The content property is actually capable of displaying the image’s alt attribute text using the attr() function:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;` img::after {
  content: attr(alt);

  /* Some light styling */
  font-weight: bold;
  position: absolute;
  height: 100%;
  left: 0px;
  text-align: center;
  top: 1px;
  width: 100%;
} 
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;`&lt;/p&gt;

</description>
      <category>css</category>
      <category>css3</category>
    </item>
  </channel>
</rss>
